What problem does it solve?
This Skill helps in creating and composing tRPC middleware for server-side requests, allowing users to build reusable middleware, extend context, and define base procedures.
Core Features & Use Cases
- Middleware Creation: Develop custom middleware using t.procedure.use() and t.middleware() for tasks like logging, timing, and tracing.
- Context Extension: Extend the context with additional information through opts.next({ ctx }) and build reusable middleware.
- Procedure Definition: Define base procedures like publicProcedure and authedProcedure, and access raw input with getRawInput() for logging and tracing.
- Use Case: Enhance your tRPC server with custom authentication, logging, and error handling middleware to improve server performance and security.
Quick Start
Initialize the middleware system in your server and define your custom middleware using the provided examples in the SKILL.md file.