├── .env_template ├── .eslintrc.yml ├── .gitignore ├── Dockerfile ├── LICENSE.md ├── README.md ├── jest.config.js ├── nodemon.json ├── package.json ├── preprocessor.js ├── src ├── application │ ├── application │ │ ├── ApplicationApplicationService.ts │ │ └── dtos │ │ │ └── ApplicationDto.ts │ ├── container.ts │ ├── property │ │ ├── PropertyApplication.spec.ts │ │ ├── PropertyApplication.ts │ │ └── dtos │ │ │ └── PropertyDto.ts │ └── user │ │ ├── UserApplication.ts │ │ └── dtos │ │ └── UserDto.ts ├── config │ └── main.ts ├── constants │ └── types.ts ├── core │ ├── ApplicationError.ts │ ├── Entity.ts │ ├── IAggregateRoot.ts │ ├── IDataMapper.ts │ ├── IRepository.ts │ └── ValueObject.ts ├── domain │ ├── application │ │ ├── Address.ts │ │ ├── Application.ts │ │ ├── IApplicationDomainServices.ts │ │ ├── IApplicationRepository.ts │ │ ├── InsufficientIncomeError.ts │ │ └── services │ │ │ ├── ApplicationRegistration.spec.ts │ │ │ └── ApplicationRegistration.ts │ ├── property │ │ ├── IPropertyRepository.ts │ │ ├── Property.spec.ts │ │ └── Property.ts │ └── user │ │ ├── IUserRepository.ts │ │ └── User.ts ├── entrypoint.ts ├── index.ts ├── infrastructure │ ├── container.ts │ ├── dataMapper │ │ ├── ApplicationDataMapper.ts │ │ ├── PropertyDataMapper.spec.ts │ │ ├── PropertyDataMapper.ts │ │ └── UserDataMapper.ts │ ├── db │ │ └── mongodb.ts │ └── repositories │ │ ├── ApplicationRepository.ts │ │ ├── PropertyRepository.spec.ts │ │ ├── PropertyRepository.ts │ │ ├── Repository.ts │ │ └── UserRepository.ts └── interfaces │ └── http │ ├── controllers │ ├── ApplicationController.ts │ ├── CommonController.ts │ ├── PropertyController.ts │ ├── UserController.ts │ └── index.ts │ ├── middlewares │ └── ErrorHandler.ts │ └── processors │ └── response.ts ├── tsconfig.json └── yarn.lock /.env_template: -------------------------------------------------------------------------------- 1 | API_PORT=3200 2 | MONGODB_URI=mongodb://localhost:27017 3 | DB_NAME=bookstore -------------------------------------------------------------------------------- /.eslintrc.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/.eslintrc.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | .env 4 | .vscode 5 | yarn-error.log -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/Dockerfile -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/LICENSE.md -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/README.md -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/jest.config.js -------------------------------------------------------------------------------- /nodemon.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/nodemon.json -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/package.json -------------------------------------------------------------------------------- /preprocessor.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/preprocessor.js -------------------------------------------------------------------------------- /src/application/application/ApplicationApplicationService.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/src/application/application/ApplicationApplicationService.ts -------------------------------------------------------------------------------- /src/application/application/dtos/ApplicationDto.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/src/application/application/dtos/ApplicationDto.ts -------------------------------------------------------------------------------- /src/application/container.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/src/application/container.ts -------------------------------------------------------------------------------- /src/application/property/PropertyApplication.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/src/application/property/PropertyApplication.spec.ts -------------------------------------------------------------------------------- /src/application/property/PropertyApplication.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/src/application/property/PropertyApplication.ts -------------------------------------------------------------------------------- /src/application/property/dtos/PropertyDto.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/src/application/property/dtos/PropertyDto.ts -------------------------------------------------------------------------------- /src/application/user/UserApplication.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/src/application/user/UserApplication.ts -------------------------------------------------------------------------------- /src/application/user/dtos/UserDto.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/src/application/user/dtos/UserDto.ts -------------------------------------------------------------------------------- /src/config/main.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/src/config/main.ts -------------------------------------------------------------------------------- /src/constants/types.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/src/constants/types.ts -------------------------------------------------------------------------------- /src/core/ApplicationError.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/src/core/ApplicationError.ts -------------------------------------------------------------------------------- /src/core/Entity.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/src/core/Entity.ts -------------------------------------------------------------------------------- /src/core/IAggregateRoot.ts: -------------------------------------------------------------------------------- 1 | export interface IAggregateRoot {} -------------------------------------------------------------------------------- /src/core/IDataMapper.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/src/core/IDataMapper.ts -------------------------------------------------------------------------------- /src/core/IRepository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/src/core/IRepository.ts -------------------------------------------------------------------------------- /src/core/ValueObject.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/src/core/ValueObject.ts -------------------------------------------------------------------------------- /src/domain/application/Address.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/src/domain/application/Address.ts -------------------------------------------------------------------------------- /src/domain/application/Application.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/src/domain/application/Application.ts -------------------------------------------------------------------------------- /src/domain/application/IApplicationDomainServices.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/src/domain/application/IApplicationDomainServices.ts -------------------------------------------------------------------------------- /src/domain/application/IApplicationRepository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/src/domain/application/IApplicationRepository.ts -------------------------------------------------------------------------------- /src/domain/application/InsufficientIncomeError.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/src/domain/application/InsufficientIncomeError.ts -------------------------------------------------------------------------------- /src/domain/application/services/ApplicationRegistration.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/src/domain/application/services/ApplicationRegistration.spec.ts -------------------------------------------------------------------------------- /src/domain/application/services/ApplicationRegistration.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/src/domain/application/services/ApplicationRegistration.ts -------------------------------------------------------------------------------- /src/domain/property/IPropertyRepository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/src/domain/property/IPropertyRepository.ts -------------------------------------------------------------------------------- /src/domain/property/Property.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/src/domain/property/Property.spec.ts -------------------------------------------------------------------------------- /src/domain/property/Property.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/src/domain/property/Property.ts -------------------------------------------------------------------------------- /src/domain/user/IUserRepository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/src/domain/user/IUserRepository.ts -------------------------------------------------------------------------------- /src/domain/user/User.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/src/domain/user/User.ts -------------------------------------------------------------------------------- /src/entrypoint.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/src/entrypoint.ts -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/src/index.ts -------------------------------------------------------------------------------- /src/infrastructure/container.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/src/infrastructure/container.ts -------------------------------------------------------------------------------- /src/infrastructure/dataMapper/ApplicationDataMapper.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/src/infrastructure/dataMapper/ApplicationDataMapper.ts -------------------------------------------------------------------------------- /src/infrastructure/dataMapper/PropertyDataMapper.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/src/infrastructure/dataMapper/PropertyDataMapper.spec.ts -------------------------------------------------------------------------------- /src/infrastructure/dataMapper/PropertyDataMapper.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/src/infrastructure/dataMapper/PropertyDataMapper.ts -------------------------------------------------------------------------------- /src/infrastructure/dataMapper/UserDataMapper.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/src/infrastructure/dataMapper/UserDataMapper.ts -------------------------------------------------------------------------------- /src/infrastructure/db/mongodb.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/src/infrastructure/db/mongodb.ts -------------------------------------------------------------------------------- /src/infrastructure/repositories/ApplicationRepository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/src/infrastructure/repositories/ApplicationRepository.ts -------------------------------------------------------------------------------- /src/infrastructure/repositories/PropertyRepository.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/src/infrastructure/repositories/PropertyRepository.spec.ts -------------------------------------------------------------------------------- /src/infrastructure/repositories/PropertyRepository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/src/infrastructure/repositories/PropertyRepository.ts -------------------------------------------------------------------------------- /src/infrastructure/repositories/Repository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/src/infrastructure/repositories/Repository.ts -------------------------------------------------------------------------------- /src/infrastructure/repositories/UserRepository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/src/infrastructure/repositories/UserRepository.ts -------------------------------------------------------------------------------- /src/interfaces/http/controllers/ApplicationController.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/src/interfaces/http/controllers/ApplicationController.ts -------------------------------------------------------------------------------- /src/interfaces/http/controllers/CommonController.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/src/interfaces/http/controllers/CommonController.ts -------------------------------------------------------------------------------- /src/interfaces/http/controllers/PropertyController.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/src/interfaces/http/controllers/PropertyController.ts -------------------------------------------------------------------------------- /src/interfaces/http/controllers/UserController.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/src/interfaces/http/controllers/UserController.ts -------------------------------------------------------------------------------- /src/interfaces/http/controllers/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/src/interfaces/http/controllers/index.ts -------------------------------------------------------------------------------- /src/interfaces/http/middlewares/ErrorHandler.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/src/interfaces/http/middlewares/ErrorHandler.ts -------------------------------------------------------------------------------- /src/interfaces/http/processors/response.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/src/interfaces/http/processors/response.ts -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/tsconfig.json -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yerinadler/typescript-ddd-sample-app/HEAD/yarn.lock --------------------------------------------------------------------------------