Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/innei-template/nest-http-boilerplate
A template for NestJS 10.x Typegoose Vitest and more, fast and simple boilerplate.
https://github.com/innei-template/nest-http-boilerplate
architecture boilerplate logger mongoose nestjs pnpm template typegoose vitest
Last synced: 26 days ago
JSON representation
A template for NestJS 10.x Typegoose Vitest and more, fast and simple boilerplate.
- Host: GitHub
- URL: https://github.com/innei-template/nest-http-boilerplate
- Owner: innei-template
- License: mit
- Created: 2021-09-10T13:36:36.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-29T08:51:51.000Z (8 months ago)
- Last Synced: 2024-05-18T17:46:49.460Z (7 months ago)
- Topics: architecture, boilerplate, logger, mongoose, nestjs, pnpm, template, typegoose, vitest
- Language: TypeScript
- Homepage:
- Size: 1.54 MB
- Stars: 78
- Watchers: 2
- Forks: 7
- Open Issues: 4
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
- awesome-nestjs - NestJS HTTP Boilerplate - A template for NestJS, Fastify, Typegoose, Vitest, custom Logger implementation, Redis and more, fast and simple boilerplate. (Resources)
README
# Nest Http Template
A NestJS template, which used the coolest and fastest stuff.
## Which Tech Stack In Use
- Framework: NestJS (Based on Fastify)
- Language: TypeScript (Best practices, Not AnyScript)
- Database ODM: Typegoose (Write schema once all in TypeScript)
- Bundle Toolchain: @vercel/ncc Bundle (Bundle entry, go node_modules away)
- Testing: Vitest (Test case write in TypeScript, fast and out-of-box)
- Package Manager: PNPM (which is fastest)
- DevOps: Docker
- Other: Prettier, ESLint, Husky, Bump Version, etc.## How to start development
```bash
npm run dev
```## File Structure
```
.
├── app.config.ts # 主程序配置,数据库、程序、第三方,一切可配置项
├── app.controller.ts # 主程序根控制器
├── app.module.ts # 主程序根模块,负责各业务模块的聚合
├── common # 存放中间件
│ ├── adapters # 适配器的配置
│ ├── decorator # 业务装饰器
│ ├── exceptions # 自定义异常
│ ├── filters # 异常处理器
│ ├── guard # 守卫与鉴权
│ ├── interceptors # 拦截器, 数据过滤与响应格式化处理
│ ├── middlewares # 传统意义上的中间件
│ └── pipes # 管道
├── constants # 常量
├── main.ts # 引入配置,启动主程序,引入各种全局服务
├── modules # 业务逻辑模块
├── processors # 核心辅助模块
│ ├── cache # Redis 缓存相关
│ ├── database # Mongo 数据库相关
│ ├── gateway # Socket.IO 相关
│ ├── helper # 辅助类
│ └── logger # 自定义 Logger
├── shared # 通用模型
│ ├── dto # 数据验证模型
│ ├── interface # 接口
│ └── model # 基本数据模型
├── utils # 工具类
├── bootstrap.ts # 引导程序
└── main.ts # 入口```
## Docs
Please visit [docs](./docs/) folder under this project.
## Authors
[Innei](https://github.com/innei).