Installation
Prerequisites
Before you begin, make sure you have:
- Node.js >= 20 (Vercel runs 20.x in production)
- A Clerk account — free tier, API keys for dev and prod
- A Neon Postgres database — free tier, pooled connection string
- A Stripe account — test mode keys for payments
- A Resend API key — for transactional email
Clone the starter
One command pulls the entire boilerplate with a clean git history:
$ npx create-next-app@latest my-app \
--example https://github.com/sirconscious/starter-kit
$ cd my-app $ npm install
Set environment variables
Copy .env.example to .env.local and fill in your keys:
$ cp .env.example .env.local
See the Environment Variables page for where to find each value.
Run the dev server
$ npm run dev
Open http://localhost:3000. You should see the app with sign-in, sign-up, and user profile pages already wired.
What's included
Environment Variables
The starter requires four environment variables. They are all documented in .env.example in the repo root.
Required variables
| Variable | Required | Where to find it |
|---|---|---|
| NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY | Yes | Clerk Dashboard → API Keys |
| CLERK_SECRET_KEY | Yes | Clerk Dashboard → API Keys |
| DATABASE_URL | Yes | Neon Dashboard → Connection Details (pooled) |
| DIRECT_URL | Yes | Neon Dashboard → Connection Details (direct) |
Pooled vs direct connection
DATABASE_URL uses the pooled Neon connection string (hostname includes -pooler). This is what your app uses at runtime — Prisma routes queries through Neon's PgBouncer-compatible pooler to prevent connection exhaustion on serverless functions.
DIRECT_URL is the direct (non-pooled) connection string. Prisma CLI needs this for schema operations (prisma migrate, prisma db push) that don't work through the pooler.
Full reference
For detailed setup guides, refer to the official documentation:
- Clerk Quickstart — get your API keys
- Neon Prisma Guide — create a database and get your connection strings
Optional keys
The starter also uses Stripe and Resend, but their keys are only required if you're using payments or email. Add them when needed:
STRIPE_SECRET_KEY— Stripe DashboardSTRIPE_WEBHOOK_SECRET— Stripe CLI or DashboardRESEND_API_KEY— Resend Dashboard
Authentication (Clerk)
Clerk is pre-configured in the starter. The pages, middleware, and components are already wired — here's how the setup works and how to customize it.
ClerkProvider
The app is wrapped in ClerkProvider in src/app/layout.tsx. This makes auth state available everywhere: