tsrpc-flow

Implement TSRPC Flow middleware for pre- and post-API request processing.

Updated Feb 3, 2026
One-click install
npx skills add https://github.com/NoirJ0e/tsrpc-ecommerce-admin-example --skill tsrpc-flow
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tsrpc-flow
Source: https://github.com/NoirJ0e/tsrpc-ecommerce-admin-example/tree/main/.trae/skills/tsrpc-flow
Command: npx skills add https://github.com/NoirJ0e/tsrpc-ecommerce-admin-example --skill tsrpc-flow

SYSTEM DOCUMENTATION & REQUIREMENTS

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.

Frequently Asked Questions about tsrpc-flow

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add authentication and logging to TSRPC API handlers?

You add authentication and logging to TSRPC API handlers by registering Flow middleware during server initialization. This intercepts requests using preApiCallFlow to enforce access control and postApiCallFlow to log results.

What is TSRPC Flow middleware used for?

TSRPC Flow middleware intercepts and processes requests and responses to handle cross-cutting concerns like authentication, logging, encryption, and data transformation across API handlers in pre- and post-execution stages.

Can I transform request data before it reaches my TSRPC server logic?

Yes, you can transform request data before server logic by configuring preApiCallFlow handlers. This normalizes or sanitizes incoming requests as they pass through the flow before reaching the main API handler.

Does TSRPC Flow support intercepting responses after API execution?

Yes, TSRPC Flow supports intercepting responses after API execution using postApiCallFlow handlers. This allows you to transform response data, audit results, and monitor timing across endpoints.

What's the best way to enforce access control across all TSRPC endpoints?

The best way to enforce access control across TSRPC endpoints is registering a preApiCallFlow handler at startup. This centralizes token validation and access policies before any API logic executes.