A robust full-stack MERN (MongoDB, Express.js, React, Node.js) application that revolutionizes the restaurant food ordering experience. This comprehensive system serves three distinct user types: customers, restaurant administrators, and system administrators, providing a seamless platform for food ordering, restaurant management, and system administration.
- Restaurant Discovery: Browse and search through a diverse selection of restaurants
- Interactive Menu: View detailed menus with high-quality food images and descriptions
- Smart Cart Management: Easily add, remove, and modify items in your cart
- Location Services: Find nearby restaurants with integrated map functionality
- Personalization:
- Save favorite restaurants for quick access
- View detailed order history
- Write and read restaurant reviews
- Manage profile settings
- Secure Payments: Integrated Razorpay payment gateway for safe transactions
- Real-time Updates: Track order status from placement to delivery
- Comprehensive Dashboard: Monitor and manage restaurant operations
- Menu Management:
- Add, edit, and remove menu items
- Update prices and availability
- Manage food categories
- Order Processing:
- Real-time order notifications
- Update order status
- View order history
- Business Insights: Access analytics and performance metrics
- Profile Management: Update restaurant information, hours, and contact details
- User Management: Monitor and manage all user accounts
- Restaurant Oversight: Review and manage restaurant registrations
- System Monitoring: Track overall platform performance
- Analytics Dashboard: Access system-wide statistics and reports
- Core: React 19.1.0 with Vite 7.0.0
- Routing: React Router for seamless navigation
- State Management: React Context API
- UI Components: Custom components with React Icons
- Maps Integration: Leaflet for location services
- Styling: CSS with responsive design
- Server: Node.js with Express.js
- Database: MongoDB with Mongoose ODM
- Authentication: Firebase Authentication
- Payment Processing: Razorpay Integration
- API Security: CORS enabled
- Version Control: Git
- Package Management: npm
- Build Tool: Vite
- API Testing: Postman
project/
├── app.js # Express server configuration
├── package.json # Project dependencies and scripts
├── client/ # Frontend React application
│ ├── src/
│ │ ├── ADMIN/ # Admin dashboard components
│ │ ├── FoodItems/ # Food item management
│ │ ├── Home_page/ # Homepage components
│ │ ├── Login/ # Authentication components
│ │ ├── Orders/ # Order management
│ │ ├── Restaurant/ # Restaurant management
│ │ ├── ReviewPage/ # Review components
│ │ ├── User/ # User management
│ │ └── utils/ # Utility functions
├── models/ # MongoDB schemas
│ ├── FoodItem.js # Food item model
│ ├── Order.js # Order model
│ ├── Restaurant.js # Restaurant model
│ ├── Review.js # Review model
│ └── User.js # User model
└── routes/ # API routes
├── FoodItemController.js
├── orderRoutes.js
├── paymentRoutes.js
├── RestaurantController.js
├── reviewRoutes.js
└── UserController.js
- Node.js (LTS version)
- MongoDB Atlas account
- npm or yarn
- Firebase account
- Razorpay account
-
Clone the repository: ```bash git clone [repository-url] cd project ```
-
Install backend dependencies: ```bash npm install ```
-
Install frontend dependencies: ```bash cd client npm install ```
-
Environment Setup:
Create `.env` in the root directory: ``` DB_URL=your_mongodb_connection_string PORT=8000 ```
Create `.env` in the client directory: ``` FIREBASE_API_KEY=your-firebase-api-key FIREBASE_AUTH_DOMAIN=your-firebase-auth-domain FIREBASE_PROJECT_ID=your-firebase-project-id RAZORPAY_KEY_ID=your-razorpay-key-id ```
-
Start the backend server: ```bash npm start ```
-
Start the frontend development server: ```bash cd client npm run dev ```
Access the application:
- Frontend: http://localhost:5173
- Backend API: http://localhost:8000
- Authentication: Secure user authentication via Firebase
- Authorization: Role-based access control for different user types
- Data Protection:
- Input validation and sanitization
- CORS protection
- Protected API routes
- Payment Security: PCI-compliant payment processing through Razorpay
- Data Privacy: Secure handling of user and business data
GET /api/restaurants- List all restaurantsPOST /api/restaurants- Create restaurantGET /api/restaurants/:id- Get restaurant detailsPUT /api/restaurants/:id- Update restaurant
GET /api/foodItems- List all itemsPOST /api/foodItems- Add new itemGET /api/foodItems/:id- Get item detailsPUT /api/foodItems/:id- Update item
POST /api/orders- Create orderGET /api/orders/:id- Get order detailsPUT /api/orders/:id- Update order status
POST /api/users- Register userGET /api/users/:id- Get user profilePUT /api/users/:id- Update profile
POST /api/reviews- Add reviewGET /api/reviews/:restaurantId- Get restaurant reviews
-
Enhanced Order Experience
- Real-time order tracking
- Delivery time estimation
- In-app chat support
-
Business Intelligence
- Advanced analytics dashboard
- Sales forecasting
- Customer behavior analysis
-
Platform Expansion
- Mobile application development
- Multi-language support
- Dark mode support
-
Technical Improvements
- Enhanced search functionality
- Performance optimization
- Automated testing implementation