This is a feature-packed Turborepo starter with additional tools for modern web applications, including Auth.js 5, Stripe integration, Resend for transactional emails, and typesafe environment variables.
- Node.js 20.x or later
 - pnpm 9.x or later
 - Git
 
# Clone the repository
git clone https://github.com/codersaadi/turborepo-shadcn.git my-app
# Navigate to the project
cd my-app
# Install dependencies
pnpm installDATABASE_URL="postgresql://postgres..."
NEXT_PUBLIC_HOST="http://localhost:3000"
RESEND_KEY="re_2bb..."
RESEND_AUDIENCE_ID="uuid"
GITHUB_CLIENT_ID=""
GITHUB_CLIENT_SECRET=""
GOOGLE_CLIENT_SECRET=""
GOOGLE_CLIENT_ID=""
AUTH_SECRET="XCX/Pzf7eiPgfKY2dPh/2HVC0y9dvfEAiaxTeO0QdZuSvgNjczEINYOyejFbOvFw
yGXouZXOdIfgEXkaqiM58w=="
NEXT_PUBLIC_PRICE_ID_BASIC="price_1Pq55"
NEXT_PUBLIC_PRICE_ID_PREMIUM="price_1Pq55d"
STRIPE_API_KEY="sk_test_51"
EMAIL_FROM=""
UPSTASH_REDIS_REST_URL="https://**.upstash.io"
UPSTASH_REDIS_REST_TOKEN=***
This Turborepo includes the following packages/apps:
docs: a Next.js app, Fumadocs , Mdxweb: another Next.js app@repo/ui: a shared React component library using shadcn/ui@repo/apiAPI package with tRPC and Zod schemas@repo/env: shared env package , typesafe validated env.@repo/db: a shared database package for scaling easily.@repo/analytics: Analytics provider with flexible options.@tooling/typescript-config: sharedtsconfig.jsons used throughout the monorepo@tooling/biome-config: shared Biome configurations for linting and formatting@authjs/core: core auth features , actions , schema, middleware.@authjs/client: auth client components , forms etc.@repo/email: react email , create and test your emails.@repo/rate-limit: upstash rate limiting . Each package/app is 100% TypeScript.
This Turborepo comes packed with powerful features:
- TypeScript for robust type checking
 - Next.js for modern web applications
 - Strict ESM modules support
 - Fuma for documentation
 - Authjs formely next-auth@latest
 - TRPC Trpc Quickstart
 - βοΈ Email Resend for sending transactional emails, such as user invitations or notifications
 
- Auth.js 5
 - OAuth Providers
 - Type-safe User Sessions
 
- Typesafe API Layer
- End-to-end type inference
 - Shared schemas between client and server
 - Strong error handling
 
 - React Query Integration
- Automatic caching
 - Optimistic updates
 - Background synchronization
 
 
- Stripe Payments
 - Resend Email
 - Shadcn/UI Components
 
- shadcn/ui for beautiful, accessible components
 - Tailwind CSS for utility-first styling
 
- Biome for lightning-fast linting and formatting
 
- Docker support for production deployment
 - Workspace-aware commands
 - Turborepo remote caching
 
- Husky for Git hooks management
 - Commitlint for conventional commit messages
 - Automated pre-commit quality checks
 - react-email for developing react email templates.
 
# Development
pnpm dev        # Start all apps in development mode
pnpm build      # Build all apps and packages
# Linting & Formatting
pnpm lint       # Lint and auto-fix all files using Biome
pnpm format     # Format root configuration files
pnpm email dev # will start email server (react email dev server)
# DB Package
pnpm db db:generate 
pnpm db db:migrate
pnpm db db:seed Seed user Email  : [email protected]
Seed user Password: codersaadi
.
βββ apps
β   βββ docs                 # Documentation site
β   βββ web                 # Main web application
βββ packages
β   βββ @repo/ui                  # Shared UI components
β   βββ api/               # Shared API & tRPC routes
β   βββ typescript-config   # Shared TypeScript configs
β   βββ biome-config        # Shared Biome configs
βββ package.json
- End-to-End Typesafe
- Shared types across client and server
 - Zero-config type inference
 
 - Advanced Query Management
- Automatic caching
 - Background refetching
 - Optimistic updates
 
 
- Centralized error factory
 - Typesafe error responses
 - Detailed error metadata
 - Production-ready error anonymization
 
- Monorepo with clear separation of concerns
 - Shared configurations
 - Easy scalability
 
Add new shadcn/ui components to the UI package:
pnpm ui add button
pnpm ui add card
pnpm ui add dialog
# ... and moreThis repo enforces a consistent git workflow:
- Stage your changes: 
git add . - Pre-commit hooks will automatically:
- Format and lint files
 - Run type checking
 - Validate commit message format
 
 
Turborepo can use Remote Caching to share cache artifacts across machines. To enable it:
npx turbo login
npx turbo linkThis
- Fork the repository
 - Create your feature branch
 - Commit with conventional commits Push and open a Pull Request
 
Created with β€οΈ by Saad Bukhari
MIT
- Turborepo Docs
 - tRPC Documentation
 - React Query Guides