This is a Restaurant Management API that handles orders and restaurant capacity. Main features include:
- Create and manage restaurants with capacity limits
- Track current number of clients in real-time
- Reset client count for restaurants
- Update restaurant information
- Create orders for clients at specific restaurants
- Manage order status (paid, received, preparing, completed, delivered, cancelled)
- Add items to existing orders
- Track order history by client
- Prevent orders when restaurant is at capacity
- Automatically manage restaurant's current client count when orders are created/cancelled
- Real-time capacity management
- One active order per client per restaurant
- Complete order lifecycle management
- Client order history tracking
- Pagination support for listing orders and restaurants
- Built with NestJS
- PostgreSQL database with TypeORM
- Swagger documentation available at /api/docs
- Docker support for easy deployment
- Clone Proyect
- Copy
env.template
and rename it to.env
- Execute
pnpm install
- Run database container
docker-compose up -d
Docker desktop needed - Run proyect in development mode
pnpm run start:dev
- Run the full application stack:
First time setup (build and run)
docker-compose -f docker-compose.prod.yaml up --build
- Stop containers
docker-compose -f docker-compose.prod.yaml down
- Restart existing container
docker-compose -f docker-compose.prod.yaml up
- API Documentation:
localhost:3000/api/docs
- Run seed data:
localhost:3000/api/seed
- Test endpoints using Swagger UI
Have fun!