trpc-boundary

Align shared tRPC contracts and AppRouter types across frontend, backoffice, and server.

Updated Mar 14, 2026
One-click install
npx skills add https://github.com/jingjing2222/create-rn-miniapp --skill trpc-boundary
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: trpc-boundary
Source: https://github.com/jingjing2222/create-rn-miniapp/tree/main/skills/trpc-boundary
Command: npx skills add https://github.com/jingjing2222/create-rn-miniapp --skill trpc-boundary

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Changing tRPC contracts, AppRouter shape, or the order of client and server imports across a shared boundary can cause type drift, runtime mismatches, and slow development. This Skill provides a safe, repeatable flow to synchronize boundaries across the workspace without touching provider runtime layout or remote operations.

Core Features & Use Cases

  • Align shared contracts in packages/contracts and router shape in packages/app-router to establish a single source of truth.
  • Update frontend, backoffice, and server imports to reference package-root exports only, ensuring consistent consumption across the stack.
  • Provide a guided change-flow with validation steps and workspace verification to catch drift early.

Quick Start

Implement the boundary changes by updating the shared contracts and AppRouter, then run the workspace verification to confirm type compatibility across frontend, backoffice, and server.

Frequently Asked Questions about trpc-boundary

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

FAQPage Schema
How do I fix tRPC contract type drift across a monorepo frontend and server?

Synchronize tRPC client-server boundaries by updating shared contracts and AppRouter types across frontend, backoffice, and server. Use the contracts and app-router packages as a single source of truth to prevent type drift and runtime mismatches.

What is the best way to align tRPC AppRouter shape across a workspace?

The best way to align tRPC AppRouter shape is to enforce changes via the app-router package. Update frontend, backoffice, and server imports to reference package-root exports only, then validate type compatibility and verify with workspace tooling.

Does this tRPC boundary synchronization workflow work with Cloudflare deployments?

Yes, the tRPC boundary synchronization workflow applies directly to Cloudflare + tRPC overlays. It updates shared contracts and AppRouter types without altering provider runtime layout or remote operations.

Why do my tRPC shared contract imports cause runtime mismatches after updates?

Runtime mismatches occur when client and server imports diverge across the shared boundary. Resolve this by updating all imports to reference package-root exports only and validating type compatibility across the workspace.

Can I update provider runtime layouts when synchronizing tRPC client-server boundaries?

No, synchronizing tRPC client-server boundaries avoids touching provider runtime layout or remote operations. It strictly focuses on updating shared contracts, AppRouter types, and package-root imports to ensure type compatibility.

How do I verify type compatibility after updating tRPC contracts and AppRouter types?

Verify type compatibility by running the repository's workspace tooling after updating shared contracts and AppRouter types. This guided validation flow catches type drift early across frontend, backoffice, and server.