Under Development: Do not use this repository for production purpose!
Nest framework TypeScript starter repository with custom setup maintaining industry standard best practices. Just clone and start building without worrying about anything. Focus on the product not the setup.
config/
setup - separated segment for each configapp.config.ts
aws.config.ts
database.config.ts
jwt.config.ts
typeorm.config.ts
authentication
module - JWT token based cookie authentication out of the boxdatabase
module - Typeorm- API validation and serialization
- custom pagination (page, limit) - check the
src/features/comments
module - CQRS - check the
src/features/comments
module - Out of the box file upload feature module to Amazon S3 (both private and public)
- CQRS + pagination - a complete module =>
src/features/products
- Swagger Open API specification setup out of the box - check the
src/features/users/users.controller.ts
for examples - PostgreSQL database file storing support - check the avatar upload of
users.services.ts
andsrc/features/database-files
- Soft Delete example - check the
src/features/categories
module - Two factor authentication setup out of the box - use
JwtTwoFactorGuard
when some specific endpoints need 2FA - Logging with built-in logger and TypeORM is configurable through
.env
-TYPEORM_LOGGING=true
- specify false to disable database logging Health
module- Documentation with Compodoc and JSDoc - take a look on the
src/features/files/files.service.ts
for a detailed example. And for the generation command, runpnpm run documentation:serve
. Or to customize it, check thepackage.json
. - Sending scheduled emails with cron and Nodemailer -
src/features/email-scheduling
and check the email service insrc/email
- Out of the box Google authentication module - check out the
src/features/google-authentication
module - Roles and Permissions based authorization setup - check out the
src/authorization
module. For implementation, check thesrc/features/categories
andsrc/features/products
modules - In memory cache - check the
src/features/categories
module - Redis cache setup out of the box - check the
src/features/posts.module.ts
module - ElasticSearch setup out of the box with docker-compose - check the
/src/features/search.module.ts
module and/src/features/posts.module.ts
for implementation details - Queue setup example - check the
/src/features/optimize
module
$ npm install
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov
Nest is MIT licensed.