├── .eslintrc.js ├── .gitignore ├── .prettierrc ├── LICENSE ├── README.md ├── nest-cli.json ├── package.json ├── src ├── app.module.ts ├── books │ ├── books.controller.ts │ ├── books.module.ts │ ├── commands │ │ ├── create-book │ │ │ ├── create-book.command.ts │ │ │ └── create-book.handler.ts │ │ ├── delete-book │ │ │ ├── delete-book.command.ts │ │ │ └── delete-book.handler.ts │ │ ├── index.ts │ │ └── update-book │ │ │ ├── update-book.command.ts │ │ │ └── update-book.handler.ts │ ├── dto │ │ ├── create-book.dto.ts │ │ └── update-book.dto.ts │ ├── entities │ │ └── book.entity.ts │ ├── queries │ │ ├── get-book │ │ │ ├── get-book.handler.ts │ │ │ └── get-book.query.ts │ │ ├── index.ts │ │ └── list-books │ │ │ ├── list-books.handler.ts │ │ │ └── list-books.query.ts │ └── repository │ │ ├── book-repository.ts │ │ └── memory │ │ ├── book-repository-memory.adapter.ts │ │ └── fixtures │ │ └── books.ts ├── main.ts └── shared │ ├── adapters │ └── uuid-generator.ts │ ├── index.ts │ └── ports │ └── id-generator.ts ├── tsconfig.build.json └── tsconfig.json /.eslintrc.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Artix1500/clean-rest-api-with-nestjs/HEAD/.eslintrc.js -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Artix1500/clean-rest-api-with-nestjs/HEAD/.gitignore -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Artix1500/clean-rest-api-with-nestjs/HEAD/.prettierrc -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Artix1500/clean-rest-api-with-nestjs/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Artix1500/clean-rest-api-with-nestjs/HEAD/README.md -------------------------------------------------------------------------------- /nest-cli.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Artix1500/clean-rest-api-with-nestjs/HEAD/nest-cli.json -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Artix1500/clean-rest-api-with-nestjs/HEAD/package.json -------------------------------------------------------------------------------- /src/app.module.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Artix1500/clean-rest-api-with-nestjs/HEAD/src/app.module.ts -------------------------------------------------------------------------------- /src/books/books.controller.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Artix1500/clean-rest-api-with-nestjs/HEAD/src/books/books.controller.ts -------------------------------------------------------------------------------- /src/books/books.module.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Artix1500/clean-rest-api-with-nestjs/HEAD/src/books/books.module.ts -------------------------------------------------------------------------------- /src/books/commands/create-book/create-book.command.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Artix1500/clean-rest-api-with-nestjs/HEAD/src/books/commands/create-book/create-book.command.ts -------------------------------------------------------------------------------- /src/books/commands/create-book/create-book.handler.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Artix1500/clean-rest-api-with-nestjs/HEAD/src/books/commands/create-book/create-book.handler.ts -------------------------------------------------------------------------------- /src/books/commands/delete-book/delete-book.command.ts: -------------------------------------------------------------------------------- 1 | export class DeleteBookCommand { 2 | constructor(public id: string) {} 3 | } 4 | -------------------------------------------------------------------------------- /src/books/commands/delete-book/delete-book.handler.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Artix1500/clean-rest-api-with-nestjs/HEAD/src/books/commands/delete-book/delete-book.handler.ts -------------------------------------------------------------------------------- /src/books/commands/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Artix1500/clean-rest-api-with-nestjs/HEAD/src/books/commands/index.ts -------------------------------------------------------------------------------- /src/books/commands/update-book/update-book.command.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Artix1500/clean-rest-api-with-nestjs/HEAD/src/books/commands/update-book/update-book.command.ts -------------------------------------------------------------------------------- /src/books/commands/update-book/update-book.handler.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Artix1500/clean-rest-api-with-nestjs/HEAD/src/books/commands/update-book/update-book.handler.ts -------------------------------------------------------------------------------- /src/books/dto/create-book.dto.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Artix1500/clean-rest-api-with-nestjs/HEAD/src/books/dto/create-book.dto.ts -------------------------------------------------------------------------------- /src/books/dto/update-book.dto.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Artix1500/clean-rest-api-with-nestjs/HEAD/src/books/dto/update-book.dto.ts -------------------------------------------------------------------------------- /src/books/entities/book.entity.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Artix1500/clean-rest-api-with-nestjs/HEAD/src/books/entities/book.entity.ts -------------------------------------------------------------------------------- /src/books/queries/get-book/get-book.handler.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Artix1500/clean-rest-api-with-nestjs/HEAD/src/books/queries/get-book/get-book.handler.ts -------------------------------------------------------------------------------- /src/books/queries/get-book/get-book.query.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Artix1500/clean-rest-api-with-nestjs/HEAD/src/books/queries/get-book/get-book.query.ts -------------------------------------------------------------------------------- /src/books/queries/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Artix1500/clean-rest-api-with-nestjs/HEAD/src/books/queries/index.ts -------------------------------------------------------------------------------- /src/books/queries/list-books/list-books.handler.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Artix1500/clean-rest-api-with-nestjs/HEAD/src/books/queries/list-books/list-books.handler.ts -------------------------------------------------------------------------------- /src/books/queries/list-books/list-books.query.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Artix1500/clean-rest-api-with-nestjs/HEAD/src/books/queries/list-books/list-books.query.ts -------------------------------------------------------------------------------- /src/books/repository/book-repository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Artix1500/clean-rest-api-with-nestjs/HEAD/src/books/repository/book-repository.ts -------------------------------------------------------------------------------- /src/books/repository/memory/book-repository-memory.adapter.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Artix1500/clean-rest-api-with-nestjs/HEAD/src/books/repository/memory/book-repository-memory.adapter.ts -------------------------------------------------------------------------------- /src/books/repository/memory/fixtures/books.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Artix1500/clean-rest-api-with-nestjs/HEAD/src/books/repository/memory/fixtures/books.ts -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Artix1500/clean-rest-api-with-nestjs/HEAD/src/main.ts -------------------------------------------------------------------------------- /src/shared/adapters/uuid-generator.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Artix1500/clean-rest-api-with-nestjs/HEAD/src/shared/adapters/uuid-generator.ts -------------------------------------------------------------------------------- /src/shared/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Artix1500/clean-rest-api-with-nestjs/HEAD/src/shared/index.ts -------------------------------------------------------------------------------- /src/shared/ports/id-generator.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Artix1500/clean-rest-api-with-nestjs/HEAD/src/shared/ports/id-generator.ts -------------------------------------------------------------------------------- /tsconfig.build.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Artix1500/clean-rest-api-with-nestjs/HEAD/tsconfig.build.json -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Artix1500/clean-rest-api-with-nestjs/HEAD/tsconfig.json --------------------------------------------------------------------------------