Three-Layer Architecture
FrontMCP monorepos follow a three-layer architecture:Servers never contain business logic — they only compose apps. Apps never contain infrastructure config — they only define capabilities. Libs are reusable across both.
Multi-App Server Composition
Create different servers that compose different app combinations:Shared Libraries
Generic Libraries
Shared utilities used across multiple apps:Plugin Libraries
Reusable plugins published as npm packages:Tool Register Libraries
Multi-tool packages shared across apps:Dependency Graph
Visualize your workspace dependencies:- Affected commands:
nx affected -t test— only test projects affected by your changes - Build ordering:
nx run-many -t build— builds in correct dependency order - Caching: Unchanged projects skip builds entirely
Tagging Convention
Use tags to enforce dependency rules:.eslintrc.json:
Per-Environment Servers
Create environment-specific servers with different configurations:main.ts can customize providers and auth:
servers/production/src/main.ts