Skip to content

jascxx/Food-Delivery-Service-App

Repository files navigation

Food-Delivery-Service-App

CS2102 Project

Team Members: Chen Hui, Jason Sathya Citro, Lim Jun Kuang Lionel, Lin Yuting

Introduction

A Food Delivery Service App for Customers, Delivery Riders, Restaurant Staff and FDS Manager.

Homepagear

Home page


Database

Final-Schema

Entity Relationship Diagram

View our full project report for more detailed information

The database has been loaded with randomised and correct data exceeding 120,000 orders.

Tools

  • ReactJS
  • Axios
  • Flask
  • psycopg2
  • PostgreSQL

Setup

Requirements: Have PostgreSQL installed

  1. Clone the repo.
git clone https://github.com/jascxx/Food-Delivery-Service-App.git
  1. Change directory to frontend. Install NPM Packages.
cd frontend
npm install
  1. Start the React Web App. This starts the web client on localhost:3000.
npm start
  1. Change directory to webservice and install flask and psycopg2 packages.
cd ../webservice
pip3 install flask
pip3 install psycopg2==2.7.6
  1. Run webserver.
python3 app.py
  1. Change directory to csvGenerator and generate csv data.
cd csvGenerator
python3 init_customers_users.py
python3 generate_orders.py
  1. Allow some time to load the data. (No longer than 30 seconds)

  2. Change directory to backend. Run psql on localhost on port 5432.

  3. You need to supply your own username and password for psql.

cd ../../backend
psql -h localhost -p 5432 --u [username]
[input password]
  1. Create database and connect to database.
CREATE DATABASE fds;
\c fds
  1. Initialise data. (Make sure you are at backend directory)
\i init.sql
  1. Allow some time to load the data. (No longer than 30 seconds)

  2. FDS should now be operating. If the database is initialized correctly, you should be able to login with existing accounts or create a new account. Existing accounts all have username as their password. You may try logging in using the sample accounts listed below which have data pre-loaded.

Sample Customer UserID: Emma
Sample Customer password: Emma
  1. If you tried to register on localhost:3000 but failed, go to webservice/db.py and manually type in your psql username and password there, as shown in the picture below.
cd webservice/db.py

db.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published