A guide to organizing application logic using Clean Architecture principles. Covers the two primary layers (domain and infrastructure) and breaks down 6 common logic types: presentation logic, data access/adapter logic, application logic (use cases), domain service logic, validation logic, and core entity/business logic. Includes TypeScript code examples showing how Value Objects enforce validation rules, and explains concepts like CQS/CQRS, DDD entities, aggregate roots, and domain events. Emphasizes knowing when layered architecture is appropriate versus over-engineering.
Table of contents
The Clean Architecture / Layered ArchitectureClean architecture expanded1. Presentation Logic2. Data Access / Adapter Logic3. Application Logic / Use Cases4. Domain Service logic5. Validation logic6. Core business logic / entity logicSome principles to followConclusion7 Impressions