Architecture of nestjs/nest
nestjs/nest is 2,718 source files holding 8,285 symbols across 6 modules, written mainly in TypeScript, JavaScript, Shell. The largest module is packages, with 1,097 files, and 57 files are entry points into the dependency graph.
How nest fits together
The source is split into packages, with the core framework code under packages/core and shared code under packages/common. packages/core/injector/injector.ts handles dependency injection, which resolves the providers that modules declare. packages/core/router/router-response-controller.ts handles how the result of a route handler is sent back as a response. Platform adapters such as packages/platform-fastify/adapters/fastify-adapter.ts and packages/platform-node/adapters/node-adapter.ts connect this core to Fastify and node:http. The integration directory holds example applications, each started from an entry point such as integration/graphql-code-first/src/main.ts.
Largest modules
- packages: 1,097 files and 151,837 lines of code
- integration: 723 files and 52,434 lines of code
- sample: 529 files and 11,219 lines of code
- tools: 17 files and 576 lines of code
- scripts: 6 files and 93 lines of code
- root: 4 files and 215 lines of code
Languages
By file count: TypeScript 2,355 files, JavaScript 11 files, Shell 4 files.
Documentation
Repowise documents nest in 1,770 pages generated from the source, 86 of them written explanations of the repository and its modules.
More on nest: summary and FAQ, codebase overview, code health.
Related guide: Best dependency graph tools for monorepos