A full-stack food delivery application built with React, Express, and MongoDB. The platform connects customers, restaurants, riders, and admins in a seamless food ordering ecosystem.
- Project Overview
- Available Features
- Tech Stack
- Missing/Required Features
- Installation & Setup
- API Endpoints
Cravings is a comprehensive food delivery platform with role-based access and multi-user functionality:
- Customer: Browse restaurants, view menus, place orders, track delivery, manage profile
- Restaurant Manager: Manage menu items, view orders, track earnings, manage restaurant profile
- Rider: Accept delivery orders, track deliveries (structure in place)
- Admin: Manage the platform, view analytics, manage users (structure in place)
Base URL: http://localhost:5000 (Backend) | http://localhost:5173 (Frontend)
| Feature | Details | Status |
|---|---|---|
| User Registration | Register as Customer, Restaurant Manager, Rider, or Admin with email/password | β Working |
| User Login | Secure login with JWT token generation, cookies stored | β Working |
| User Logout | Clear authentication token and session data | β Working |
| Forgot Password | OTP-based password reset via email | β Working |
| OTP Generation | Generate OTP and send via email for verification | β Working |
| OTP Verification | Verify OTP before password reset | β Working |
| JWT Token Management | Secure token generation and validation | β Working |
| Role-Based Access Control | Middleware-based access control for user roles | β Working |
Endpoints:
POST /auth/register- User registrationPOST /auth/login- User loginGET /auth/logout- LogoutPOST /auth/genOtp- Generate OTPPOST /auth/verifyOtp- Verify OTPPOST /auth/forgetPasword- Reset password
| Feature | Details | Status |
|---|---|---|
| Profile Management | Update personal information (name, email, phone, DOB, gender, address, city, PIN) | β Working |
| Profile Photo Upload | Upload and change profile picture with Cloudinary integration | β Working |
| Password Reset | Change password after login | β Working |
| Geolocation | Store latitude/longitude for delivery tracking | β Working |
| Payment Details | Store UPI, bank account, IFSC code | β Working |
| Document Management | Support for PAN, GST, FSSAI, RC, DL, UIDAI documents | β Working |
| User Dashboard | View profile, orders, transactions | β UI Ready |
| User Overview | Quick stats and summary | β UI Ready |
| Order History | View all past orders | β UI Ready |
| Transaction History | View payment transactions | β UI Ready |
| Help/Support Desk | Contact support via help desk interface | β UI Ready |
Endpoints:
PUT /user/update- Update user profilePATCH /user/changePhoto- Upload profile photoPATCH /user/resetPassword- Change password
| Feature | Details | Status |
|---|---|---|
| Menu Management | Add, edit, view, and manage menu items | β Working |
| Menu Item Creation | Add new menu items with images, price, type (veg/non-veg), details | β Working |
| Menu Item Editing | Update existing menu items with new images and details | β Working |
| Menu Item View | Browse all menu items for the restaurant | β Working |
| Item Availability | Mark items as available/unavailable/removed | β Working |
| Multiple Food Types | Support: Veg, Non-Veg, Vegan, Egg, Jain, Gluten-Free, Contains-Nuts, Dairy | β Working |
| Image Upload | Upload up to 5 images per menu item via Cloudinary | β Working |
| Restaurant Profile | Manage restaurant details (name, cuisine, opening hours, location) | β Working |
| Password Reset | Change restaurant manager password | β Working |
| Profile Photo | Upload restaurant profile picture | β Working |
| Restaurant Dashboard | View all dashboard components | β UI Ready |
| Orders Management | View and manage incoming orders | β UI Ready |
| Earnings Tracking | Track daily/weekly/monthly earnings | β UI Ready |
| Help Desk | Customer support interface | β UI Ready |
Endpoints:
POST /restaurant/addMenuItem- Add new menu itemGET /restaurant/menuItems- Get all menu itemsPUT /restaurant/updateMenuItem/:id- Update menu itemPUT /restaurant/update- Update restaurant profilePATCH /restaurant/changePhoto- Upload restaurant photoPATCH /restaurant/resetPassword- Change password
| Feature | Details | Status |
|---|---|---|
| Browse Restaurants | View all available restaurants without login | β Working |
| View Restaurant Menu | Browse menu items with pagination (2 items per page) | β Working |
| Contact Support | Submit contact form with name, email, phone, message | β Working |
| Restaurant Display | View restaurant details and menu items | β UI Ready |
| Search Restaurants | Filter by cuisine or restaurant name | β UI Ready |
Endpoints:
GET /public/allRestaurants- Get all restaurantsGET /public/restaurant-menu/:id/:page- Get restaurant menu with paginationPOST /public/new-contact- Submit contact form
| Feature | Details | Status |
|---|---|---|
| Rider Dashboard | View assigned deliveries | β UI Ready |
| Delivery Tracking | Track delivery orders in real-time | β³ Backend Incomplete |
| Order Acceptance | Accept/reject delivery orders | β³ Backend Incomplete |
| Feature | Details | Status |
|---|---|---|
| Admin Dashboard | Overview of platform statistics | β UI Ready |
| User Management | View and manage all users | β³ Backend Incomplete |
| Order Management | View all orders on platform | β³ Backend Incomplete |
| Analytics | View platform analytics and reports | β³ Backend Incomplete |
| Page | Purpose | Status |
|---|---|---|
| Home | Landing page with featured restaurants and popular dishes | β Ready |
| About | About the platform | β Ready |
| Contact | Contact form | β Ready |
| Login | User login page | β Ready |
| Register | User registration page | β Ready |
| OrderNow | Browse and filter restaurants/menus | β Ready |
| RestaurantDisplayMenu | View restaurant menu in detail | β Ready |
| UserDashboard | Customer dashboard with multiple tabs | β Ready |
| RestaurantDashboard | Restaurant manager dashboard | β Ready |
| RiderDashboard | Rider dashboard (UI only) | β Ready |
| AdminDashboard | Admin panel (UI only) | β Ready |
| NotFound | 404 error page | β Ready |
| Feature | Details | Status |
|---|---|---|
| Database | MongoDB with Mongoose ORM | β Working |
| Authentication | JWT-based with HTTP-only cookies | β Working |
| Password Security | BCrypt hashing with salt rounds (10) | β Working |
| Email Service | Nodemailer integration for OTP and notifications | β Working |
| Image Upload | Cloudinary integration for image storage | β Working |
| Form Validation | Server-side validation for all inputs | β Working |
| Error Handling | Centralized error handling middleware | β Working |
| CORS | Cross-origin request handling | β Working |
| Request Logging | Morgan HTTP request logging | β Working |
| State Management | React Context API for auth state | β Working |
| Routing | React Router v7 for frontend navigation | β Working |
| Notifications | React Hot Toast for user feedback | β Working |
| Styling | Tailwind CSS framework | β Working |
| Icons | React Icons library | β Working |
- React 19.2.0 - UI framework
- Vite 7.2.4 - Build tool
- React Router DOM 7.12.0 - Routing
- Tailwind CSS 4.1.18 - Styling
- Axios 1.13.2 - HTTP client
- React Hot Toast 2.6.0 - Notifications
- React Icons 5.5.0 - Icon library
- ESLint - Code linting
- Express 5.2.1 - Web framework
- MongoDB with Mongoose 9.1.2 - Database
- JWT - Authentication
- BCrypt 6.0.0 - Password hashing
- Cloudinary 2.9.0 - Image storage
- Nodemailer 7.0.13 - Email service
- Multer 2.0.2 - File upload
- Morgan 1.10.1 - HTTP logging
- Cookie Parser 1.4.7 - Cookie handling
- CORS 2.8.5 - Cross-origin handling
- Dotenv 17.2.3 - Environment variables
- Nodemon 3.1.11 (Dev) - Auto-reload
The following features are essential for a complete food delivery platform but are currently NOT implemented:
- Order Model: Schema for storing order details (items, quantity, total, status)
- Create Order: API to create new orders from cart
- Order Tracking: View order status (placed, confirmed, preparing, on-way, delivered)
- Order History: Retrieve user's past orders with details
- Order Updates: Update order status at different stages
- Order Cancellation: Allow cancellation with refund logic
- Order Notifications: Notify users of status changes
- Restaurant Order Queue: View incoming orders for restaurants
- Payment Gateway Integration: Stripe, Razorpay, or PayPal integration
- Payment Methods: Support multiple payment types (card, UPI, wallet)
- Transaction Recording: Store all transaction records
- Refund Process: Handle refunds for cancelled orders
- Invoice Generation: Generate invoices for orders
- Rider Onboarding: Complete rider registration workflow
- Order Assignment: Auto-assign orders to nearby riders
- Real-time Tracking: Live GPS tracking of deliveries
- Delivery Status: Update delivery status (assigned, picked-up, delivered)
- Rider Rating: Rate riders on delivery quality
- Delivery Analytics: Track delivery performance metrics
- Restaurant Rating: Rate restaurants (1-5 stars)
- Food Reviews: Write reviews for menu items
- Rider Rating: Rate rider performance
- Review Display: Show ratings and reviews on restaurant/menu pages
- Average Rating Calculation: Display avg rating for restaurants
- Restaurant Search: Search by name, cuisine, location
- Menu Search: Search menu items by name
- Filters: Filter by rating, delivery time, price range, cuisine type
- Sorting: Sort by rating, price, delivery time
- Pagination: Implement proper pagination for results
- Save Favorites: Save favorite restaurants/dishes
- View Wishlist: Display saved items with quick access
- Remove from Wishlist: Remove items from saved list
- Multiple Addresses: Save multiple delivery addresses
- Primary Address: Set default delivery address
- Address Validation: Verify delivery address for coverage area
- Location Suggestions: Auto-complete address suggestions
- Promo Code System: Create and manage promotional codes
- Discount Application: Apply discounts to orders
- Coupon Management: Track coupon usage and validity
- Restaurant Discounts: Special offers from restaurants
- Real-time Notifications: WebSocket for instant updates
- Email Notifications: Send order updates via email
- SMS Notifications: Send updates via SMS (Twilio/AWS)
- In-app Notifications: Display notifications in app
- Admin Dashboard Stats: Total orders, revenue, users, restaurants
- Restaurant Analytics: Daily/weekly/monthly earnings, top items
- User Behavior Analytics: Tracking popular restaurants/dishes
- Reports Generation: Download reports in PDF/CSV
- User Management: View, edit, suspend users
- Restaurant Verification: Approve/reject new restaurants
- Order Monitoring: Monitor all orders on platform
- Support Tickets: Manage customer support requests
- System Settings: Configure platform settings
- Add to Cart: Add items with quantity
- Update Cart: Modify item quantities
- Remove from Cart: Delete items from cart
- Cart Persistence: Save cart across sessions
- Cart Summary: Display total items and price
- Browser Push: Browser push notifications
- Mobile Push: Mobile app push notifications (if mobile app exists)
- 2FA Setup: Enable two-factor authentication
- TOTP Support: Time-based one-time password
- Backup Codes: Generate backup codes
- OTP via SMS: Send OTP through SMS instead of email
- Order Updates via SMS: Send order status via SMS
- Node.js v16+
- MongoDB instance running
- Cloudinary account (for image upload)
- Email service credentials (Nodemailer)
cd server
npm install
# Create .env file with:
PORT=5000
MONGODB_URI=your_mongodb_uri
JWT_SECRET=your_jwt_secret
CLOUDINARY_NAME=your_cloudinary_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret
EMAIL_USER=your_email@gmail.com
EMAIL_PASSWORD=your_email_password
npm run devcd client
npm install
npm run devFrontend will be available at http://localhost:5173
Backend will be available at http://localhost:5000
POST /auth/register - Register new user
POST /auth/login - Login user
GET /auth/logout - Logout user
POST /auth/genOtp - Generate OTP
POST /auth/verifyOtp - Verify OTP
POST /auth/forgetPasword - Reset password
GET /public/allRestaurants - Get all restaurants
GET /public/restaurant-menu/:id/:page - Get restaurant menu
POST /public/new-contact - Submit contact form
PUT /user/update - Update user profile
PATCH /user/changePhoto - Upload profile photo
PATCH /user/resetPassword - Change password
POST /restaurant/addMenuItem - Add menu item
GET /restaurant/menuItems - Get all menu items
PUT /restaurant/updateMenuItem/:id - Update menu item
PUT /restaurant/update - Update restaurant profile
PATCH /restaurant/changePhoto - Upload restaurant photo
PATCH /restaurant/resetPassword - Change password
- fullName, email, mobileNumber, password, role
- dob, gender, address, city, pin, photo
- geoLocation (lat, lon)
- restaurantName, cuisine (for restaurant managers)
- paymentDetails (upi, account_number, ifs_Code)
- documents (gst, fssai, rc, dl, uidai, pan)
- resturantID, itemName, cuisine
- type (veg/non-veg/vegan/egg/jain/gluten-free/contains-nuts/dairy)
- servingSize, preparationTime, description, price
- availability (available/unavailable/removed)
- images (url, publicID)
- fullName, email, mobileNumber, message
- timestamps
- For OTP generation and verification during password reset
Cravings/
βββ client/ # React Frontend
β βββ src/
β β βββ components/ # Reusable components
β β β βββ userDashboard/ # User dashboard components
β β β βββ restaurantDashboard/ # Restaurant dashboard components
β β β βββ publicModals/ # Public modals
β β β βββ Header.jsx
β β β βββ Footer.jsx
β β β βββ Loading.jsx
β β βββ pages/ # Page components
β β β βββ dashboards/ # Dashboard pages
β β β βββ Home.jsx
β β β βββ Login.jsx
β β β βββ Register.jsx
β β β βββ ...
β β βββ config/ # Configuration
β β βββ context/ # React Context
β β βββ App.jsx
β β βββ main.jsx
β βββ package.json
β βββ vite.config.js
β
βββ server/ # Express Backend
β βββ src/
β β βββ config/ # Configuration files
β β β βββ db.js # MongoDB connection
β β β βββ cloudinary.js # Cloudinary setup
β β β βββ email.js # Email configuration
β β βββ controllers/ # Route handlers
β β βββ middlewares/ # Custom middlewares
β β βββ models/ # MongoDB schemas
β β βββ routers/ # API routes
β β βββ utils/ # Utility functions
β β βββ seeders/ # Database seeders
β βββ index.js # Entry point
β βββ package.json
β
βββ README.md # This file
To implement missing features, follow these steps:
- Create a new branch for your feature
- Implement the feature with proper validation
- Add comprehensive error handling
- Test thoroughly before submitting
- Update this README with new features
ISC License - Free to use
Created by Raj Vardhan
For issues, questions, or feature requests, please contact through the platform's help desk or contact form.
Last Updated: February 12, 2026 Version: 1.0.0 (Features Documented)
| Category | Total Features | Implemented | Missing | Status |
|---|---|---|---|---|
| Authentication | 8 | 8 | 0 | β Complete |
| User Management | 10 | 10 | 0 | β Complete |
| Restaurant Management | 13 | 13 | 0 | β Complete |
| Public Features | 5 | 5 | 0 | β Complete |
| Order Management | 8 | 0 | 8 | β³ NOT STARTED |
| Payment Processing | 5 | 0 | 5 | β³ NOT STARTED |
| Delivery/Rider | 6 | 0 | 6 | β³ NOT STARTED |
| Ratings & Reviews | 5 | 0 | 5 | β³ NOT STARTED |
| Search & Filter | 4 | 0 | 4 | β³ NOT STARTED |
| Cart System | 5 | 0 | 5 | β³ NOT STARTED |
| 69 | 42 | 27 | 61% Complete |