# nestjs-project-template
**Repository Path**: diogoxiang/nestjs-project-template
## Basic Information
- **Project Name**: nestjs-project-template
- **Description**: NestJS project template, Boilerplate. Auth, Better-Auth, Prisma, MongoDB, Pino, Docker.
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: develop
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2025-05-15
- **Last Updated**: 2025-05-15
## Categories & Tags
**Categories**: Uncategorized
**Tags**: Nestjs
## README
# Nest JS Project Template
A modern NestJS project structure with best practices using Fastify, Prisma, MongoDB, and SWC. and more
## Documentation
- [Installation and Running Guide](./docs/install&run.md)
- [Cloud Storage Integration Guide (Chinese)](./docs/storage-guide.md) | [English](./docs/storage-guide-en.md)
- [OAuth Authentication Guide (Chinese)](./docs/oauth-guide.md) | [English](./docs/oauth-guide-en.md)
- [Mailer Module Guide (Chinese)](./docs/mailer.md) | [English](./docs/mailer-en.md)
## commit Doc
- [Commit Convention](./COMMIT_CONVENTION.md)
## 📋 Tech Stack
- **Framework**: [NestJS 10.x](https://nestjs.com/) with [Fastify](https://www.fastify.io/)
- **Database**: [MongoDB](https://www.mongodb.com/) with [Prisma ORM](https://www.prisma.io/)
- **Compiler**: [SWC](https://swc.rs/) for TypeScript
- **Package Manager**: [pnpm](https://pnpm.io/)
- **Authentication**: JWT with [Passport](https://www.passportjs.org/)
- **Documentation**: [Swagger/OpenAPI](https://swagger.io/)
- **Validation**: [class-validator](https://github.com/typestack/class-validator) with DTOs
- **Logging**: [Pino](https://getpino.io/) for structured logging
- **Testing**: [Jest](https://jestjs.io/)
- **Linting**: [ESLint](https://eslint.org/) with TypeScript rules (inspired by [brocoders/nestjs-boilerplate](https://github.com/brocoders/nestjs-boilerplate))
- **Storage**: Multi-cloud storage support ([Alibaba Cloud OSS](https://www.alibabacloud.com/product/object-storage-service), [Tencent Cloud COS](https://www.tencentcloud.com/products/cos), [Amazon S3](https://aws.amazon.com/s3/))
## Features
- **Architecture**: Modular architecture with proper separation of concerns
- **Configuration**: Environment management with [@nestjs/config](https://docs.nestjs.com/techniques/configuration) and [Joi](https://joi.dev/) validation
- **Exception Handling**: Global exception handling and request/response transformation
- **Database**: [MongoDB](https://www.mongodb.com/) integration with [Prisma ORM](https://www.prisma.io/), migrations, and data seeding
- **Caching**: [Redis](https://redis.io/) integration with [@nestjs/cache-manager](https://docs.nestjs.com/techniques/caching) and [ioredis](https://github.com/redis/ioredis)
- **Logging**: Structured logging with [Pino](https://getpino.io/) and [pino-datadog-transport](https://github.com/wdalmut/pino-datadog)
- **Documentation**: API documentation with Swagger ([@nestjs/swagger](https://docs.nestjs.com/openapi/introduction))
- **Authentication**:
- Email sign-in/sign-up with [JWT](https://jwt.io/) and [Passport](https://www.passportjs.org/)
- Social authentication with multiple providers (Google, GitHub, Facebook, Twitter, Microsoft, LinkedIn, GitLab, Discord, Apple, Stack)
- [BetterAuth](https://github.com/betterstack-community/better-auth) integration for enhanced security
- **Authorization**: Role-based access control with Admin and User base roles
- **Storage**: Unified cloud storage interface with multiple provider support ([AWS S3](https://aws.amazon.com/s3/), [Alibaba OSS](https://www.alibabacloud.com/product/object-storage-service), [Tencent COS](https://www.tencentcloud.com/products/cos))
- **Email**: Templated email sending with [Nodemailer](https://nodemailer.com/) and [MJML](https://mjml.io/)
- **Internationalization**: Multi-language support using [nestjs-i18n](https://nestjs-i18n.com/)
- **Payments**: [Stripe](https://stripe.com/) integration for payment processing
- **Testing**: Comprehensive unit and E2E testing setup with [Jest](https://jestjs.io/)
- **CI/CD**: Continuous integration with [GitHub Actions](https://github.com/features/actions) (with multi-platform support)
- **Performance**: Optimized with [Fastify](https://www.fastify.io/) and [SWC](https://swc.rs/)
- **Development**: Git hooks with [Husky](https://typicode.github.io/husky/) and [conventional commits](./COMMIT_CONVENTION.md)
- **Containerization**: [Docker](https://www.docker.com/) support for development and production
## Getting Started
For installation and running instructions, please see the [Installation and Running Guide](./docs/install&run.md).
## develop plan
- [plan](https://github.com/lifefloating/nestjs-project-template/discussions/11)
## License
[MIT](LICENSE)