Skip to content

AmitIngAI/FoodDelivery-MERN-Platform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ• FoodDelivery Pro - MERN Platform

Full-Stack Food Delivery System with Multi-Role Architecture

MERN Stack React Node.js Express MongoDB Redux Material-UI License: MIT

Live Demo


πŸ“‹ Table of Contents


🌟 Overview

FoodDelivery Pro is a production-ready, full-stack food delivery platform built with the MERN stack (MongoDB, Express.js, React, Node.js). Designed for real-world use cases, it features a sophisticated multi-role system supporting Customers, Restaurants, and Delivery Partners with distinct dashboards and workflows.

🎯 Problem Statement

Traditional food delivery platforms struggle with:

  • ❌ Complex role management
  • ❌ Poor real-time order tracking
  • ❌ Inefficient restaurant-customer-delivery coordination
  • ❌ Limited scalability
  • ❌ Security vulnerabilities

πŸ’‘ Our Solution

FoodDelivery Pro delivers:

  • βœ… Multi-Role Authentication - JWT-based secure auth for 3 user types
  • βœ… Real-Time Updates - Live order tracking and status updates
  • βœ… Smart Cart Management - Restaurant-specific cart with validation
  • βœ… Professional UI/UX - Material-UI + Framer Motion animations
  • βœ… RESTful API - Clean, documented backend architecture
  • βœ… State Management - Redux Toolkit with async thunks
  • βœ… Responsive Design - Mobile-first approach

✨ Key Features

πŸ›οΈ Customer Portal

πŸ” Authentication

  • JWT-based secure login
  • Role-based access control
  • Password encryption (bcrypt)
  • Remember me functionality
  • Smart form validation

πŸ” Food Ordering

  • Browse restaurants by cuisine
  • Advanced search & filters
  • Restaurant details & menu
  • Add to cart with customizations
  • Real-time stock availability
  • Multiple address management

πŸ“¦ Order Management

  • Place orders with multiple items
  • Multiple payment methods
  • Order history tracking
  • Real-time order status
  • Cancel orders
  • Reorder functionality
  • Download invoices

❀️ Additional Features

  • Favorite restaurants
  • Restaurant reviews & ratings
  • Order notifications
  • Profile management
  • Address book
  • Order tracking map

πŸͺ Restaurant Dashboard

Feature Description
πŸ“Š Dashboard Sales overview, pending orders, analytics
πŸ• Menu Management Add/Edit/Delete menu items, categories, pricing
πŸ“¦ Order Processing Accept/Reject orders, update status, view history
πŸ“ˆ Analytics Revenue tracking, popular items, customer insights
βš™οΈ Settings Business hours, delivery settings, profile

πŸš— Delivery Partner Dashboard

  • Order Assignment - View available delivery orders
  • Earnings Tracker - Daily, weekly, monthly earnings
  • Active Delivery - Real-time delivery tracking
  • Order History - Completed deliveries
  • Profile Management - Update vehicle info, availability

## πŸ‘₯ Multi-Role System
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ User Roles β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ β”‚
β”‚ πŸ‘€ CUSTOMER πŸͺ RESTAURANT β”‚
β”‚ β€’ Browse & Order β€’ Manage Menu β”‚
β”‚ β€’ Track Orders β€’ Process Orders β”‚
β”‚ β€’ Manage Profile β€’ View Analytics β”‚
β”‚ β€’ Add Favorites β€’ Business Settings β”‚
β”‚ β”‚
β”‚ πŸš— DELIVERY PARTNER β”‚
β”‚ β€’ Accept Deliveries β”‚
β”‚ β€’ Track Earnings β”‚
β”‚ β€’ Update Availability β”‚
β”‚ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜



## πŸ› οΈ Tech Stack

### **Backend:**
β”œβ”€β”€ Runtime & Framework
β”‚ β”œβ”€β”€ Node.js 18.x
β”‚ β”œβ”€β”€ Express.js 4.18
β”‚ └── REST API Architecture
β”‚
β”œβ”€β”€ Database
β”‚ β”œβ”€β”€ MongoDB 6.0
β”‚ β”œβ”€β”€ Mongoose ODM
β”‚ └── MongoDB Atlas (Production)
β”‚
β”œβ”€β”€ Authentication & Security
β”‚ β”œβ”€β”€ JWT (jsonwebtoken)
β”‚ β”œβ”€β”€ bcryptjs (Password Hashing)
β”‚ β”œβ”€β”€ express-validator
β”‚ β”œβ”€β”€ helmet (Security Headers)
β”‚ β”œβ”€β”€ cors
β”‚ └── rate-limiter
β”‚
└── Tools & Utilities
β”œβ”€β”€ dotenv (Environment Variables)
β”œβ”€β”€ morgan (Logging)
└── nodemon (Development)


### **Frontend:**
β”œβ”€β”€ Core Framework
β”‚ β”œβ”€β”€ React 18.2
β”‚ β”œβ”€β”€ React Router DOM 6.20
β”‚ β”œβ”€β”€ Redux Toolkit 1.9
β”‚ └── React Hooks
β”‚
β”œβ”€β”€ UI & Styling
β”‚ β”œβ”€β”€ Material-UI (MUI) 5.14
β”‚ β”œβ”€β”€ Framer Motion 10.16 (Animations)
β”‚ β”œβ”€β”€ React Icons
β”‚ β”œβ”€β”€ Swiper.js (Carousels)
β”‚ └── Custom CSS with CSS Variables
β”‚
β”œβ”€β”€ HTTP & State
β”‚ β”œβ”€β”€ Axios 1.6
β”‚ β”œβ”€β”€ Redux Persist
β”‚ └── React Toastify
β”‚
└── Build Tools
β”œβ”€β”€ Create React App
β”œβ”€β”€ Webpack 5
└── Babel


---

## πŸ—οΈ System Architecture
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ CLIENT LAYER β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚ β”‚ React Web β”‚ β”‚ Admin Panel β”‚ β”‚
β”‚ β”‚ (Port 3000) β”‚ β”‚ (Port 3001) β”‚ β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚ β”‚ β”‚ β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚ β”‚ β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚ β”‚ Axios HTTP β”‚ β”‚
β”‚ β”‚ (API Calls) β”‚ β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ SERVER LAYER β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚ β”‚ Express.js REST API (Port 5000) β”‚ β”‚
β”‚ β”‚ β”‚ β”‚
β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚
β”‚ β”‚ β”‚ API Routes & Controllers β”‚ β”‚ β”‚
β”‚ β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ β”‚
β”‚ β”‚ β”‚ /api/auth - Authentication β”‚ β”‚ β”‚
β”‚ β”‚ β”‚ /api/users - User Management β”‚ β”‚ β”‚
β”‚ β”‚ β”‚ /api/restaurants - Restaurants β”‚ β”‚ β”‚
β”‚ β”‚ β”‚ /api/menu - Menu Items β”‚ β”‚ β”‚
β”‚ β”‚ β”‚ /api/orders - Order Processing β”‚ β”‚ β”‚
β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚
β”‚ β”‚ β”‚ β”‚
β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚
β”‚ β”‚ β”‚ Middleware Layer β”‚ β”‚ β”‚
β”‚ β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ β”‚
β”‚ β”‚ β”‚ β€’ JWT Authentication β”‚ β”‚ β”‚
β”‚ β”‚ β”‚ β€’ Role Authorization β”‚ β”‚ β”‚
β”‚ β”‚ β”‚ β€’ Error Handling β”‚ β”‚ β”‚
β”‚ β”‚ β”‚ β€’ Input Validation β”‚ β”‚ β”‚
β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ DATABASE LAYER β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚ β”‚ MongoDB Database β”‚ β”‚
β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚
β”‚ β”‚ Collections: β”‚ β”‚
β”‚ β”‚ β€’ users - User accounts β”‚ β”‚
β”‚ β”‚ β€’ restaurants - Restaurant data β”‚ β”‚
β”‚ β”‚ β€’ menuitems - Food items β”‚ β”‚
β”‚ β”‚ β€’ orders - Order records β”‚ β”‚
β”‚ β”‚ β€’ reviews - Customer reviews β”‚ β”‚
β”‚ β”‚ β€’ deliverypersons - Delivery partners β”‚ β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜


---

## πŸš€ Getting Started

### **Prerequisites**

| Software | Version | Download Link |
|----------|---------|---------------|
| 🟒 **Node.js** | 18+ | [Download](https://nodejs.org/) |
| πŸƒ **MongoDB** | 6.0+ | [Download](https://www.mongodb.com/try/download/community) |
| πŸ“¦ **npm** | 9+ | Included with Node.js |
| πŸ”§ **Git** | Latest | [Download](https://git-scm.com/) |

πŸ“Έ Screenshots 🏠 Home Page dashboard

πŸ” Login Page login page

πŸ›’ Cart cart

πŸ“Š Restaurant Dashboard restaurant dashboard

πŸ“Š Restaurant Menu Restaurant menu

πŸš— Delivery Dashboard delivery partner

πŸ”’ Security Features
βœ… JWT Authentication - Secure token-based auth
βœ… Password Hashing - bcrypt with salt rounds
βœ… Input Validation - Prevent SQL injection, XSS
βœ… CORS Configuration - Restricted cross-origin requests
βœ… Rate Limiting - Prevent brute force attacks
βœ… Helmet.js - Security HTTP headers
βœ… Environment Variables - Sensitive data protection

🀝 Contributing Contributions are welcome!

πŸ“„ License This project is licensed under the MIT License - see the LICENSE file for details.

πŸ‘¨β€πŸ’» Amit Ingale

πŸ“ž Contact
Developer Information


Gmail LinkedIn GitHub Portfolio



⭐ Show Your Support
If this project helped you, please consider giving it a ⭐!

About

πŸ• Full-Stack Food Delivery Platform | MERN Stack + Redux | Real-time Order Tracking | Multi-Role Authentication (Customer/Restaurant/Delivery) | Professional UI/UX | Production Ready

Topics

Resources

License

Stars

Watchers

Forks

Contributors