NestJS framework TypeScript starter repository.
- MSSQL TypeORM setup
- Dockerised application using NodeJS v19
- Conventional commits using Husky
- Code formatting (using Prettier)
- Code linting (using ESLint and Lint-staged)
- Code spell checking (using
cspell
) - Renovate (update NPM packages automatically)
- Standardized Editor config
- Swagger based documentation
- Config based on ENV variables
- Automated API versioning
(/v1)
- Configuration for
Jest
tests - Automated releases based on conventional commits
- Automated version bumps based on commit messages
- Add logging using
Pino.js
- Alias paths
- CodeCov to analyse the test coverage
- Add rate-limiting
- Add Auth guards
- Configure Compodoc
- Add health checks
- Add hot reloading for local Docker development
- Add security headers
- Deployment pipelines
npm install
# start the local SQL database
$ docker compose -f docker-compose.db.yml up --build
# using docker-compose
$ docker compose up --build
# without docker-compose
$ npm run start:dev
# unit tests
$ npm run test
# api tests
$ npm run api-test
To simplify the generation of new resources, you can use the boilerplate CRUD
nest g resource users
# error
this.logger.error({ id: 'your message here' }, 'context-name');
# log
this.logger.log({ id: 'your message here' }, 'context-name');
The most important prefixes you should have in mind are: