An open API service indexing awesome lists of open source software.

https://github.com/lifefloating/nestjs-project-template

NestJS project template, Boilerplate. Auth, Better-Auth, Prisma, MongoDB, Pino, Docker.
https://github.com/lifefloating/nestjs-project-template

better-auth boilerplate nest nestjs node nodejs prisma template typescript

Last synced: about 1 year ago
JSON representation

NestJS project template, Boilerplate. Auth, Better-Auth, Prisma, MongoDB, Pino, Docker.

Awesome Lists containing this project

README

          

# Nest JS Project Template


Nest Logo

A modern NestJS project structure with best practices using Fastify, Prisma, MongoDB, and SWC. and more


Package License
Node Version
Pnpm Version
Database


Aliyun OSS
Tencent COS
Amazon S3


Prisma
Better Auth
Pino
MJML
Docker
Stripe

## 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)

## 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

- Modular architecture with proper separation of concerns
- Global exception handling and request/response transformation
- Database integration with Prisma ORM
- Structured logging
- API documentation with Swagger
- Configuration management with validation
- Authentication and authorization with multiple OAuth providers (Google, GitHub, Facebook, Twitter, Microsoft, Discord, Apple)
- Unit and e2e testing setup
- Performance optimized with Fastify and SWC
- Git hooks with Husky and [conventional commits](./COMMIT_CONVENTION.md)
- Unified cloud storage interface with multiple provider support

## 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)