Next.js Cloudflare Starter — Auth · Database · Edge Deploy
by Fran Moreno
€59
⚡ Next.js + Cloudflare Pages Starter Kit
Stop wasting weekends configuring boilerplate.
This starter kit gives you everything you need to launch a full-stack
application on Cloudflare's global edge network — auth included,
database ready, deployment automated.
─────────────────────────────────────────
🚀 WHAT YOU GET
─────────────────────────────────────────
✅ Next.js 15 with App Router
Full support for Server Components and Server Actions.
✅ Cloudflare Pages deployment
Pre-configured with @opennextjs/cloudflare, wrangler.toml
and open-next.config.ts. One command to ship globally.
✅ Better Auth — complete authentication
· Email/password sign up and sign in
· Google OAuth out of the box
· Session management with cookie caching
· Password reset flow
· Protected routes via middleware
✅ Drizzle ORM + Supabase (PostgreSQL)
Type-safe schema with all Better Auth tables included.
Add your own tables in minutes.
✅ Production-ready UI
Dark dashboard layout, sidebar navigation, auth forms,
toast notifications — all with Tailwind CSS.
✅ CI/CD with GitHub Actions
Push to main → build → deploy to Cloudflare Pages.
Secrets-based env management included.
✅ Security headers
X-Frame-Options, X-Content-Type-Options, Referrer-Policy
configured by default.
─────────────────────────────────────────
📦 WHAT'S INSIDE THE ZIP
─────────────────────────────────────────
nextjs-cloudflare-starter/
├── src/
│ ├── app/
│ │ ├── (auth)/ → login, register, reset-password
│ │ ├── (dashboard)/ → dashboard, settings
│ │ └── api/auth/ → Better Auth handler
│ ├── components/
│ │ ├── auth/ → LoginForm, RegisterForm
│ │ └── shared/ → Sidebar
│ └── lib/
│ ├── auth.ts → Better Auth server config
│ ├── auth-client.ts → Better Auth client hooks
│ ├── db/schema.ts → Drizzle schema
│ └── utils.ts
├── .github/workflows/ → GitHub Actions deploy
├── wrangler.toml
├── open-next.config.ts
├── drizzle.config.ts
├── .env.example
└── README.md → Full setup guide
─────────────────────────────────────────
⏱ FROM ZERO TO DEPLOYED IN ~30 MINUTES
─────────────────────────────────────────
1. Clone + npm install
2. Copy .env.example → .env.local and fill your keys
3. npm run db:migrate → schema applied to Supabase
4. npm run dev → running locally
5. Push to GitHub → auto-deployed to Cloudflare Pages
The README walks you through every step: Supabase setup,
Google OAuth credentials, Cloudflare Pages configuration
and GitHub Actions secrets.
─────────────────────────────────────────
👤 WHO IS THIS FOR
─────────────────────────────────────────
· Developers who want to ship fast without fighting config
· Indie hackers building SaaS on Cloudflare's edge
· Teams who need a solid, opinionated starting point
· Anyone who has spent hours debugging @opennextjs/cloudflare
so they don't have to do it again
─────────────────────────────────────────
🛠 TECH STACK
─────────────────────────────────────────
Next.js 15 · Cloudflare Pages · @opennextjs/cloudflare
Better Auth · Drizzle ORM · Supabase · Tailwind CSS
TypeScript · GitHub Actions
─────────────────────────────────────────
📄 LICENSE
─────────────────────────────────────────
MIT — use in personal and commercial projects, no attribution required.
─────────────────────────────────────────
Questions? Reach out at hello@yourdomain.com