DeliverUS is a made-up company whose business is focused on delivering food from 3rd parties (restaurants) to customers. To this end, we are requested to develop the needed software products which hopefully will boost the company. After interviewing the product owners and some stakeholders, the general objectives and requirements have been agreed, as described in this document.
Check https://github.com/IISSI2-IS-2022-2023/Deliverus-Backend-2022-2023 for full DeliverUS app requirements.
Complete this project template of the frontend app for customers in order to fulfill customer related requirements.
These tasks include:
List restaurants and enable customers to navigate to restaurant details so they can create and place a new order
Customers will be able to query top 3 products from all restaurants. Top products are the most popular ones, in other words the best sellers.
Customers will be able to query restaurants details and the products offered by them.
A Customer will be able to check his/her confirmed orders, sorted from the most recent to the oldest.
A customer will be able to look his/her orders up. The system should provide all details of an order, including the ordered products and their prices.
A customer can add several products, and several units of a product to a new order. Before confirming, customer can edit and remove products. Once the order is confirmed, it cannot be edited or removed.
Keep in mind FR4: Confirm or dismiss new order. You have to allow user to confirm or dismiss the order before sending it to the backend.
If the order is in the state 'pending', the customer can edit or remove the products included or remove the whole order. The delivery address can also be modified in the state 'pending'.
If the order is in the state 'sent' or 'delivered' no edition is allowed.
- Accept the group project assignment of your github classroom if you have not done it before. Once you accepted it, you will have your own copy of this project template.
- Clone your private repository at your local development environment by opening VScode and clone it by opening Command Palette (Ctrl+Shift+P or F1) and
Git clone
this repository, or using the terminal and running
git clone <url>
It may be necessary to setup your github username by running the following commands on your terminal:
git config --global user.name "FIRST_NAME LAST_NAME"
git config --global user.email "[email protected]"
In case you are asked if you trust the author, please select yes.
-
Setup your environment file. As explained in labs, it is needed to create a copy of the
.env.example
file, name it.env
and include your environment variables values, specially your API_BASE_URL (usually http://localhost:3000 to run the app in the web browser of the same computer).- If you want to connect from your mobile device to your backend, http://localhost:3000 will NOT work because the backend is not running on your mobile device. In order to run your frontend on your device follow these steps:
- Check your backend server ip by running:
ipconfig
(orifconfig
for Linux and MacOS), in home networks it usually follows the 192.168.YYY.XXX pattern. - Update the
.env
API_BASE_URL
property with your backend server ip and port, for instance: http://192.168.YYY.XXX:3000 - Expo tools caches old
.env
properties' values, so you have to explicitly run the following commands to remove cached values:- stop frontend (Ctrl+C)
- remove
.expo
folder in your project root folder - run
expo r -c
- NOTE: Everytime you make any modification on your
.env
(for instance, if your backend server IP changes) file you will need to run these steps again.
- Check your backend server ip by running:
- If you want to connect from your mobile device to your backend, http://localhost:3000 will NOT work because the backend is not running on your mobile device. In order to run your frontend on your device follow these steps:
-
Install dependencies. Run
npm install
to download and install packages to the current project folder. -
Run your DeliverUS backend app.
-
Run this project (Template of frontend for customers) by running
npm start
. Follow the instructions in the terminal.