A full-stack boilerplate demonstrating a clean and modular tRPC integration inside a Next.js application. The tRPC API is mounted in /api/trpc
and encapsulated in a standalone package under packages/trpc
. It includes a complete CRUD example for users, using Drizzle ORM with PostgreSQL for persistence and shadcn/ui for a modern and elegant interface.
Features
- Next.js App Router for the frontend and backend.
- tRPC mounted as a dedicated API package under
packages/trpc
. - Full User CRUD example (Create, Read, Update, Delete).
- Drizzle ORM for type-safe database operations.
- PostgreSQL as the relational database.
- shadcn/ui for beautiful, accessible, and consistent UI components.
- TypeScript throughout the entire stack.
- Modular monorepo architecture for scalability and reusability.
Technical Stack
- Frontend: Next.js (App Router) + shadcn/ui
- Backend: tRPC mounted in
/api/trpc
- Database: PostgreSQL + Drizzle ORM
- Language: TypeScript
- Architecture: Monorepo with
packages/trpc
andpackages/db
Use Case
Perfect for developers building full-stack TypeScript applications that require:
- End-to-end type safety with no need for REST schemas.
- Simple yet scalable architecture via modular packages.
- A clean, modern UI powered by shadcn/ui.
- PostgreSQL persistence with Drizzle ORM.
This boilerplate provides a powerful, minimal, and production-ready setup for modern web applications using tRPC + Next.js + Drizzle ORM + shadcn/ui â making it an ideal foundation for your next SaaS or internal tool. đ
Boilerplate details
Last update
4 days agoBoilerplate age
4 days ago