orpc

Composes layered oRPC procedures with authentication, authorization, tenant filtering, and strict input validation for API endpoints.

Updated Apr 5, 2023
One-click install
npx skills add https://github.com/fcalell/dotfiles --skill orpc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: orpc
Source: https://github.com/fcalell/dotfiles/tree/main/dot_claude/skills/orpc
Command: npx skills add https://github.com/fcalell/dotfiles --skill orpc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Type-safe API endpoint orchestration for scalable, secure backend services using oRPC with layered middleware and strict input validation.

Core Features & Use Cases

  • Layered procedure definitions with base, authenticated, and authorized patterns
  • Context-aware middleware for tenant, input normalization, and business-logic validation
  • Robust error handling with NOT_FOUND, CONFLICT, BAD_REQUEST, and internal errors; end-to-end defensive checks

Quick Start

Define a new oRPC-based endpoint by composing baseProcedure with authentication and authorization middlewares, then implement a handler.

Frequently Asked Questions about orpc

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

FAQPage Schema
How do I build type-safe API endpoints for robust microservices?

You build type-safe API endpoints by composing layered oRPC procedures with base, authenticated, and authorized patterns. This enforces strict input validation using schemas and applies middleware stacking to return consistent results.

How does middleware stacking work for tenant-aware context in backend services?

Middleware stacking for tenant-aware context works by applying context-aware middleware layers to oRPC procedures. These layers sequentially process tenant filtering, input normalization, and business-logic validation before reaching the handler.

How do I enforce strict input validation and robust error handling in TypeScript APIs?

You enforce strict input validation and robust error handling by applying schema validation to inputs and implementing defensive checks. This returns consistent results using returning() and handles NOT_FOUND, CONFLICT, and BAD_REQUEST errors.

What is the best way to orchestrate authenticated and authorized access for oRPC procedures?

The best way to orchestrate authenticated and authorized access is by composing baseProcedure with authentication and authorization middlewares. This layered approach ensures tenant-aware context and deterministic IDs before implementing the handler.

Can I use oRPC to apply tenant filtering and deterministic IDs in scalable backend services?

Yes, you can use oRPC to apply tenant filtering and deterministic IDs in scalable backend services. The framework supports context-aware middleware that handles tenant isolation and enforces deterministic ID generation across procedures.

Why does my oRPC endpoint return a CONFLICT or BAD_REQUEST error during procedure composition?

Your oRPC endpoint returns a CONFLICT or BAD_REQUEST error when robust error handling intercepts invalid inputs or business-logic violations. End-to-end defensive checks enforce schema validation and catch internal errors before consistent results.