A Node.js + TypeScript + Express + MongoDB backend powering the MealPoint Restaurant Management System — designed to streamline the entire restaurant workflow, from menu browsing and order placement to payment, analytics, and notifications.
- 🧩 How the Application Works
- 🚀 Features
- 📂 Project Structure
- 🛠️ Tech Stack
- ⚙️ Installation & Setup
- 🔗 API Endpoints
- 💡 Configuration & Limits
- 📊 Feature Analysis
- 📋 Requirements Implementation Status
The MealPoint Backend is the powerhouse of a restaurant ecosystem — enabling both customers and restaurant owners to interact seamlessly.
- Users browse menus & combos by category with search and filter options.
- Orders can be placed for dine-in, takeaway, or delivery.
- Secure payments are processed through Stripe integration.
- Admins manage the dashboard — monitoring orders, sales, customers, and revenue analytics.
- Notifications and AI-driven feedback insights keep the customer experience dynamic.
- Discounts, promo codes, and loyalty logic improve customer engagement.
Everything is built around a modular, scalable architecture with robust security, Zod validation, and centralized error handling.
- Menu browsing, filtering, and search
- Create and manage combos
- Add to cart and checkout
- Multi-mode orders (dine-in, delivery, takeaway)
- Online payments with Stripe
- Email/SMS order confirmation
- Role-based access control (Admin, Customer)
- Promo codes, loyalty points, and rewards
- Ratings & reviews
- Real-time notifications
- Order tracking
- User profiles and saved addresses
- Dashboard with real-time analytics
- Sales and profit reporting
- Menu, discount, and tax management
- Customer and order overview
- Configurable settings and staff roles
- Global rate limiter and speed limiter
- Helmet for HTTP header protection
- MongoDB sanitization to prevent injection
- CORS and OAuth integrations
- Centralized error handling and request validation (Zod)
mealpoint-backend/
├── src/
│ ├── app/
│ │ ├── middlewares/
│ │ │ ├── auth.ts
│ │ │ ├── mongo-sanitize.ts
│ │ │ ├── error-middleware.ts
│ │ │ └── ...
│ │ ├── modules/
│ │ │ ├── admins/
│ │ │ ├── auth/
│ │ │ │ ├── auth.routes.ts
│ │ │ │ ├── auth.controller.ts
│ │ │ │ ├── auth.services.ts
│ │ │ │ ├──auth.interfaces.ts
│ │ │ │ └── ...
│ │ │ ├── combos/
│ │ │ ├── discounts/
│ │ │ ├── menus/
│ │ │ ├── orders/
│ │ │ ├── payments/
│ │ │ └── users/
│ │ │ └── ...
│ │ └── routes/
│ │ └── index.ts
│ ├── helpers/
│ ├── interfaces/
│ ├── enums/
│ ├── constants/
│ ├── app.ts
│ └── server.ts
│ └── ...
├── package.json
├── .env
└── tsconfig.json
└── ...| Layer | Technology |
|---|---|
| Language | TypeScript |
| Runtime | Node.js + Express |
| Database | MongoDB with Mongoose |
| Validation | Zod schemas |
| Auth | JWT + OAuth |
| Upload | Multer (for image & file handling) |
| Payment | Stripe API integration |
| Security | Helmet, Rate Limiter, Mongo Sanitize, CORS |
| Architecture | Modular + Layered |
| Testing | Jest |
| Environment | .env config variables |
| Logging | Morgan (optional) |
Server Live on: 👆 Click Here
git clone https://github.com/RiyaadHossain/MealPoint.git
cd MealPoint# Environment
NODE_ENV=development
# Logging
LOG_LEVEL=info
# Server
PORT=5000
# Database
MONGO_URI= "mongo uri"
# JWT Authentication
JWT_SECRET= "secret"
JWT_EXPIRATION=20d
# Salt rounds for password hashing
SALT_ROUNDS=10
# Stripe API Key
STRIPE_API_KEY = "stripe_key"
# Client URL
CLIENT_URL = "client url"
# Social Login
SOCIAL_LOGIN_PASSWORD = "...password"npm install
npm run devServer runs at: http://localhost:5000
All routes are prefixed with /api/v1 🔒 Protected routes require Authorization: Bearer
Full Postman API collection is available here: MealPoint API Docs (Postman)
POST /auth/register– Register a userPOST /auth/login– Login with credentialsPOST /auth/social-login– OAuth login (Google, etc.)GET /auth/profile– Get user profilePATCH /auth/profile– Update profile info
GET /categories– Fetch all categoriesPOST /categories– Create new category (Admin)PATCH /categories/:id– Update a category (Admin)DELETE /categories/:id– Delete a category (Admin)GET /menus– Fetch all menus with filtersGET /menus/id/:id– Get a single menu by IDGET /menus/:slug– Get menu by slugPOST /menus– Add new menu (Admin)PATCH /menus/:id– Update menu (Admin)DELETE /menus/:id– Delete menu (Admin)
GET /combos– Fetch combosPOST /combos– Create new combo (Admin)PATCH /combos/:id– Update combo (Admin)DELETE /combos/:id– Delete combo (Admin)GET /discounts– Get all discounts (Admin)GET /discounts/available– Get available user discountsPOST /discounts– Create discount (Admin)PATCH /discounts/:id– Update discount (Admin)DELETE /discounts/:id– Delete discount (Admin)
POST /orders– Create a new orderGET /orders– View all orders (Admin)GET /orders/:id– Get specific order summary (Admin)GET /orders/customer/:customerId– Get user order historyPATCH /orders/:id– Update order status (Admin)POST /payments/initiate– Initialize Stripe paymentPATCH /payments/:id/status– Update payment statusGET /payments– List all payments (Admin)GET /payments/user/:userId– Get user payment history
GET /reviews– Get all reviewsPOST /reviews– Create review for orderGET /notifications– Get user notificationsPATCH /notifications/:id/read– Mark single notification as readPATCH /notifications/read-all– Mark all notifications as read
GET /admins/statistics– Get dashboard statsGET /admins/statistics/sales-orders– Get sales and order summaryGET /admins/analytics/sales-summary– Sales analytics reportGET /settings– Get settingsPOST /settings– Create setting (Admin)PATCH /settings– Update setting (Admin)
| Setting | Description |
|---|---|
| Rate Limiting | 100 requests / 10 minutes |
| Authentication | JWT tokens (Bearer schema) |
| Request Validation | Enforced with Zod schemas |
| Security | Helmet, CORS, Mongo Sanitize |
| Error Handling | Centralized middleware |
| Category | Feature | Status |
|---|---|---|
| Core | Menu browsing, order placement, payment, notifications | ✅ |
| Admin | Dashboard, analytics, settings | ✅ |
| Customer UX | Loyalty, promo codes, order tracking | ✅ |
| Security | JWT, helmet, sanitizer, limiter | ✅ |
| Validation | Zod schema validation | ✅ |
| Error Handling | Global middleware | ✅ |
| Architecture | Modular structure | ✅ |
| AI Feedback | Future enhancement | 🧠 Planned |
| Requirement | Implemented |
|---|---|
| Language: TypeScript | ✅ |
| Framework: Express.js | ✅ |
| Database: MongoDB (Mongoose) | ✅ |
| Auth: JWT + OAuth | ✅ |
| Payment Gateway: Stripe | ✅ |
| Validation: Zod | ✅ |
| Testing: Jest | ✅ |
| Error Handling: Centralized | ✅ |
| Rate Limiting & Security: Helmet, CORS, Limiter | ✅ |
| Architecture: Modular | ✅ |
| Postman Collection: Provided | ✅ |
| Admin Dashboard: Implemented | ✅ |
| Analytics & Insights: Implemented | ✅ |
| AI Feedback: Partial / Planned | 🧠 |
| Code Quality: High, well-structured | ✅ |
💾 Author: Riyad Hossain
🧩 Postman Collection: MealPoint API Docs
🚀 Version: 1.0.0
📅 Last Updated: October 2025