Minimal and production-minded starter repository built with Better Auth, Next.js, shadcn/ui, Tailwind, Prisma, Brevo mailer, and PostgreSQL on Neon.
Clone it, add environment variables, and start building your product features.
Replace the image above with your own screenshot file in public (example: public/readme-preview.png).
- Next.js 16 (App Router)
- React 19
- TypeScript
- Better Auth (email/password + social login)
- Prisma ORM
- PostgreSQL (Neon)
- Brevo transactional mailer (email verification)
- Upstash Redis integration
- shadcn/ui components
- Tailwind CSS v4
- next-themes (dark and light mode)
- Zod + React Hook Form
- Next.js App Router architecture
- Reusable UI primitives in src/components/ui
- Theme support via next-themes
- Tailwind CSS + utility helpers (clsx, tailwind-merge)
- Better Auth configured in src/lib/auth.ts
- Email/password authentication enabled
- Email verification required before sign-in completion
- Social providers configured for Google and GitHub
- Prisma schema at prisma/schema.prisma
- Generated Prisma client in src/generated/prisma
- Models included by default:
- User
- Session
- Account
- Verification
- Brevo SMTP API integration in src/lib/mail-sender.ts
- Verification emails are sent through Brevo API
NOTE: Here I have used brevo in place of
nodemailer
- Upstash Redis client setup in src/lib/redis.ts
src/
app/
(auth)/
sign-in/
sign-up/
verify-email/
email-verified/
(protected)/
dashboard/
api/auth/[...all]/
components/
auth/
landing/
providers/
shared/
ui/
generated/prisma/
lib/
schemas/
prisma/
schema.prisma
migrations/
- Clone the repository
git clone <your-repo-url>
cd full_stack_starter- Install dependencies
bun installYou can also use npm, pnpm, or yarn if preferred.
- Create environment file
cp .env.example .env.localIf .env.example does not exist yet, create .env.local manually and use the variables from the section below.
- Run migrations
bun x prisma migrate dev --name <migration_name>- Start development server
bun devAdd these values in .env.local:
# App
NEXT_PUBLIC_APP_URL=http://localhost:3000
# Better Auth
BETTER_AUTH_SECRET=replace-with-strong-secret
BETTER_AUTH_URL=http://localhost:3000
# Database (Neon Postgres)
DATABASE_URL=postgresql://user:password@host:5432/dbname?sslmode=require
# Social auth
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
# Brevo mailer
BREVO_API_KEY=
EMAIL_USER=no-reply@yourdomain.com
# Upstash Redis
KV_REST_API_URL=
KV_REST_API_TOKEN=Notes:
- Ensure EMAIL_USER is a verified sender in Brevo.
- For production, use real domain URLs for BETTER_AUTH_URL and NEXT_PUBLIC_APP_URL.
- Keep secrets out of version control.
bun dev # Start dev server
bun build # Create production build
bun start # Start production server
bun lint # Run ESLint- User signs up with email/password or social provider.
- Email verification is triggered via Brevo.
- Verified users can access protected dashboard routes.
- Theme handling is provided by next-themes.
- UI components are styled for both dark and light themes.
- Set all environment variables in your hosting platform.
- Configure production database URL (Neon).
- Run Prisma migrations in your deploy pipeline.
- Ensure Brevo sender and API key are active.
- Set Better Auth URLs to your production domain.
Add your preferred license here.
