Context

Nest's guards/pipes/interceptors/filters are four ordered extension points around a handler. patties already ships a compose() middleware model that does the same job with one concept.

Decision

Module handlers run inside the existing middleware chain. Cross-cutting concerns are middleware; local concerns are plain calls in the handler. The framework introduces no phases of its own.

Consequences

One mental model, already documented and tested. Nothing to resolve per route at build beyond what patties already does. Cost: developers wanting Nest-style named slots must express them as middleware ordering (which is what they are).

Patties design specifications · a design exploration · All decisions