Architecture & Tech Stack

Why do dependencies point inward, and what does each project contain?

Dependencies point inward — Web → Infrastructure → Application → Domain — so that the core business model never depends on volatile outer concerns like the web framework or the database. The Domain (entities/enums) is the stable center and depends on nothing. Application sits around it, defining interfaces and DTOs. Infrastructure implements those interfaces against real technology (EF Core,…

Dependencies point inward — Web → Infrastructure → Application → Domain — so that the core business model never depends on volatile outer concerns like the web framework or the database. The Domain (entities/enums) is the stable center and depends on nothing. Application sits around it, defining interfaces and DTOs. Infrastructure implements those interfaces against real technology (EF Core, SQL Server, file storage, the Claude API). Web is the outermost ring: controllers and Razor views that call Application interfaces, with Infrastructure supplying the implementations at runtime via dependency injection. The practical payoff: you can swap or extend an outer layer (add a gateway, change a storage backend, add a new UI) without touching the business rules, and you can unit-test the core without a database. This is also why an entity must live *only* in Domain — duplicating it into another project breaks the inward-pointing rule and the build.