Next.js 16 starter with Neon Postgres, authentication, and row-level security.
- Framework: Next.js 16 (App Router) + React 19 + TypeScript
- Styling: Tailwind CSS v4 + shadcn/ui
- Database: Neon Serverless Postgres + Drizzle ORM
- Auth: Neon Auth (Better Auth) + Data API
- Security: Row-Level Security (RLS)
- Bun (recommended) or Node.js 18+
- Neon Account (required) - Create one here
# macOS / Linux
curl -fsSL https://bun.sh/install | bash
# Windows
powershell -c "irm bun.sh/install.ps1|iex"
# Or via npm
npm install -g bun-
Clone the repository
-
Install dependencies:
bun install
-
Set up Neon - Follow the Neon Setup Guide to:
- Create a Neon project
- Enable Neon Auth
- Enable Data API
- Get your DATABASE_URL
-
Create
.env.local:DATABASE_URL='postgresql://user:pass@ep-xxx-pooler.region.aws.neon.tech/neondb?sslmode=require'
-
Run migrations:
bun db:migrate
-
Start development server:
bun dev
bun dev # Start dev server (https://localhost:3000)
bun build # Production build
bun start # Start production server
bun lint # Run Biome linter
bun format # Format code with Biomebun db:generate # Generate migration files
bun db:migrate # Run migrations
bun db:studio # Open Drizzle Studiobunx shadcn@latest add <component-name>- Neon Database Setup - Account setup, Auth, Data API, CLI, branching
src/
├── app/ # Next.js App Router pages
├── components/ # React components
│ └── ui/ # shadcn/ui primitives
├── db/ # Drizzle schema and migrations
├── hooks/ # TanStack Query hooks
├── lib/ # Utilities and query functions
└── types/ # TypeScript types