├── .eslintrc.js ├── .github └── workflows │ └── nodejs.yml ├── .gitignore ├── .prettierrc ├── Dockerfile ├── LICENSE ├── README.md ├── development.env ├── dockerignore ├── nest-cli.json ├── package.json ├── src ├── app.module.ts ├── application │ ├── application.module.ts │ ├── commands │ │ └── product.command.ts │ ├── createProduct.usecase.ts │ ├── deleteProduct.usecase.ts │ ├── factory │ │ └── product.factory.ts │ ├── getAllProducts.usecase.ts │ ├── getProduct.usecase.ts │ └── updateProduct.usecase.ts ├── domain │ ├── domain.module.ts │ ├── exceptions │ │ └── price-product-less-zero.exception.ts │ ├── ports │ │ └── product.repository.ts │ └── product.ts ├── infrastructure │ ├── adapters │ │ └── repository │ │ │ ├── entity │ │ │ └── product.entity.ts │ │ │ ├── product.repository.mongo.spec.ts │ │ │ ├── product.repository.mongo.ts │ │ │ └── schema │ │ │ └── product.schema.ts │ ├── config.module.ts │ ├── config.service.ts │ ├── controllers │ │ └── product.controller.ts │ ├── exceptions │ │ └── http-exception.filter.ts │ ├── infrastructure.module.ts │ └── mapper │ │ └── product.mapper.ts └── main.ts ├── test.env ├── test ├── jest-e2e.json └── src │ └── products │ ├── example.json │ └── products.e2e-spec.ts ├── tsconfig.build.json └── tsconfig.json /.eslintrc.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmcarrero/nest-js-products-api/HEAD/.eslintrc.js -------------------------------------------------------------------------------- /.github/workflows/nodejs.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmcarrero/nest-js-products-api/HEAD/.github/workflows/nodejs.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmcarrero/nest-js-products-api/HEAD/.gitignore -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmcarrero/nest-js-products-api/HEAD/.prettierrc -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmcarrero/nest-js-products-api/HEAD/Dockerfile -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmcarrero/nest-js-products-api/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmcarrero/nest-js-products-api/HEAD/README.md -------------------------------------------------------------------------------- /development.env: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmcarrero/nest-js-products-api/HEAD/development.env -------------------------------------------------------------------------------- /dockerignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /nest-cli.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmcarrero/nest-js-products-api/HEAD/nest-cli.json -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmcarrero/nest-js-products-api/HEAD/package.json -------------------------------------------------------------------------------- /src/app.module.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmcarrero/nest-js-products-api/HEAD/src/app.module.ts -------------------------------------------------------------------------------- /src/application/application.module.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmcarrero/nest-js-products-api/HEAD/src/application/application.module.ts -------------------------------------------------------------------------------- /src/application/commands/product.command.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmcarrero/nest-js-products-api/HEAD/src/application/commands/product.command.ts -------------------------------------------------------------------------------- /src/application/createProduct.usecase.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmcarrero/nest-js-products-api/HEAD/src/application/createProduct.usecase.ts -------------------------------------------------------------------------------- /src/application/deleteProduct.usecase.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmcarrero/nest-js-products-api/HEAD/src/application/deleteProduct.usecase.ts -------------------------------------------------------------------------------- /src/application/factory/product.factory.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmcarrero/nest-js-products-api/HEAD/src/application/factory/product.factory.ts -------------------------------------------------------------------------------- /src/application/getAllProducts.usecase.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmcarrero/nest-js-products-api/HEAD/src/application/getAllProducts.usecase.ts -------------------------------------------------------------------------------- /src/application/getProduct.usecase.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmcarrero/nest-js-products-api/HEAD/src/application/getProduct.usecase.ts -------------------------------------------------------------------------------- /src/application/updateProduct.usecase.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmcarrero/nest-js-products-api/HEAD/src/application/updateProduct.usecase.ts -------------------------------------------------------------------------------- /src/domain/domain.module.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmcarrero/nest-js-products-api/HEAD/src/domain/domain.module.ts -------------------------------------------------------------------------------- /src/domain/exceptions/price-product-less-zero.exception.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmcarrero/nest-js-products-api/HEAD/src/domain/exceptions/price-product-less-zero.exception.ts -------------------------------------------------------------------------------- /src/domain/ports/product.repository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmcarrero/nest-js-products-api/HEAD/src/domain/ports/product.repository.ts -------------------------------------------------------------------------------- /src/domain/product.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmcarrero/nest-js-products-api/HEAD/src/domain/product.ts -------------------------------------------------------------------------------- /src/infrastructure/adapters/repository/entity/product.entity.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmcarrero/nest-js-products-api/HEAD/src/infrastructure/adapters/repository/entity/product.entity.ts -------------------------------------------------------------------------------- /src/infrastructure/adapters/repository/product.repository.mongo.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmcarrero/nest-js-products-api/HEAD/src/infrastructure/adapters/repository/product.repository.mongo.spec.ts -------------------------------------------------------------------------------- /src/infrastructure/adapters/repository/product.repository.mongo.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmcarrero/nest-js-products-api/HEAD/src/infrastructure/adapters/repository/product.repository.mongo.ts -------------------------------------------------------------------------------- /src/infrastructure/adapters/repository/schema/product.schema.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmcarrero/nest-js-products-api/HEAD/src/infrastructure/adapters/repository/schema/product.schema.ts -------------------------------------------------------------------------------- /src/infrastructure/config.module.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmcarrero/nest-js-products-api/HEAD/src/infrastructure/config.module.ts -------------------------------------------------------------------------------- /src/infrastructure/config.service.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmcarrero/nest-js-products-api/HEAD/src/infrastructure/config.service.ts -------------------------------------------------------------------------------- /src/infrastructure/controllers/product.controller.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmcarrero/nest-js-products-api/HEAD/src/infrastructure/controllers/product.controller.ts -------------------------------------------------------------------------------- /src/infrastructure/exceptions/http-exception.filter.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmcarrero/nest-js-products-api/HEAD/src/infrastructure/exceptions/http-exception.filter.ts -------------------------------------------------------------------------------- /src/infrastructure/infrastructure.module.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmcarrero/nest-js-products-api/HEAD/src/infrastructure/infrastructure.module.ts -------------------------------------------------------------------------------- /src/infrastructure/mapper/product.mapper.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmcarrero/nest-js-products-api/HEAD/src/infrastructure/mapper/product.mapper.ts -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmcarrero/nest-js-products-api/HEAD/src/main.ts -------------------------------------------------------------------------------- /test.env: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmcarrero/nest-js-products-api/HEAD/test.env -------------------------------------------------------------------------------- /test/jest-e2e.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmcarrero/nest-js-products-api/HEAD/test/jest-e2e.json -------------------------------------------------------------------------------- /test/src/products/example.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmcarrero/nest-js-products-api/HEAD/test/src/products/example.json -------------------------------------------------------------------------------- /test/src/products/products.e2e-spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmcarrero/nest-js-products-api/HEAD/test/src/products/products.e2e-spec.ts -------------------------------------------------------------------------------- /tsconfig.build.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmcarrero/nest-js-products-api/HEAD/tsconfig.build.json -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmcarrero/nest-js-products-api/HEAD/tsconfig.json --------------------------------------------------------------------------------