TypeScript
Configuration hierarchy, project references, and per-package tsconfig conventions.
Every package in the repository shares one compiler baseline and participates in a project-reference graph managed by Nx.
Root Configuration
Section titled “Root Configuration”tsconfig.base.json at the repository root defines every compiler option that applies across the entire codebase — strict flags, module resolution, and path aliases used for local project linking.
{ "compilerOptions": { "composite": true, "declaration": true, "declarationMap": true, "paths": { "@applications/frontend/*": ["./applications/frontend/*"] } }}composite: true and declaration: true are required for TypeScript project references. They allow the compiler to check each package individually and cache the result in a .tsbuildinfo file, so subsequent type-checks only process what has changed rather than reloading the whole codebase.
tsconfig.json at the root extends that base and registers every package as a reference. Its files array is intentionally empty — this file is not a compilation entry point; it is a registry. TypeScript uses it to resolve cross-package types in editors and during a repository-wide tsc --build, delegating all actual compilation to each package’s own configuration.
{ "extends": "./tsconfig.base.json", "files": [], "references": [{ "path": "./applications/frontend" }, { "path": "./applications/mcp-server" }]}Package Configuration
Section titled “Package Configuration”Each package has a tsconfig.json that extends the root base and serves the same coordinator role as the root — files is empty and compilation is delegated to the package-specific configuration file referenced below it.
{ "extends": "../../tsconfig.base.json", "files": [], "references": [{ "path": "./tsconfig.app.json" }]}Application Configuration
Section titled “Application Configuration”Applications, orchestrators, and services use tsconfig.app.json. It extends the root base, declares which source files to compile, and applies any package-specific compilerOptions overrides.
{ "extends": "../../tsconfig.base.json", "include": ["src/**/*.ts"], "references": [], "compilerOptions": { "outDir": "./tsbuild", "types": ["bun"] }}Library Configuration
Section titled “Library Configuration”Libraries use tsconfig.lib.json in place of tsconfig.app.json, following the same shape but typically excluding source that applies only to the consuming runtime.
{ "path": "./tsconfig.lib.json" }
{ "path": "./tsconfig.app.json" }