Skip to content

This is a simple NestJS-based REST API that implements CRUD operations for a restaurant management system.

Notifications You must be signed in to change notification settings

0xpasive/restaurant-app

Repository files navigation

Nest Logo

Description

This is a simple NestJS-based REST API that implements CRUD operations for a restaurant management system. The application uses PostgreSQL as the database, integrated via TypeORM.

The project is built as a learning exercise to understand the core concepts of NestJS—including modules, controllers, guard , jwt , services, pipes, DTOs, validation, and dependency injection—as well as TypeORM fundamentals such as entities, repositories, and relationships.

The codebase follows a modular architecture and demonstrates clean separation of concerns between the API layer, business logic, and data persistence.

Project setup

$ npm install

Compile and run the project

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Database Setup

$ cd docker/postgres
$ docker compose up -d

Run tests

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

API Endpoints

Method Endpoint Description
GET /menus Get all menu items
GET /menus/:id Get menu by ID
POST /menus Create a menu item
PUT /menus/:id Update a menu item
DELETE /menus/:id Delete a menu item
Method Endpoint Description
POST /order Create a new order
GET /order Get all orders
POST /order/add Add items to an existing order
DELETE /order/:id Delete an order by ID
GET /order/:id/bill Generate bill for an order

About

This is a simple NestJS-based REST API that implements CRUD operations for a restaurant management system.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published