Platform Name.

{One sentence on what the platform does} — designed as an evolutionary modular monolith: strong logical boundaries (DDD bounded contexts, flat-by-aggregate modules, an Anti-Corruption Layer around every external system) with physical boundaries kept evolutionary.

PatternModular Monolith · DDD
MonorepoNx — one deploy
FrontendReact · Vite
BackendNestJS · Fastify
DataPostgreSQL + Valkey

1What it is.

{One-line subtitle.}

Isolated domains DDD
Each capability is a bounded context; each module owns and is the sole writer of its tables.
No lock-in ACL
Every external dependency lives behind an Anti-Corruption Layer. Swapping a vendor is swapping an adapter.
Resilience by default Fail-safe
Retries with backoff + jitter, circuit breakers, idempotency, transactional outbox.
The one rule. Logical boundary (always strong) vs physical boundary (evolutionary). Start simple, evolve granularity only when justified.

2Domains — DDD.

Subdomains classified as Core, Supporting, or Generic; everything external is reached only via the ACL.

CORE DOMAIN Core Domain A Core Domain B SUPPORTING Supporting C Supporting D GENERIC Generic E Generic F ↑ Anti-Corruption Layer ↑ EXTERNAL — via Ports & Adapters External Service 1 External Service 2 External Service 3 External Service 4
Core Supporting Generic External (via ACL)
Diagram 1 — Domain context map (example). Replace the labels with your bounded contexts.

3Principles.

Logical boundaries are non-negotiable; physical boundaries are evolutionary.

BoundariesPublic facade only; no internal leaks.
State isolationEach module owns its tables.
Explicit communicationContracts and events, not direct calls.
ReplaceabilityExternal deps behind ports.
Co-location1 concept = 1 folder; suffixes > folders.
Fail independenceBreakers, timeouts, fallbacks.

4Modular monolith.

A monorepo: apps bootstrap, libs hold the logic. One deploy today.

apps/ — BOOTSTRAP one deploy · composes the modules libs/ — BOUNDED CONTEXTS domain-a domain-b supporting-c identity libs/shared/ — CROSS-CUTTING domain kernel contracts infrastructure resilience
apps contexts shared
Diagram 2 — Monorepo layers (example). Apps orchestrate; logic lives in libs; contexts depend only on shared.

5Stack.

Replace the pills with your actual choices.

Frontend
ReactViteTanStack
Backend
NestJSFastifyPrisma
Data
PostgreSQLValkey
Patterns
DDDFlat-by-aggregatePorts & AdaptersOutbox