Skip to content

IISSI2-IS-2022-2023/DeliverUS-Frontend-Customer-Template

 
 

Repository files navigation

DeliverUS - Project Requirements

Introduction

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:

2nd Deliverable:

FR1: Restaurants listing.

List restaurants and enable customers to navigate to restaurant details so they can create and place a new order

FR7: Show top 3 products.

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.

FR2: Restaurants details and menu.

Customers will be able to query restaurants details and the products offered by them.

FR5: Listing my confirmed orders.

A Customer will be able to check his/her confirmed orders, sorted from the most recent to the oldest.

FR6: Show order details.

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.

FR3: Add, edit and remove products to a new order.

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.

3rd Deliverable:

FR8: Edit/delete order

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.

Frontend deployment steps:

  1. 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.
  2. 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.

  1. 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 (or ifconfig 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.
  2. Install dependencies. Run npm install to download and install packages to the current project folder.

  3. Run your DeliverUS backend app.

  4. Run this project (Template of frontend for customers) by running npm start. Follow the instructions in the terminal.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 99.6%
  • Shell 0.4%