Restaurant Order & Staff Management System built with MERN Stack
- 👨🍳 Add, edit, remove staff (chefs, waiters, hall managers)
- 🍲 Add, edit, remove food items
- 🧾 Place orders (online & offline)
- 💳 UPI payments using Razorpay
- 📦 Table and kitchen assignment for orders
- 📈 Track revenue and GST through bills
- 💬 Add/edit/delete comments and reviews
- 🔐 Auth + role-based access control
- 💡 Auto GST logic based on staff count
Requires Node.js, npm, and MongoDB Atlas
git clone https://github.com/your-username/servesync.git
cd servesync
cd backend
npm install
Add a .env file in the backend with necessary keys like Mongo URI and Razorpay
cd ../frontend
npm install
Add a .env file in frontend with your Razorpay key ID
In backend/
npm run dev
In frontend/
npm run dev
https://servesync.onrender.com/api
📂 Postman Collection Gist : GitHub Gist
| Method | Endpoint | Description |
|---|---|---|
| POST | /signup |
Register user |
| POST | /signin |
Login user |
| Method | Endpoint | Description |
|---|---|---|
| GET | /test |
Test route |
| PUT | /update/:userId |
Update profile |
| DELETE | /delete/:userId |
Delete account |
| POST | /signout |
Logout |
| POST | /verify-password |
Verify password securely |
| Method | Endpoint | Description |
|---|---|---|
| POST | /register |
Register hotel |
| GET | /get |
Fetch all hotels |
| POST | /addStaff |
Add staff to hotel |
| PATCH | /updateStaff |
Update staff details |
| PATCH | /removeStaff |
Remove a staff member |
| GET | /getStaff |
Get all staff for hotel |
| POST | /addStructure |
Add floors, tables, kitchens |
| GET | /getBills |
Get billing summary with GST |
| GET | /getHotelTables |
Fetch tables of hotel |
| GET | /available-waiters |
Get list of free waiters |
| Method | Endpoint | Description |
|---|---|---|
| POST | /add |
Add new food |
| GET | /get |
Fetch all foods |
| GET | /get/:hotelId/:foodId |
Get one food |
| PATCH | /update/:hotelId/:foodId |
Update a food |
| DELETE | /delete/:foodId |
Delete a food |
| Method | Endpoint | Description |
|---|---|---|
| POST | /placeOrder |
Place offline order |
| POST | /place-online |
Place online Razorpay order |
| POST | /create-order |
Create Razorpay order |
| GET | /getStructure |
Get hotel structure (tables etc) |
| GET | /getManagerOrders |
Get manager orders |
| GET | /getChefOrders |
Get chef-specific orders |
| GET | /get-waiter-orders |
Get waiter-assigned orders |
| PATCH | /assign-waiter |
Assign waiter |
| PATCH | /updateOrder |
Update order status |
| PATCH | /markCompleted |
Mark order as complete |
| PATCH | /update-delivery |
Update delivery ETA |
| POST | /generateBill |
Generate bill |
| PUT | /bookTable |
Book a table |
| PUT | /unbookTable |
Free a booked table |
| GET | /orderhistory |
Order history for user |
| Method | Endpoint | Description |
|---|---|---|
| POST | /createComment |
Create comment |
| GET | /getComments/:hotelId |
Get comments by hotel |
| PATCH | /editComment/:commentId |
Edit comment (auth required) |
| DELETE | /deleteComment/:commentId |
Delete comment (auth required) |
- Role-based access for admin and customers
- Orders automatically assigned to staff
- Auto GST based on staff count
- Bill summary includes: subtotal, GST, grand total
- Razorpay test UPI flow works smoothly
Made with 💜 by Vedant Mohol
