> tRPC End-to-End Typesafe APIs
Build typesafe APIs without REST/GraphQL. Shared types between server and client.
fetch
$
curl "https://skillshub.wtf/skillshub-team/catalog-batch5/trpc-fullstack?format=md"SKILL.md•tRPC End-to-End Typesafe APIs
tRPC
Server
import { initTRPC } from '@trpc/server';
import { z } from 'zod';
const t = initTRPC.create();
const appRouter = t.router({
getUser: t.procedure.input(z.string()).query(({ input }) => {
return db.user.findUnique({ where: { id: input } });
}),
createUser: t.procedure
.input(z.object({ name: z.string(), email: z.string().email() }))
.mutation(({ input }) => db.user.create({ data: input })),
});
export type AppRouter = typeof appRouter;
Client (React)
import { createTRPCReact } from '@trpc/react-query';
import type { AppRouter } from '../server/router';
const trpc = createTRPCReact<AppRouter>();
function UserPage({ id }: { id: string }) {
const { data: user } = trpc.getUser.useQuery(id);
const createUser = trpc.createUser.useMutation();
return <div>{user?.name}</div>;
}
Key: Full type inference from server to client, no codegen needed
> related_skills --same-repo
> Nix Dev Shells with direnv
Auto-activate reproducible dev environments with Nix flakes and direnv.
> Dagger with GitHub Actions
Run Dagger CI/CD pipelines in GitHub Actions for portable, testable builds.
> Bun + Hono API
Build fast APIs with Bun runtime and Hono framework.
> Deno Fresh Framework
Build full-stack web apps with Fresh on Deno. Islands, routes, and zero runtime overhead.
┌ stats
installs/wk0
░░░░░░░░░░first seenMar 18, 2026
└────────────