Skip to content

KitsuneKode/template-nextjs-express-trpc-better-auth-monorepo

Repository files navigation

Next.js Express tRPC Bun Prisma

Next.js × Express × tRPC × Bun × Better Auth × Prisma × Turborepo Template

Kickstart your next project with a modern, scalable, and type-safe monorepo template.
Production-ready, batteries included, and easy to extend.


🧪 Use this template

bun create turbo@latest --example https://github.com/KitsuneKode/template-nextjs-express-trpc-bettera-auth-monorepo
cd my-app
bun install
bun dev

Requires Bun: Bun

🔗 Repository


🚀 Features

  • Full-Stack Ready: Next.js frontend, Express backend, tRPC for typesafe APIs.
  • Ultra-Fast Tooling: Powered by Bun for rapid installs and scripts.
  • Type Safety: End-to-end TypeScript, including API contracts.
  • Modular Auth: Plug-and-play authentication package.
  • Reusable UI: Shared component library for consistent design.
  • Monorepo Power: Code sharing and easy scaling with Turborepo.
  • Production Best Practices: Pre-configured for real-world deployments.

🗂️ Project Structure

apps/
  api/        # Express backend (tRPC, Auth, Prisma)
  client/     # Next.js frontend (tRPC client, UI)
packages/
  auth/       # Authentication logic(better-auth)
  store/      # Prisma schema & DB access
  trpc/       # tRPC routers & helpers
  ui/         # Shared UI components
  common/     # Shared types & utilities
  backend-common/ # Backend-specific shared code

⚡ Quick Start

  1. Install dependencies (with Bun):

    bun install
  2. Start development (all apps/packages):

    bun dev
  3. Build everything:

    bun run build

🛠️ Why Use This Template?

  • Easy Initial Setup: Get started in minutes, not hours.
  • Type-Safe Everywhere: No more guessing types between client and server.
  • Scalable & Maintainable: Modular structure for growing teams and projects.
  • Modern Stack: Stay up-to-date with the latest best practices.
  • Ready for Production: Sensible defaults and extensible configuration.

📚 Learn More


📝 Author


📄 License

MIT


Want to contribute? Add badges, contribution guidelines, or a screenshot/demo section!

About

A modern, scalable, and type-safe monorepo template

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •