Web / REST / CLI AdaptersNext.js / Fastify
Outer delivery mechanisms & HTTP controllers.
Input DTO & PresentersInterface Adapters
Maps external payloads to Use Case inputs.
Application Use CasesInteractors
Orchestrates workflows independent of frameworks.
Domain Entities & RulesPure TypeScript / Java
Core invariants & aggregates with zero deps.
Repository Ports (Interfaces)Output Ports
Abstract interfaces owned by Application layer.
Prisma / Postgres AdapterPostgreSQL
Concrete persistence adapter implementing Port.
External Mail / Pay AdapterSMTP / Stripe
Concrete 3rd-party gateway adapter.