https://github.com/shamscorner/nest-stackter
A starter template for NestJS + GraphQL/REST + TypeOrm + custom config + validation + serialization + migrations and many more.
https://github.com/shamscorner/nest-stackter
amazon-s3 compodoc cqrs-pattern elasticsearch google-authentication graphql jwt-authentication nestjs nodemailer postgresql redis-cache rest-api swagger typeorm typescript
Last synced: about 2 months ago
JSON representation
A starter template for NestJS + GraphQL/REST + TypeOrm + custom config + validation + serialization + migrations and many more.
- Host: GitHub
- URL: https://github.com/shamscorner/nest-stackter
- Owner: shamscorner
- License: mit
- Created: 2021-10-19T21:39:42.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-23T11:43:17.000Z (about 2 years ago)
- Last Synced: 2025-03-28T04:39:26.452Z (3 months ago)
- Topics: amazon-s3, compodoc, cqrs-pattern, elasticsearch, google-authentication, graphql, jwt-authentication, nestjs, nodemailer, postgresql, redis-cache, rest-api, swagger, typeorm, typescript
- Language: TypeScript
- Homepage:
- Size: 1.96 MB
- Stars: 32
- Watchers: 2
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
**Under Development: Do not use this repository for production purpose!**
## Description
[Nest](https://github.com/nestjs/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.
## Overview
- `config/` setup - separated segment for each config
- `app.config.ts`
- `aws.config.ts`
- `database.config.ts`
- `jwt.config.ts`
- `typeorm.config.ts`
- `authentication` module - JWT token based cookie authentication out of the box
- `database` module - [Typeorm](https://typeorm.io/)
- API validation and serialization
- custom pagination (page, limit) - check the `src/features/comments` module
- [CQRS](https://docs.nestjs.com/recipes/cqrs) - check the `src/features/comments` module
- Out of the box file upload feature module to Amazon S3 (both private and public)
- [CQRS](https://docs.nestjs.com/recipes/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` and `src/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, run `pnpm run documentation:serve`. Or to customize it, check the `package.json`.
- Sending scheduled emails with cron and Nodemailer - `src/features/email-scheduling` and check the email service in `src/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 the `src/features/categories` and `src/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## Installation
```bash
$ npm install
```## Running the app
```bash
# development
$ npm run start# watch mode
$ npm run start:dev# production mode
$ npm run start:prod
```## Test
```bash
# unit tests
$ npm run test# e2e tests
$ npm run test:e2e# test coverage
$ npm run test:cov
```## License
Nest is [MIT licensed](License).