// the find
jherr/trpc-on-the-app-router
Code for the tRPC on the App Router video
Companion code for a YouTube video showing how to wire tRPC into Next.js's App Router, using Drizzle + SQLite as the backing store. It's for someone trying to figure out the specific plumbing of a tRPC route handler plus a server-side caller for use in React Server Components, not a starter template or library.
Separates the server-side tRPC caller (_trpc/serverClient.ts) from the client provider (_trpc/Provider.tsx) cleanly, which is the actual hard part of getting tRPC working under App Router since RSC and client components need different call paths. Uses Drizzle with a tracked migration file rather than just slapping an ORM on top with no schema history. Small enough (one TodoList component, one server router) to read start to finish in a few minutes and see exactly where each piece connects.
Dead for two years as of this check (last push Sept 2023) while both tRPC and App Router conventions have moved on since, so the patterns shown may not match current best practice. A sqlite.db binary is committed straight into the repo, which is a bad habit to copy into a real project. No tests, no CI, and the README is just the stock create-next-app boilerplate with zero explanation of the actual tRPC wiring it's supposed to teach — you need the video to make sense of the code.