Restofy is a comprehensive, production-ready restaurant management platform built with modern technologies. It provides a complete solution for restaurant owners to manage their operations, including reservations, orders, payments, staff, and analytics.
- Frontend: React 19 with Material-UI, Vite build system
- Backend: Node.js/Express.js with Domain-Driven Design (DDD) architecture
- Notification Service: Event-driven microservice with RabbitMQ
- Database: PostgreSQL with Prisma ORM
- Message Broker: RabbitMQ for asynchronous communication
- Authentication: JWT-based with role-based access control (RBAC)
- Authentication & RBAC: JWT-based login, role-based access for owners and staff
- Restaurant Management: CRUD for restaurants, tables, menus, menu items, and reservations
- Validation: Joi-based request validation for all endpoints
- Centralized Error Handling: Consistent error responses and logging
- Rate Limiting: Protects APIs from abuse
- Logging: Winston-based logging to files and console
- Testing: Jest and Supertest for unit and integration tests
- Prisma ORM: Type-safe DB access and migrations
- Extensible: Modular Domain-Driven Design architecture
Restofy/
โโโ back-end/ # Node.js/Express Backend API
โ โโโ src/
โ โ โโโ domains/ # Business Domains (DDD)
โ โ โ โโโ analytics/ # Analytics & Reporting
โ โ โ โโโ authentication/ # User Authentication
โ โ โ โโโ bill/ # Bill Management
โ โ โ โโโ menu/ # Menu Management
โ โ โ โโโ menuItem/ # Menu Item Management
โ โ โ โโโ order/ # Order Management
โ โ โ โโโ payment/ # Payment Processing
โ โ โ โโโ profile/ # User Profile Management
โ โ โ โโโ reservation/ # Reservation Management
โ โ โ โโโ restaurant/ # Restaurant Management
โ โ โ โโโ tables/ # Table Management
โ โ โ โโโ user/ # User Management
โ โ โโโ infrastructure/ # External Dependencies
โ โ โ โโโ database/
โ โ โ โ โโโ prisma/
โ โ โ โ โโโ redis/
โ โ โ โโโ external-services/
โ โ โ โโโ monitoring/
โ โ โโโ routes/ # API Routing Layer
โ โ โ โโโ index.js # Main router
โ โ โ โโโ v1/
โ โ โ โโโ index.js # V1 API routes
โ โ โโโ shared/ # Shared Components
โ โ โ โโโ error/ # Error Handling
โ โ โ โโโ jobs/ # Background Jobs
โ โ โ โโโ middleware/ # Express Middleware
โ โ โ โโโ queues/ # Message Queues
โ โ โ โโโ security/ # Security Middleware
โ โ โ โโโ services/ # Shared Services
โ โ โโโ utils/ # Utilities
โ โ โ โโโ constants/
โ โ โ โโโ helper/
โ โ โ โโโ logger.js
โ โ โ โโโ validation/ # Joi Validation Schemas
โ โ โโโ admin/ # Admin Panel
โ โ โโโ app.js # Express App Setup
โ โ โโโ server.js # Server Entry Point
โ โโโ tests/ # Test Files
โ โโโ logs/ # Winston Log Files
โ โโโ assests/ # Assets
โ โโโ .dockerignore
โ โโโ .gitignore
โ โโโ BLOCKERS.md # Development Notes
โ โโโ LEARNING_GUIDE.md # Learning Resources
โ โโโ future.md # Future Plans
โ โโโ env.example # Environment Template
โ โโโ jest.config.js # Jest Configuration
โ โโโ package.json
โ โโโ package-lock.json
โ โโโ dockerfile # Docker Configuration
โ โโโ README.md
โ
โโโ front-end/ # React Frontend Application
โ โโโ src/
โ โ โโโ AuthPage/ # Authentication Pages
โ โ โโโ Component/ # Reusable Components
โ โ โโโ Context/ # React Context Providers
โ โ โโโ Layout/ # Page Layouts & Components
โ โ โโโ assets/ # Static Assets
โ โ โโโ App.css
โ โ โโโ App.jsx # Main App Component
โ โ โโโ main.jsx # React Entry Point
โ โโโ public/ # Public Assets
โ โโโ .dockerignore
โ โโโ .gitignore
โ โโโ eslint.config.js
โ โโโ index.html
โ โโโ package.json
โ โโโ package-lock.json
โ โโโ README.md
โ โโโ dockerfile # Docker Configuration
โ โโโ nginx.conf # Nginx Configuration
โ โโโ vite.config.js # Vite Configuration
โ
โโโ notification-service/ # Event-Driven Notification Service
โ โโโ src/
โ โ โโโ channel/ # Notification Channels
โ โ โโโ dispatcher/ # Message Dispatcher
โ โ โโโ jobs/ # Background Job Processors
โ โ โโโ queues/ # Message Queue Setup
โ โ โโโ services/ # Business Services
โ โ โโโ utils/ # Utilities
โ โ โโโ index.js # Service Entry Point
โ โโโ prisma/ # Database Schema
โ โโโ .dockerignore
โ โโโ .gitignore
โ โโโ package.json
โ โโโ package-lock.json
โ โโโ README.md
โ โโโ dockerfile # Docker Configuration
โ โโโ test.js
โ
โโโ docker-compose.yml # Multi-Service Orchestration
โโโ package.json # Root Package Configuration
โโโ package-lock.json
โโโ README.md # This File
back-end/
โโโ infrastructure/ # External dependencies & services
โ โโโ database/
โ โโโ prisma/ # Prisma schema & migrations
โ โโโ client.js # Prisma client configuration
โ โโโ schema.prisma # Database schema
โ โโโ migrations/ # Database migrations
โโโ logs/ # Winston log files (generated)
โโโ tests/ # Jest/Supertest tests (planned)
โโโ src/
โ โโโ domains/ # Business domains (DDD approach)
โ โ โโโ authentication/ # Auth logic (signup, login, JWT)
โ โ โ โโโ auth.controller.js
โ โ โ โโโ auth.router.js
โ โ โ โโโ auth.service.js
โ โ โโโ restaurant/ # Restaurant CRUD
โ โ โ โโโ restaurant.controller.js
โ โ โ โโโ restaurant.router.js
โ โ โ โโโ restaurant.service.js
โ โ โโโ menu/ # Menu management
โ โ โ โโโ menu.controller.js
โ โ โ โโโ menu.router.js
โ โ โ โโโ menu.service.js
โ โ โโโ menuItem/ # Menu item management
โ โ โ โโโ menuItem.controller.js
โ โ โ โโโ menuItem.router.js
โ โ โ โโโ menuItem.service.js
โ โ โโโ tables/ # Table management
โ โ โ โโโ table.controller.js
โ โ โ โโโ table.router.js
โ โ โ โโโ table.service.js
โ โ โโโ reservation/ # Reservation management
โ โ โ โโโ reservation.controller.js
โ โ โ โโโ reservation.router.js
โ โ โ โโโ reservation.service.js
โ โ โโโ order/ # Order management
โ โ โ โโโ order.controller.js
โ โ โ โโโ order.router.js
โ โ โ โโโ order.service.js
โ โ โโโ bill/ # Bill management
โ โ โ โโโ bill.controller.js
โ โ โ โโโ bill.router.js
โ โ โ โโโ bill.service.js
โ โ โโโ payment/ # Payment management
โ โ โ โโโ payment.controller.js
โ โ โ โโโ payment.router.js
โ โ โ โโโ payment.service.js
โ โ โโโ user/ # User management
โ โ โโโ user.controller.js
โ โ โโโ user.router.js
โ โ โโโ user.service.js
โ โ
โ โโโ routes/ # API routing layer
โ โ โโโ index.js # Main router
โ โ โโโ v1/ # API version 1
โ โ โ โโโ index.js # V1 main router with middleware
โ โ โโโ public/ # Public routes (planned)
โ โ โ โโโ index.js # Health checks, docs
โ โ โโโ admin/ # Admin routes
โ โ โโโ admin.router.js
โ โ
โ โโโ shared/ # Shared across domains
โ โ โโโ middleware/ # Middleware functions
โ โ โ โโโ restrictToLoggedInUser.js # Authentication middleware
โ โ โ โโโ checkRestaurantOwnership.js # Authorization middleware
โ โ โ โโโ validate.js # Request validation
โ โ โ โโโ validateParam.js # Parameter validation
โ โ โ โโโ requireBody.js # Body requirement check
โ โ โโโ security/ # Security middleware
โ โ โ โโโ apiLimiter.js # Rate limiting
โ โ โโโ error/ # Error handling
โ โ โ โโโ errorHandler.js # Global error handler
โ โ โ โโโ asyncErrorBoundary.js # Async error wrapper
โ โ โ โโโ pathNotFound.js # 404 handler
โ โ โ โโโ methodNotAllowed.js # 405 handler
โ โ โโโ utils/ # Shared utilities
โ โ โโโ helper/ # Helper functions
โ โ โโโ responseHelpers.js # Response formatters
โ โ โโโ responseBody.js # Response body utilities
โ โ
โ โโโ reqBodyValidation/ # Joi validation schemas
โ โ โโโ auth.validation.js # Authentication validation
โ โ โโโ restaurant.validation.js # Restaurant validation
โ โ โโโ menu.validation.js # Menu validation
โ โ โโโ menuItem.validation.js # Menu item validation
โ โ โโโ table.validation.js # Table validation
โ โ โโโ reservation.validation.js # Reservation validation
โ โ โโโ order.validation.js # Order validation
โ โ โโโ bill.validation.js # Bill validation
โ โ โโโ payment.validation.js # Payment validation
โ โ โโโ user.validation.js # User validation
โ โ
โ โโโ app.js # Express app setup & middleware
โ โโโ server.js # Server startup & port configuration
โ
โโโ admin/ # Admin panel (separate from API)
โ โโโ admin.router.js # Admin route definitions
โโโ BLOCKERS.md # Architectural decisions & blockers
โโโ LEARNING_GUIDE.md # Learning resources and notes
โโโ future.md # Future plans & feature roadmap
โโโ env.example # Environment variable template
โโโ jest.config.js # Jest testing configuration
โโโ package.json # NPM dependencies and scripts
โโโ package-lock.json # NPM lockfile
โโโ README.md # Project documentation
The project follows DDD principles with clear separation of concerns:
domains/: Each business domain (restaurant, menu, orders, etc.) is self-contained with its own controllers, services, and routersroutes/: API routing layer with versioning support (v1, public, admin)shared/: Cross-cutting concerns like middleware, utilities, and error handlinginfrastructure/: External dependencies like database connections
- Main Routes:
/api/- All API routes go through main router - V1 Routes:
/api/v1/- Versioned API routes with restaurant middleware - Auth Routes:
/api/auth/- Authentication endpoints (signup, login) - Admin Routes:
/api/admin/- Administrative functions
- Authentication: JWT-based user authentication (
restrictToLoggedInUser.js) - Authorization: Restaurant ownership validation (
checkRestaurantOwnership.js) - Validation: Joi-based request validation (
validate.js,validateParam.js) - Security: Rate limiting (
apiLimiter.js) - Error Handling: Centralized error processing (
errorHandler.js)
- Runtime: Node.js 18+
- Framework: Express.js 5.1.0
- Database: PostgreSQL with Prisma ORM 6.11.1
- Authentication: JWT (jsonwebtoken 9.0.2)
- Validation: Joi 17.13.3
- Security: bcrypt 6.0.0, express-rate-limit 7.5.1
- Message Queue: RabbitMQ (amqplib 0.10.8)
- Email: Nodemailer 7.0.3
- Logging: Winston 3.17.0
- Testing: Jest 30.0.2, Supertest 7.1.1
- Framework: React 19.1.1
- Build Tool: Vite
- UI Library: Material-UI (MUI) 7.3.1
- Routing: React Router DOM 7.8.2
- HTTP Client: Axios 1.11.0
- Charts: Recharts 3.1.2
- Styling: Emotion (CSS-in-JS)
- Runtime: Node.js 18+
- Message Queue: RabbitMQ (amqplib 0.10.3)
- Database: PostgreSQL with Prisma ORM 6.14.0
- Email: Nodemailer 6.9.8
- PDF Generation: PDFKit 0.17.1
- Containerization: Docker
- Orchestration: Docker Compose
- Web Server: Nginx (for frontend)
- Process Management: PM2 (production)
/api/
โโโ /auth # Authentication (public)
โ โโโ POST /signup # User registration
โ โโโ POST /login # User login
โ โโโ GET /verifyToken # Token verification
โ
โโโ /v1 # Version 1 API (protected)
โ โโโ /restaurants # Restaurant management
โ โโโ GET / # List user's restaurants
โ โโโ POST / # Create new restaurant
โ โโโ GET /:id # Get specific restaurant
โ โโโ PUT /:id # Update restaurant
โ โโโ DELETE /:id # Delete restaurant
โ โ
โ โโโ /:restaurantId/ # Restaurant-scoped resources
โ โโโ /table # Table management
โ โโโ /menu # Menu management
โ โโโ /reservations # Reservation management
โ โโโ /menu/:menuId/menuItem # Menu item management
โ
โโโ /admin # Admin functions (protected)
โโโ [Admin routes]
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| POST | /auth/signup |
User registration | โ |
| POST | /auth/login |
User login | โ |
| POST | /auth/logout |
User logout | โ |
| GET | /auth/verifyToken |
Verify JWT token | โ |
| POST | /auth/forgot-password |
Request password reset | โ |
| POST | /auth/reset-password |
Reset password with token | โ |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| GET | /profile |
Get user profile | โ |
| PUT | /profile |
Update user profile | โ |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| GET | /restaurants |
Get all user's restaurants | โ |
| POST | /restaurants |
Create new restaurant | โ |
| GET | /restaurants/:restaurantId |
Get specific restaurant | โ |
| PUT | /restaurants/:restaurantId |
Update restaurant | โ |
| DELETE | /restaurants/:restaurantId |
Delete restaurant | โ |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| GET | /analytics |
Get restaurant analytics | โ |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| GET | /user |
Get all restaurant users | โ |
| POST | /user |
Create new user | โ |
| GET | /user/:userId |
Get specific user | โ |
| PUT | /user/:userId |
Update user | โ |
| DELETE | /user/:userId |
Delete user | โ |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| GET | /table |
Get all restaurant tables | โ |
| POST | /table |
Create new table | โ |
| GET | /table/:tableId |
Get specific table | โ |
| PUT | /table/:tableId |
Update table | โ |
| DELETE | /table/:tableId |
Delete table | โ |
| GET | /table/search |
Search tables by keyword | โ |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| GET | /menu |
Get restaurant menus | โ |
| POST | /menu |
Create new menu | โ |
| GET | /menu/:menuId |
Get specific menu | โ |
| DELETE | /menu/:menuId |
Delete menu | โ |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| GET | /menuItem |
Get all menu items | โ |
| POST | /menuItem |
Create new menu item | โ |
| GET | /menuItem/:menuItemId |
Get specific menu item | โ |
| PUT | /menuItem/:menuItemId |
Update menu item | โ |
| DELETE | /menuItem/:menuItemId |
Delete menu item | โ |
| PATCH | /menuItem/:menuItemId/field |
Update specific field | โ |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| GET | /reservations |
Get all reservations | โ |
| POST | /reservations |
Create new reservation | โ |
| GET | /reservations/search |
Search reservations | โ |
| GET | /reservations/:reservationId |
Get specific reservation | โ |
| PUT | /reservations/:reservationId |
Update reservation | โ |
| DELETE | /reservations/:reservationId |
Delete reservation | โ |
| PUT | /reservations/:reservationId/assign-table |
Assign table to reservation | โ |
| PUT | /reservations/:reservationId/completed |
Mark reservation as completed | โ |
| PUT | /reservations/:reservationId/cancel |
Cancel reservation | โ |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| POST | /order |
Create new order | โ |
| GET | /order/:orderId |
Get specific order | โ |
| PUT | /order/:orderId |
Update order | โ |
| PUT | /order/:orderId/complete |
Complete order | โ |
| GET | /order |
Get all orders for reservation | โ |
๐ฐ Bill Management (/api/v1/restaurants/:restaurantId/reservations/:reservationId/order/:orderId/bill)
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| POST | /bill |
Create bill for order | โ |
| GET | /bill/:billId |
Get specific bill | โ |
| GET | /bill/order/:orderId |
Get bill by order ID | โ |
๐ณ Payment Management (/api/v1/restaurants/:restaurantId/reservations/:reservationId/order/:orderId/bill/:billId/payment)
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| POST | /payment |
Process payment | โ |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| GET | /admin/* |
Admin panel routes | โ (Admin only) |
- User calls
POST /api/auth/signuporPOST /api/auth/login - Server validates credentials and returns JWT token
- Token stored in HTTP-only cookie
- Protected routes validate JWT via
restrictToLoggedInUser.js - User info stored in
res.locals.user
- User accesses
/api/v1/restaurants/:restaurantId/* validateParam("restaurantId")validates the restaurant IDisRestaurantExistchecks if restaurant existscheckRestaurantOwnershipverifies user owns/can access restaurant- Route handler processes the request
- JWT Authentication: All v1 routes require valid JWT token
- Restaurant Ownership: Users can only access their own restaurants
- Parameter Validation: All route parameters validated for type/format
- Request Validation: All request bodies validated with Joi schemas
- Rate limiting to prevent API abuse
- CORS protection for cross-origin requests
- Request body validation to prevent injection
- Centralized error handling to prevent data leaks
- HTTP-only cookies for secure token storage
-
Clone the repository:
git clone <repo-url> cd Restofy/back-end
-
Install dependencies:
npm install
-
Setup environment:
cp env.example .env # Edit .env with your database URL and other configs -
Setup database:
npx prisma migrate dev npx prisma generate
-
Start the server:
npm run dev # Development mode npm start # Production mode
- Node.js 18+
- PostgreSQL 13+
- RabbitMQ 3.8+
- Docker & Docker Compose (optional)
git clone <repository-url>
cd Restofycd back-end
npm install
cp env.example .env
# Edit .env with your database and service configurations
npx prisma migrate dev
npx prisma generate
npm run start:devcd front-end
npm install
cp .env.example .env
# Edit .env with your API base URL
npm run devcd notification-service
npm install
cp .env.example .env
# Edit .env with your configurations
npx prisma migrate dev
npx prisma generate
npm run start:dev# From project root
docker-compose up --build# Database
DATABASE_URL="postgresql://username:password@localhost:5432/restofy_db"
# JWT
JWT_SECRET="your-secret-key"
JWT_EXPIRES_IN="1h"
# RabbitMQ
RABBITMQ_URL="amqp://localhost:5672"
# Server
PORT=3001
NODE_ENV="development"
# Frontend URL
CLIENT_FRONTEND_URL="http://localhost:5173"VITE_API_BASE_URL="http://localhost:3001"# Database
DATABASE_URL="postgresql://username:password@localhost:5432/notification_db"
# RabbitMQ
RABBITMQ_URL="amqp://localhost:5672"
# Email
EMAIL_USERNAME="your-email@gmail.com"
EMAIL_PASSWORD="your-app-password"
# JWT
JWT_SECRET="your-secret-key"
# Frontend URL
CLIENT_FRONTEND_URL="http://localhost:5173"- RestaurantOwner: ownerId, ownerName, ownerEmail, ...
- Restaurant: restaurantId, restaurantName, ownerId, ...
- Table: id, tableName, tableCapacity, restaurantId, ...
- Reservation: id, firstName, lastName, reservationTime, tableId, restaurantId, ...
- Menu: id, restaurantId, ...
- MenuItem: id, itemName, itemPrice, menuId, ...
- RestaurantStaff: id, staffName, staffEmail, staffRole, restaurantId, ...
See infrastructure/database/prisma/schema.prisma for full details.
- Owner: Full access to their restaurants
- Manager: Full access within assigned restaurants
- Staff: Limited access (read + specific updates)
- Customer: Basic access for reservations
The system uses a granular permission-based access control:
CAN_CREATE_RESTAURANTCAN_VIEW_RESTAURANTCAN_UPDATE_RESTAURANTCAN_DELETE_RESTAURANTCAN_CREATE_RESERVATIONCAN_VIEW_RESERVATIONCAN_UPDATE_RESERVATIONCAN_DELETE_RESERVATIONCAN_ASSIGN_RESERVATION_TO_TABLECAN_MARK_RESERVATION_COMPLETEDCAN_CANCEL_RESERVATIONCAN_SEARCH_RESERVATION
- Backend publishes events to RabbitMQ
- Notification Service consumes events
- Email notifications sent to users
- Invoice PDFs generated and attached
- Order created
- Payment completed
- Reservation confirmed
- Bill generated
All endpoints are prefixed with /api/v1.
POST /api/auth/signupโ Register a new user (owner)POST /api/auth/loginโ Login, returns JWT cookieGET /api/auth/verifyTokenโ Verify JWT
GET /api/v1/restaurantsโ List all restaurants for the authenticated userPOST /api/v1/restaurantsโ Create a new restaurantGET /api/v1/restaurants/:restaurantIdโ Get a specific restaurantPUT /api/v1/restaurants/:restaurantIdโ Update a restaurantDELETE /api/v1/restaurants/:restaurantIdโ Delete a restaurant
GET /api/v1/restaurants/:restaurantId/tableโ List all tables for a restaurantPOST /api/v1/restaurants/:restaurantId/tableโ Create a tableGET /api/v1/restaurants/:restaurantId/table/:tableIdโ Get a specific tablePUT /api/v1/restaurants/:restaurantId/table/:tableIdโ Update a tableDELETE /api/v1/restaurants/:restaurantId/table/:tableIdโ Delete a table
POST /api/v1/restaurants/:restaurantId/menuโ Create a menuGET /api/v1/restaurants/:restaurantId/menu/:menuIdโ Get a menuDELETE /api/v1/restaurants/:restaurantId/menu/:menuIdโ Delete a menu
GET /api/v1/restaurants/:restaurantId/menu/:menuId/menuItemโ List menu itemsPOST /api/v1/restaurants/:restaurantId/menu/:menuId/menuItemโ Create a menu itemGET /api/v1/restaurants/:restaurantId/menu/:menuId/menuItem/:menuItemIdโ Get a menu itemPUT /api/v1/restaurants/:restaurantId/menu/:menuId/menuItem/:menuItemIdโ Update a menu itemDELETE /api/v1/restaurants/:restaurantId/menu/:menuId/menuItem/:menuItemIdโ Delete a menu item
GET /api/v1/restaurants/:restaurantId/reservationsโ List reservationsPOST /api/v1/restaurants/:restaurantId/reservationsโ Create a reservationGET /api/v1/restaurants/:restaurantId/reservations/:reservationIdโ Get a reservationPUT /api/v1/restaurants/:restaurantId/reservations/:reservationIdโ Update a reservationDELETE /api/v1/restaurants/:restaurantId/reservations/:reservationIdโ Delete a reservation
POST /api/v1/restaurants/:restaurantId/reservations/:reservationId/orderโ Create an orderGET /api/v1/restaurants/:restaurantId/reservations/:reservationId/order/:orderIdโ Get an orderPUT /api/v1/restaurants/:restaurantId/reservations/:reservationId/order/:orderIdโ Update an order
POST /api/v1/restaurants/:restaurantId/reservations/:reservationId/order/:orderId/billโ Create a billGET /api/v1/restaurants/:restaurantId/reservations/:reservationId/order/:orderId/bill/:billIdโ Get a bill
POST /api/v1/restaurants/:restaurantId/reservations/:reservationId/order/:orderId/bill/:billId/paymentโ Make a payment
- User signs up/logs in โ receives JWT token
- Token stored in HTTP-only cookie
- Every protected route validates JWT
- User info stored in
res.locals.user
- OWNER: Full access to their restaurants
- MANAGER: Full access within assigned restaurants
- STAFF: Limited access (read + specific updates)
- ADMIN: Administrative functions
- JWT-based authentication
- Role-based access control
- Request validation with Joi
- Rate limiting (prevent API abuse)
- CORS protection
- Security headers with Helmet
- Centralized error handling
All create/update endpoints validate input using Joi schemas located in src/reqBodyValidation/.
- Centralized Error Handling: All errors processed by
errorHandler.js - Async Error Boundary: Automatic async error catching
- Consistent Error Responses: Standardized error format across API
- Request Validation: Joi validation with detailed error messages
- HTTP Status Codes: Proper status codes for different error types
All endpoints use Joi schemas from reqBodyValidation/:
- Request Body Validation: Validates POST/PUT request data
- Parameter Validation: Validates URL parameters (IDs, etc.)
- Required Field Checking: Ensures required fields are present
- Data Type Validation: Enforces correct data types
- Business Rule Validation: Custom validation rules
- Domain-Driven Design: Clear business domain separation
- Security First: Authentication and authorization on all protected routes
- Consistent API Design: Standardized request/response patterns
- Error Handling: Comprehensive error catching and reporting
- Validation: Input validation on all endpoints
- Modular Architecture: Easy to maintain and extend
See future.md for planned features:
- Unit and integration testing with Jest
- API documentation with Swagger
- Logging with Winston
- Caching with Redis
- File upload capabilities
- Email notifications
- Advanced RBAC with staff roles
# Backend
cd back-end
npm run build
npm start
# Frontend
cd front-end
npm run build
# Serve with Nginx
# Notification Service
cd notification-service
npm startdocker-compose -f docker-compose.prod.yml up -d- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
This project is licensed under the ISC License.
Mohit Kumar
- GitHub: @mokumar
- Email: itsmohit2022@gmail.com
For support and questions:
- Create an issue in the repository
- Check the
BLOCKERS.mdfor known issues - Review the
LEARNING_GUIDE.mdfor development resources
See future.md for planned features:
- Real-time notifications with WebSockets
- Mobile app development
- Advanced analytics dashboard
- Multi-language support
- Integration with payment gateways
- Inventory management
- Staff scheduling system