Food Pick-up Ordering is a full stack web application built with Node.js and Express.js that allows users to create pick up orders for their favorite restaurants.
Final Product • Dependencies • Getting Started • Deployment • Authors • Acknowledgement
- Home Page:
- Designed with Bootstrap and CSS
- Cool features: a spinning animation of our FoodWise logo, and carousel with multiple restaurant logos
- Menu page (Customer view):
- Stripe payment (add a new credit card or use a stored credit card)
- Custom middleware to protect routes
- Restaurant owner (Rstaurant view):
- Ordering system powered by a real-time, bi-directional communication (Socket.io)
- Live in-app notification with Socket.io
- Schedule jobs for execution at specific dates (node-schedule)
- SMS Message (notification):
- SMS communication through a modern telecomm API (Twilio)
Dependencies
- Node.js
- Express
- EJS
- bcryptjs
- cookie-session
- chalk
- dotenv
- morgan
- node-schedule
- pg
- socket.io
- stripe
- twilio
- jQuery
Dev-dependencies
The PostgreSQL schema ERD:
Prerequisites:
Server:
- Connect to your postgres server
$ psql -U vagrant -d template1
- Create the necessary objects in the Database
$ CREATE ROLE labber WITH LOGIN password 'labber';
$ CREATE DATABASE midterm OWNER labber;
- Create a folder and clone this repository
$ git clone https://github.com/tienviet10/Food-Pickup.git
- Move to the correct directory
$ cd Food-Pickup
- Install dependencies
$ npm install
- Create a .env file according to the template below
STRIPE_PRIVATE_KEY=
SESSIONKEY1=
SESSIONKEY2=
TWILIO_ACCOUNT_SID=
TWILIO_AUTH_TOKEN=
TWILIO_PHONE=
DB_HOST=localhost
DB_USER=labber
DB_PASS=labber
DB_NAME=midterm
DB_PORT=5432
API=http://localhost:8080/
- Reset the database
$ npm run db:reset
- Run the development web server
$ npm run local
- Deployed to Railway.app
- Postgres Database hosted by Railway.app.
- Home page and restaurant page was created based on a template designed by HTML Codex and distributed by ThemeWagon.
- Login page and registration page were created based on a template designed by Rok Krivec