Tag: middleware
TRPC Router Implementation Guide
A guide for implementing and modifying TRPC routers, focusing on middleware-based model injection and standardised procedure patterns.
Event-driven agent signal workflow pipeline
Implements a robust, event-driven framework for executing background agent workflows, decoupling complex side effects from synchronous chat requests. It processes events through a defined pipeline of sources, semantic signals, and concrete …
Robust RBAC system for access control
This library provides comprehensive patterns and utilities for implementing robust Role-Based Access Control (RBAC) systems. It includes permission matrices, route guards, policy classes, and ownership checks for securing both backend and f…
Request-scoped logging pattern for backend applications
Implements a centralized, request-scoped logging pattern using middleware wrappers for API routes, server actions, and helper functions. This ensures automatic log enrichment with critical context such as request IDs, user IDs, and specific…