Where code livesintermediate
A vertical slice keeps one feature — its endpoint, its validation, its data access — in one folder, so changing checkout means opening one place instead of four layers.
app.ts does everything: data, handlers, routes and wiring, in one long file. Split it so each part has one job — handlers in the controller, routes in a router, and app.ts only wiring — without changing a single response.
Every response unchanged, handlers typed in the controller, a logic-free router with relative paths, and a short app.ts.
Published in full, before you start — every point is one of these and there is nothing else. Each one runs your code; it is not a search for keywords.
A vertical slice keeps one feature — its endpoint, its validation, its data access — in one folder, so changing checkout means opening one place instead of four layers.
A generic function takes its types as parameters, so one function serves menu items, orders and customers while handing each caller back its own type — where any would hand back nothing the compiler can check.