This repository contains the backend server for the Bean Scene restaurant ordering application. The server is built with Node.js, Express, and MongoDB, and serves as the API for the React Native mobile app used by restaurant customers and staff.
Bean Scene is a comprehensive restaurant management solution with two main components:
-
Ordering System (this repo & 'bean-scene-react-native'):
- Backend: Node.js, Express, MongoDB, Mongoose
- Mobile App: React Native
- Features: Menu browsing, order placement, user authentication, and order management.
-
Booking System & Website:
- Backend: ASP.NET MVC, Entity Framework, SQLite
- Frontend: Bootstrap
- Features: Table reservations, restaurant information, and web-based management.
Both systems are developed for Bean Scene, providing seamless integration between mobile ordering and web-based booking.
- Node.js (16.20.1 LTS)
- Express.js
- MongoDB (8.0)
- Jest & Supertest (for testing)
-
Clone the repository
-
Install dependencies
npm install -
Create a
.envfile
Add your environment variables (e.g.,SECRET_JWT_CODE,PORT, etc.) -
Start MongoDB server
Ensure MongoDB is running locally:mongod -
Seed the database (optional)
node seed.js -
Start the Express server
npm start -
Run tests
npm test
- Verify MongoDB connection:
mongosh mongodb://localhost:27017 - Use Mongosh shell in WSL:
mongosh