https://github.com/olasunkanmi-se/restaurant
Restaurant Management System is a user-friendly web application that revolutionizes the dining experience by allowing customers to conveniently customize and place their orders directly from their smartphones. Built with NestJs and React
https://github.com/olasunkanmi-se/restaurant
authorization ecommerce-application food-ordering-application jwt-authentication mongodb mongodb-database nestjs nestjs-mongoose order-management-system postgresql react react-typescript restaurant-app restaurant-management state-management tanstack-react-query usequery
Last synced: about 2 months ago
JSON representation
Restaurant Management System is a user-friendly web application that revolutionizes the dining experience by allowing customers to conveniently customize and place their orders directly from their smartphones. Built with NestJs and React
- Host: GitHub
- URL: https://github.com/olasunkanmi-se/restaurant
- Owner: olasunkanmi-SE
- License: mit
- Created: 2022-10-04T15:43:18.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-29T13:03:42.000Z (4 months ago)
- Last Synced: 2025-03-28T13:06:50.749Z (2 months ago)
- Topics: authorization, ecommerce-application, food-ordering-application, jwt-authentication, mongodb, mongodb-database, nestjs, nestjs-mongoose, order-management-system, postgresql, react, react-typescript, restaurant-app, restaurant-management, state-management, tanstack-react-query, usequery
- Language: TypeScript
- Homepage:
- Size: 3.27 MB
- Stars: 169
- Watchers: 6
- Forks: 35
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Restaurant Management System
This project is a comprehensive restaurant management system with a NestJS backend and React frontend, designed to streamline restaurant operations and enhance customer experience.
The system provides functionality for managing menus, orders, restaurants, and customers. It includes features such as user authentication, role-based access control, and real-time order processing.
## Postman Collection
https://documenter.getpostman.com/view/6737031/2sAYQiC8QX#640e3128-ede1-4647-b61e-f059300e7917## Repository Structure
```
.
├── backend/
│ ├── src/
│ │ ├── addon/
│ │ ├── application/
│ │ ├── audit/
│ │ ├── cart/
│ │ ├── category/
│ │ ├── domain/
│ │ ├── infrastructure/
│ │ ├── item/
│ │ ├── location/
│ │ ├── menu/
│ │ ├── order/
│ │ ├── order_manager/
│ │ ├── order_notes/
│ │ ├── order_processing_queue/
│ │ ├── order_statuses/
│ │ ├── restaurant/
│ │ ├── shared/
│ │ ├── singleclient/
│ │ └── utils/
│ ├── test/
│ ├── nest-cli.json
│ ├── ormconfig.ts
│ ├── package.json
│ └── tsconfig.json
└── frontend/
├── src/
│ ├── apis/
│ ├── application/
│ ├── components/
│ ├── contexts/
│ ├── data/
│ ├── hooks/
│ ├── interfaces/
│ ├── models/
│ ├── pages/
│ ├── reducers/
│ └── utility/
├── package.json
└── tsconfig.json
```## Usage Instructions
### Installation
1. Clone the repository
2. Install dependencies:
```
cd backend && npm install
cd ../frontend && npm install
```### Running the Application
1. Start the backend server:
```
cd backend && npm run start:dev
```
2. Start the frontend development server:
```
cd frontend && npm run start:dev
```### API Endpoints
- `/api/restaurants`: CRUD operations for restaurants
- `/api/menus`: CRUD operations for menus
- `/api/items`: CRUD operations for menu items
- `/api/orders`: CRUD operations for orders
- `/api/singleclients`: User management and authentication### Authentication
The system uses JWT for authentication. To access protected routes, include the JWT token in the Authorization header of your requests:
```
Authorization: Bearer
```### Testing
Run backend tests:
```
cd backend && npm run test
```Run frontend tests:
```
cd frontend && npm run test
```## Data Flow
1. User authentication: Users sign in through the frontend, which sends a request to the backend's authentication service.
2. Restaurant owners create a new restaurant
4. Menu management: Restaurant owners can create and update menus.
5. Order processing: Customers place orders through the frontend, which sends the order details to the backend's order service.
6. Order status updates: The backend processes orders and updates their status, which is then reflected in the frontend in real-time.```
[Frontend] <--> [API Gateway] <--> [Backend Services (Auth, Menu, Order, etc.)] <--> [Database]
```## Infrastructure
The backend application uses NestJS and is structured with the following key components:
- AuthModule: Handles user authentication and authorization
- DocumentDatabaseModule: Configures the MongoDB connection
- Various repository interfaces and implementations for data accessKey resources:
- MongoDB database (configured in DocumentDatabaseModule)
- JWT for authentication (configured in AuthModule)## Troubleshooting
- If you encounter CORS issues, ensure that the backend's CORS settings match your frontend's domain.
- For database connection issues, verify that the `DATABASE_URL` environment variable is correctly set.
- If authentication fails, check that the JWT secret keys are properly configured in both the backend and frontend.##
![]()