Vertical Slice Architecture organizes Node.js/TypeScript projects by use case rather than technical layer. Instead of separate controllers/, services/, and models/ directories, each feature gets its own folder containing handler, business logic, validation, types, and tests. The handler handles HTTP concerns while the use case function contains pure business logic, making it independently testable. Shared utilities live in a shared/ directory; slices never import from each other. The approach reduces cognitive overhead, limits blast radius of changes, and makes features easy to add or delete. It works best for apps with 15+ endpoints or multiple teams, and less well for small apps or early prototypes.
Table of contents
The Problem with Layered StructureThe tax you pay to run multiple agents. Cline Kanban - SponsorWhat Is Vertical Slice Architecture?Anatomy of a SliceWiring Slices TogetherCross-Cutting ConcernsShared Logic Between SlicesTradeoffsWhen to Use (and When Not To)📌 TL;DRNext StepsSort: