What problem does it solve?
This skill provides a structured Flow middleware system for TSRPC to intercept and process requests and responses, enabling cross-cutting concerns like authentication, logging, encryption, and data transformation to be implemented in a consistent way.
Core Features & Use Cases
- Pre- and Post-API Flows: Seamlessly insert logic before and after API handlers.
- Authentication & Validation: Enforce access control and token validation across endpoints.
- Logging & Monitoring: Centralize request/response logging and timing.
- Data Transformation: Normalize or sanitize requests and responses as they pass through flows.
- Use Case: Add a preApiCallFlow to enforce auth on all protected APIs and a postApiCallFlow to log results.
Quick Start
Configure your TSRPC server to register flow handlers at startup, then start the server. For example, add pre-API flows to handle authentication and logging, followed by post-API flows for auditing.