NestJS Starter Kit is based on Hexagonal Architecture
Nest framework TypeScript starter repository.
- Database. Support TypeORM.
- Migration and Seeding.
- Config Service (@nestjs/config).
- Mailing (nodemailer).
- Sign in and sign up via email.
- Admin and User roles.
- Internationalization/Translations (I18N) (nestjs-i18n).
- Swagger.
$ yarn install
# development
$ yarn run start
# watch mode
$ yarn dev
# production mode
$ yarn run start:prod
.
├── domain/
│ └── [DOMAIN].ts
├── dto/
│ ├── create.dto.ts
│ ├── update.dto.ts
│ └── get-all.dto.ts
├── infrastructure/
│ ├── entities/
│ │ └── [ENTITY].ts
│ ├── mappers/
│ │ └── [MAPPER].ts
│ └── repositories/
│ ├── [ADAPTER].repository.impl.ts
│ └── [PORT].repository.ts
├── controller.ts
├── module.ts
└── service.ts
[DOMAIN].ts
represents an entity used in the business logic. Domain entity has no dependencies on the database or any other infrastructure.
[ENTITY].ts
represents the database structure. It is used in the relational database.
[MAPPER].ts
is a mapper that converts database entity to domain entity and vice versa.
[PORT].repository.ts
is a repository port that defines the methods for interacting with the database.
[ADAPTER].repository.impl.ts
is a repository that implements the [PORT].repository.ts
. It is used to interact with the database.
Nest is MIT licensed.