← ClaudeAtlas

backend-architecture-corelisted

Shared reference for the backend-architecture cluster: the dependency-inversion boundary (domain → ports → adapters), the layering contract, REST/transport conventions, and the runtime/framework matrix. USE WHEN drawing a module boundary, designing an API, wiring an integration, or planning a deploy — the interlocking rules every backend spoke shares.
Sheshiyer/skill-clusters · ★ 0 · API & Backend · score 69
Install: claude install-skill Sheshiyer/skill-clusters
# Backend Architecture Core Shared model for the `backend-architecture` cluster. The architecture, API, integration, and deploy spokes all depend on these interlocking concepts — keep them consistent here so no spoke contradicts another. ## 1. The decision this cluster turns on: dependencies point inward Every spoke is an application of one rule — **the domain depends on abstractions, never on infrastructure**. Business logic is pure; frameworks, drivers, and HTTP clients live at the edges behind ports. This is the ports-and-adapters (hexagonal) boundary, and it is what makes a backend testable, framework-swappable, and resistant to rot. ``` (driving / inbound) (driven / outbound) HTTP · CLI · queue · cron ──> [Port] ──> Domain + Use cases ──> [Port] ──> DB · API · bus · cache adapters (no framework imports) adapters ``` - **Domain / use case** — pure business rules and orchestration; imports nothing from the framework, ORM, or transport. → `hexagonal-architecture` - **Port** — an interface the core owns and depends on (e.g. `UserRepository`, `PaymentGateway`). - **Adapter** — a concrete implementation at the edge (Express handler, NestJS controller, Prisma repo, an outbound API connector). Adapters depend on the core; the core never depends on them. **Rule:** if removing a library would force you to rewrite a use case, the dependency is pointing the wrong way — put a port between them. ## 2.