A comprehensive restaurant menu management system with an admin dashboard and customer-facing menu board.
This project consists of:
- Backend API: Node.js + Express.js + Sequelize (MySQL)
- Frontend: React.js with Material-UI
- Database: MySQL
Before you begin, ensure you have the following installed:
- Node.js (v14 or higher)
- MySQL (v5.7 or higher)
- npm or yarn
- Start your MySQL server
- Open MySQL command line or MySQL Workbench
- Run the database schema:
mysql -u root -p < database/schema.sqlOr manually execute the SQL file in your MySQL client.
- Navigate to the server directory:
cd server- Install dependencies:
npm install- Create a
.envfile in theserverdirectory:
DB_HOST=localhost
DB_USER=root
DB_PASSWORD=your_mysql_password
DB_NAME=explore_menu
DB_PORT=3306
JWT_SECRET=your_super_secret_jwt_key_change_this_in_production
JWT_EXPIRE=7d
PORT=5000
NODE_ENV=development
MAX_FILE_SIZE=5242880
UPLOAD_PATH=./uploads- Start the server:
npm startFor development with auto-reload:
npm run devThe server will run on http://localhost:5000
- Navigate to the client directory:
cd client- Install dependencies:
npm install- Create a
.envfile in theclientdirectory (optional):
REACT_APP_API_URL=http://localhost:5000/api/v1- Start the development server:
npm startThe frontend will run on http://localhost:3000
explore-menu/
βββ database/
β βββ schema.sql # Database schema
βββ server/ # Backend
β βββ config/
β β βββ database.js # Database configuration
β βββ controllers/ # Route controllers
β β βββ authController.js
β β βββ restaurantController.js
β β βββ categoryController.js
β β βββ menuItemController.js
β βββ models/ # Sequelize models
β β βββ User.js
β β βββ Restaurant.js
β β βββ Category.js
β β βββ MenuItem.js
β β βββ Setting.js
β β βββ index.js
β βββ routes/ # API routes
β β βββ authRoutes.js
β β βββ restaurantRoutes.js
β β βββ categoryRoutes.js
β β βββ menuItemRoutes.js
β βββ middleware/ # Custom middleware
β β βββ authMiddleware.js
β β βββ uploadMiddleware.js
β βββ uploads/ # Uploaded images
β βββ server.js # Entry point
β βββ package.json
βββ client/ # Frontend
β βββ public/
β βββ src/
β β βββ components/
β β β βββ admin/ # Admin components
β β βββ pages/ # Page components
β β βββ services/ # API services
β β βββ App.js
β β βββ index.js
β βββ package.json
βββ README.md
POST /api/v1/auth/register- Register a new userPOST /api/v1/auth/login- LoginGET /api/v1/auth/verify- Verify token (protected)
GET /api/v1/restaurants/:id- Get restaurant (protected)PUT /api/v1/restaurants/:id- Update restaurant (protected)GET /api/v1/restaurants/:id/menu- Get public menu (public)
GET /api/v1/categories/restaurant/:restaurant_id- Get categories (protected)POST /api/v1/categories- Create category (protected)PUT /api/v1/categories/:id- Update category (protected)DELETE /api/v1/categories/:id- Delete category (protected)PUT /api/v1/categories/:id/reorder- Reorder category (protected)
GET /api/v1/menu-items/restaurant/:restaurant_id- Get menu items (protected)GET /api/v1/menu-items/category/:category_id- Get items by category (protected)POST /api/v1/menu-items- Create menu item (protected, multipart/form-data)PUT /api/v1/menu-items/:id- Update menu item (protected, multipart/form-data)DELETE /api/v1/menu-items/:id- Delete menu item (protected)PUT /api/v1/menu-items/:id/toggle-availability- Toggle availability (protected)
- β User authentication (JWT)
- β Dashboard with statistics
- β Category management (CRUD)
- β Menu item management (CRUD with image upload)
- β Restaurant settings
- β Real-time menu updates
- β Public menu display
- β Category-based navigation
- β Search functionality
- β Dietary filter indicators
- β Responsive design
- JWT-based authentication
- Password hashing with bcrypt
- Protected routes with middleware
- File upload validation
- SQL injection prevention (Sequelize ORM)
- CORS configuration
-
Register a new user:
- Navigate to
/admin/login - Click "Register" or use the API to create an account
- The registration will create a restaurant if you provide
restaurant_name
- Navigate to
-
Login:
- Use your credentials to login
- You'll be redirected to the dashboard
-
Create Categories:
- Go to "Categories" in the sidebar
- Click "Add Category"
- Fill in the form and save
-
Add Menu Items:
- Go to "Menu Items" in the sidebar
- Click "Add Menu Item"
- Fill in details, upload an image, and save
-
View Public Menu:
- Navigate to
/menu/:restaurant_id - Replace
:restaurant_idwith your restaurant ID
- Navigate to
- Ensure MySQL is running
- Check your
.envfile has correct database credentials - Verify the database
explore_menuexists
- Change the PORT in
.envfile - Or kill the process using the port
- Ensure the
server/uploadsdirectory exists - Check file size limits in
.env - Verify file types (only images allowed)
- Images are stored in
server/uploads/directory - JWT tokens are stored in localStorage (consider httpOnly cookies for production)
- The application uses Sequelize ORM for database operations
- Material-UI is used for the frontend components
- Multi-restaurant support for admin users
- Advanced menu themes and customization
- QR code generation for tables
- Online ordering integration
- Analytics dashboard
- Mobile app
- Real-time updates using WebSockets
This project is open source and available for educational purposes.
For issues or questions, please check the code comments or create an issue in the repository.