A complete full-stack restaurant website built with Node.js, Express, MongoDB, and Bootstrap.
- Frontend: Responsive HTML/CSS/JavaScript with Bootstrap 4
- Backend: Node.js with Express framework
- Database: MongoDB with Mongoose ODM
- Authentication: JWT-based user authentication
- Admin Dashboard: Manage reservations, menu items, and customer messages
- API: RESTful API for all backend functionality
- Advanced Features:
- Augmented Reality (AR) menu previews
- Voice-activated ordering system
- Chatbot for quick assistance
- Smart QR code ordering for in-store dining
- Multi-language and accessibility support
restoran/
├── config/ # Database configuration
├── controllers/ # Request handlers
├── middleware/ # Authentication middleware
├── models/ # MongoDB models
├── routes/ # API routes
├── js/ # Frontend JavaScript
├── css/ # Stylesheets
├── lib/ # Third-party libraries
├── views/ # HTML templates
├── .env # Environment variables
├── server.js # Main server file
└── package.json # Project dependencies
- Node.js (v14 or higher)
- MongoDB (v4 or higher)
- npm or yarn
-
Clone the repository:
git clone <repository-url> cd restoran
-
Install dependencies:
npm install
-
Set up environment variables: Create a
.envfile in the root directory with the following variables:NODE_ENV=development PORT=5000 MONGODB_URI=mongodb://localhost:27017/restoran JWT_SECRET=your_jwt_secret_key -
Start MongoDB server:
mongod
-
Run the application:
npm start
For development with auto-restart:
npm run dev
POST /api/auth/register- Register a new userPOST /api/auth/login- Login userGET /api/auth/profile- Get user profile (protected)
POST /api/reservations- Create a new reservationGET /api/reservations- Get all reservations (admin only)GET /api/reservations/:id- Get reservation by IDPUT /api/reservations/:id- Update reservation (admin only)DELETE /api/reservations/:id- Delete reservation (admin only)
GET /api/menu- Get all menu itemsGET /api/menu/:id- Get menu item by IDPOST /api/menu- Create a new menu item (admin only)PUT /api/menu/:id- Update menu item (admin only)DELETE /api/menu/:id- Delete menu item (admin only)
POST /api/contact- Send a contact messageGET /api/contact- Get all messages (admin only)GET /api/contact/:id- Get message by IDPUT /api/contact/:id- Update message (admin only)DELETE /api/contact/:id- Delete message (admin only)
index.html- Home pageabout.html- About the restaurantmenu.html- Menu items with advanced featuresbooking.html- Reservation formservice.html- Services offeredteam.html- Team memberstestimonial.html- Customer testimonialscontact.html- Contact formadmin.html- Admin dashboardlogin.html- Admin loginregister.html- Admin registration
The admin dashboard allows administrators to:
- View and manage reservations
- Add, edit, and remove menu items with AR, voice, and accessibility features
- View and respond to customer messages
To access the admin dashboard, you need to be logged in as an admin user.
Visualize dishes before ordering with our AR feature. Menu items with 3D models can be previewed in augmented reality directly from the menu page.
Order menu items using voice commands. Click the voice button and speak your order for a hands-free experience.
Get instant help with our AI-powered chatbot. Available 24/7 to answer questions about the menu, hours, reservations, and more.
Scan QR codes at your table to access the digital menu and place orders directly from your smartphone.
- Support for multiple languages (English, Spanish, French, and more)
- High contrast mode for visually impaired users
- Screen reader support
- Audio descriptions for menu items
To run the development server with auto-restart:
npm run devTo test the API endpoints:
npm run test-apiTo seed the database with sample data:
npm run seed- Set the
NODE_ENVenvironment variable toproduction - Update the
MONGODB_URIto point to your production database - Set a strong
JWT_SECRETfor production - Deploy the application to your preferred hosting platform (Heroku, AWS, DigitalOcean, etc.)
-
Build and run with Docker:
docker-compose up --build
-
Access the application at
http://localhost:5000
For production deployment, make sure to set these environment variables:
NODE_ENV- Set to "production"PORT- Port to run the application on (default: 5000)MONGODB_URI- MongoDB connection stringJWT_SECRET- Secret key for JWT token generation
- Node.js - JavaScript runtime
- Express - Web framework
- MongoDB - Database
- Mongoose - MongoDB object modeling
- Bootstrap - Frontend framework
- jQuery - JavaScript library
- Your Name
This project is licensed under the MIT License.
- HTML template based on Restoran template by HTML Codex
- Various open-source libraries and frameworks