This is an online food delivery service website where users can shop online (browse through items, add to cart, place orders, etc) and simulate having their orders delivered to them by autonomous delivery robots.
-
Go to
https://console.cloud.google.com/
and sign-up/login. -
Using the search bar look for and enable the following APIs:
-
Address Validation API
-
Distance Matrix API
-
Places API
-
Routes API
-
-
Click on the button for the Navigation Menu on the top left of the page, then go to
APIs & Services
. -
From this page nagivate to
Credentials
>+ CREATE CREDENTIALS
>API key
. -
After a delay, it should display your API key.
-
Under
API Keys
click on the three vertical dots at the end right next toSHOW KEY
, then click onEdit API key
. -
Under
API restrictions
selectRestrict key
. -
Using the drop-down menu select the 4 APIs mentioned earlier.
-
Click
SAVE
, it will take up to 5 minutes for the restrictions to take into effect.
-
Clone this repository onto your local machine with the following command
git clone https://github.com/rKim19300/CS160-Team-4-OFS.git
-
cd
into the project directorycd CS160-Team-4-OFS
-
Open the
.env_example
file in the project root directory and follow what the comments inside the file say. Below is the contents of.env_example
for reference.env_example
GOOGLE_API_KEY_BACKEND=API_KEY_HERE # Rename this file from ".env_example" to ".env" # replace API_KEY_HERE with your Google Maps API key # IMPORTANT: NEVER PUSH THE .env FILE TO GITHUB
-
Build and run the application with the command below (if you don't have Docker, you can install it here)
docker compose up --build
The first time you build the application, it will take some time to get everything up and running. This is normal
-
Open
https://localhost:3000
in your browser
There are 3 types of users: Managers
, Employees
, Customers
Some features on this website can only be used depending on the type of user you are logged in as. Users with the manager
user type can access and use everything.
Below are the credentials for the two manager
accounts (doesn't matter which one you use)
- email:
[email protected]
, password:admin
- email:
[email protected]
, password:password
When you create an account through the signup page, you are making a
customer
account. Onlymanagers
can createemployee
accounts through their private dashboard
The map is only visible for Managers
and Employees
. It allows them to view the orders on the map and the which orders are assigned to which delivery robot.
-
Delivery Conditon: There are three conditions in which robots are sent out automatically.
-
They have
10
orders on their route. -
Their orders reach exactly
200
pounds. -
It has been
2
hours since the youngest order on their route has been placed.
-
-
IMPORTANT: The map can only be loaded a limited number of times per day. If the window which contains the map says "Oops! Something went wrong", try again in 60 seconds. If the message still persists, then the maximum number of loads per day has been reached and should reset in about 24 hours.
https://drive.google.com/file/d/1m7qFAKbfneDhALq54WVmTPY3VvbCT7Ev/view?usp=sharing