An opinionated starter template for building full-stack Next.js apps.
- Next.js 16
- React 19
- TypeScript
- Tailwind 4
- Shadcn + Base UI
- Zod
- TanStack Query
- TanStack Form
- Drizzle ORM + Neon
- Better Auth
- Resend
- Lucide React
- ESLint + Prettier
- Authentication - email/password sign-up and sign-in, and Google OAuth
- Email flows - forgot password and email verification
- Account management - update display name and password from a profile page
- Protected routes - authenticated route group
- Dark mode - system-aware theme switching
- Linting and formatting on save - including import sorting and Tailwind class sorting
- Pre-commit hooks - run formatting and linting checks on staged files
NOTE: For a basic starter project without authentication, check out to the basic branch.
npm installCreate a .env file with the following values:
| Variable | Description |
|---|---|
DATABASE_URL |
Create a Neon project and copy the connection string |
BETTER_AUTH_SECRET |
Secret for auth (generate with openssl rand -base64 32) |
BETTER_AUTH_URL |
App URL (http://localhost:3000 in development) |
RESEND_API_KEY |
Create a Resend API key and copy the string |
GOOGLE_CLIENT_ID |
Follow Better Auth docs to get your Google credentials |
GOOGLE_CLIENT_SECRET |
Follow Better Auth docs to get your Google credentials |
SEED_PASSWORD |
Default seed user password |
# Better Auth
BETTER_AUTH_SECRET=auth_secret
BETTER_AUTH_URL=http://localhost:3000
# Google
GOOGLE_CLIENT_ID=google_client_id
GOOGLE_CLIENT_SECRET=google_client_secret
# Neon
DATABASE_URL=neon_connection_string
# Resend
RESEND_API_KEY=api_key
# Seed
SEED_PASSWORD=123123123
npm run db:pushnpm run devThe project is optimized for Vercel. Push to a connected repo and Vercel will pick up the build automatically. Make sure to add all environment variables from the .env table above to your Vercel project settings.