1011 B
1011 B
Monorepo Patterns
Common Layouts
apps + packages
apps/*: deployable applicationspackages/*: shared libraries, UI kits, utilitiestooling/*: lint/build config packages
domains + shared
domains/*: bounded-context product areasshared/*: cross-domain code with strict API contracts
service monorepo
services/*: backend serviceslibs/*: shared service contracts and SDKs
Dependency Rules
- Prefer one-way dependencies from apps/services to packages/libs.
- Keep cross-app imports disallowed unless explicitly approved.
- Keep
typespackages runtime-free to avoid unexpected coupling.
Build/CI Patterns
- Use affected-only CI (
--filteror equivalent). - Enable remote cache for build and test tasks.
- Split lint/typecheck/test tasks to isolate failures quickly.
Release Patterns
- Use Changesets or equivalent for versioning.
- Keep package publishing automated and reproducible.
- Use prerelease channels for unstable shared package changes.