/Food-Ordering-System

This is a Order Placement System, This application has 3 roles (i.e Guest, Customer, Admin). The Customer can register and Order any Food item, access all his past orders but can not access the orders of other customers. The admin can access the orders and information of all the users. It also stores sessions/cookies.

Primary LanguageJavaScript

Coverage Status NPM Build Status

Installation Guidlines

STEP 1

  git clone https://github.com/payalpatra/Food-Ordering-System.git

STEP 2

  npm install

STEP 3

Create .env file in the root directory and add your MongoDB Database Connection Url & Cookie secret with the following variable name
COOKIE_SECRET = thisismysecret
DB_CONNECTION = ""

STEP 4

(Make sure you run both this on the root directory of the Project File)
  • Starting The Server
  nodemon server 
  • Compiling sass & js files
 npm run watch

STEP 5

Since the whole Menu Section data is dynamically pulled from the Database. Add the json data to the Database (items collection). The project folder consists of a menus.json file. Copy the whole data set and add it to the items collection of the Database.

How to get access to the Admin Role ??

After Successfull Setup, Register as a user (by default your role will be Customer). Then replace the role of the user manually as the " admin " in the Database.(users collection).

Users Role

Route to admin orders page ??

Make sure you login through the admin account (it's protected and can't be accessed other than admin role) , After Successful login you can access the admin orders page with this route http://localhost:3000/admin/orders

Snapshots

Home Page

Home

Menu Page

menu

Order Placing Page

placeorder

Customer's Orders Page

customer panel

Admin Orders Page

admin panel

Empty Cart Page

empty cart

Give this a ✨ if you like it 😊

Author

Payal Patra

Let's Connect 🚀

payalpatra105 payalpatra105 p_iconic_