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
网站与应用开发实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文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
- Clone the repository
- Install dependencies:
cd backend && npm install cd ../frontend && npm install
Running the Application
- Start the backend server:
cd backend && npm run start:dev - 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 <your_jwt_token>
Testing
Run backend tests:
cd backend && npm run test
Run frontend tests:
cd frontend && npm run test
Data Flow
- User authentication: Users sign in through the frontend, which sends a request to the backend's authentication service.
- Restaurant owners create a new restaurant
- Menu management: Restaurant owners can create and update menus.
- Order processing: Customers place orders through the frontend, which sends the order details to the backend's order service.
- 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 access
Key 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_URLenvironment variable is correctly set. - If authentication fails, check that the JWT secret keys are properly configured in both the backend and frontend.
探索相关项目
加载中…