最后,把 NestJS 全部压成一张图:
NestJS 国际机场总调度系统
│
├── 启动
│ ├── main.ts -> 机场开闸
│ └── NestFactory.create() -> 建立机场实例
│
├── 结构
│ ├── Module -> 航站楼/业务分区
│ ├── Controller -> 服务柜台
│ └── Provider/Service -> 调度中心
│
├── 核心机制
│ ├── Dependency Injection -> 内部调度网络
│ ├── DTO -> 标准申报单
│ └── ConfigModule -> 运行参数中心
│
├── 请求管线
│ ├── Guard -> 安检闸机
│ ├── Pipe -> 参数整形与校验
│ ├── Controller -> 接单
│ ├── Service -> 业务处理
│ ├── Interceptor -> 包装与编排
│ └── Filter -> 异常应急
│
├── 数据层
│ ├── TypeORM -> 传统 ORM 仓储路线
│ ├── Prisma -> 现代类型安全 client 路线
│ └── 选一种,别混乱
│
├── 工程能力
│ ├── @nestjs/testing -> 演练系统
│ ├── SWC -> 快速编译
│ ├── build / dist -> 正式交付物
│ └── Docker / Mau -> 部署开航
│
└── 目标
└── 把 Node.js 后端从“能跑”变成“能长期运营”最后收成一句话:
Express 教你把请求接进来,NestJS 教你把整个后端系统组织成一座能长期运营的机场。
当你真正理解这一句时,你学的就不再是一堆 decorator,而是一整套后端工程秩序。
#官方来源
- NestJS First steps: https://docs.nestjs.com/first-steps
- NestJS Modules: https://docs.nestjs.com/modules
- NestJS Controllers: https://docs.nestjs.com/controllers
- NestJS Providers: https://docs.nestjs.com/components
- NestJS Dependency Injection / Custom providers: https://docs.nestjs.com/fundamentals/dependency-injection
- NestJS Injection scopes: https://docs.nestjs.com/fundamentals/injection-scopes
- NestJS Validation: https://docs.nestjs.com/techniques/validation
- NestJS Pipes: https://docs.nestjs.com/pipes
- NestJS Guards / Authentication / Authorization:
- NestJS Interceptors: https://docs.nestjs.com/interceptors
- NestJS Exception filters: https://docs.nestjs.com/exception-filters
- NestJS Configuration: https://docs.nestjs.com/techniques/configuration
- NestJS Testing:
- NestJS Database / TypeORM:
- NestJS Recipes / Prisma:
- NestJS SWC: https://docs.nestjs.com/recipes/swc
- NestJS Deployment: https://docs.nestjs.com/deployment
- NestJS 官方仓库与 release:
- NestJS Migration guide(v10 -> v11): https://docs.nestjs.com/migration-guide