Watch the video of this project here
# start development
$ make dev.up
# stop development
$ make dev.down
# Application
$ docker exec -it api sh
# PostgresSQL
$ docker exec -it db bash
$ npx prisma migrate dev
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov
- Configuration
- Docker
- Prisma client
- Jest
- Global pipes
- Cors
- Swagger
- Prisma Service
- Test prisma
- Prisma service
- Domain
- Entities
- Repository
- DTO
- Test (Write todo & update todo)
- Write todo & update todo
- Todo
- Data
- Test prisma adapter
- Prisma adapter
- Services
- Test todo service
- Todo Service
- Controllers
- Test todo controller
- todo controller
- Data
- Tests
- Test e2e
-
src
main.ts
- nest.js bootstrap
app.module.ts
- loads all modules
modules
{name}
controllers
{name}.controller.spec.ts
{name}.controller.ts
services
{name}.service.spec.ts
{name}.service.ts
data
adapters
{name}
{name}.adapter.spec.ts
{name}.adapter.ts
domain
entities
{name}.ts
repository
{name}.ts
dto
{name}.dto.spec.ts
{name}.dto.ts
{name}.module.ts
-
test
utils
- Utilities for application testing
{name}.e2e-spec.ts
- Tests e2e
/todo/list
(GET)/todo/:id
(GET)/todo/add
(POST)/todo/:id
(PATCH)/todo/:id
(DELETE)
- (OOP) Object-Oriented Programming
- (TDD) Test-Driven Development
- (DDD) Domain-Driven Design
- (DI) Dependency Injection
- (DIP) Dependency Inversion Principle
- (DTO) Data Transfer Object
- (DP) Decorator Pattern