Cloudflare Monorepo
Boilerplate to be deployed to Cloudflare. Recommended for more technical products using the Cloudflare Suite.
Project structure
Click through the file tree to see the full product structure.
.czrc
.eslintrc.js
.node-version
.npmrc
package.json
pnpm-lock.yaml
pnpm-workspace.yaml
README.md
renovate.json
tsconfig.json
turbo.json
Tech Stack
- Framework: Next.js v15 with App Router
- Language: TypeScript with strict mode
- Build system: Turborepo
- Styling: TailwindCSS v4 + shadcn/ui
- Database: Cloudflare D1 (SQLite) + Drizzle ORM
- Auth: Lucia + GitHub OAuth
- Payments: Stripe
- Email: Resend + React Email
- AI: OpenRouter + AI SDK
- Real-time: pluv.io + Durable Objects
- Analytics: PostHog, Cloudflare Web Analytics + Google Analytics
- Blog: Notion X
- Docs: Fumadocs
- Deployment: OpenNext + Cloudflare Workers
- DNS: Cloudflare DNS
SEO
- Includes all important SEO tags
- Generate OG images via @vercel/og
- Typesafe JSON-LD rich snippet component
- Automatic sitemap generation
Database
- Powered-by Cloudflare D1 (SQLite) and Drizzle ORM
- Commands to generate and apply migrations to local, staging or production databases
- Run drizzle studio on local Cloudflare D1
- Guides on setting up Cloudflare D1 and migrations
Styling
- Powered-by TailwindCSS and shadcn/ui
- Swappable themes via shadcn themes
- Automatic light/dark mode
- Includes many custom components to support current features
Auth
- Powered-by Lucia
- GitHub OAuth included (for web)
Payment
- Powered-by Stripe
- Flat-rate subscriptions + usage-based overage fees
- e.g. NeonDB's "Launch" tier, and paying for more GBs that what's included.
- View the running billing estimate for next billing cycle
- Dashboard to track usage over time
- Download past invoices
- Webhooks to handle stripe real-time events
- Guides on setting up Stripe and reducing fraud
- Guides on setting up Cloudflare Tunnel for webhook testing
- Powered-by Resend and React Email
- Includes welcome email for newly created accounts
- Includes team invitation email, with limited ttl invite codes
- Guides on setting up Resend and avoiding the spam folder
- Guides on setting up Cloudflare Email Routing to send & receive emails from custom domains via Gmail
AI
- Powered-by OpenRouter and AI SDK
- Supports hundreds of models via OpenRouter
Real-time collaboration
- Powered-by pluv.io and Durable Objects
- Room authorization, real-time data and presence
Analytics
- Powered-by PostHog Cloudflare Web Analytics and Google Analytics
Teams management
- Teams, members and team invitations included
- Create projects under personal accounts or teams
- Invite members by email with short TTL invite codes
Blog
- Powered-by Notion X
- Write blog content with Notion and Notion AI
- Auto-generate SEO titles and descriptions with Notion AI
Docs
- Powered-by Fumadocs
- Write product documentation in MDX
- Auto-generate OG images
- AI friendly with llms.txt generation and AI-powered search
Deployment
- Powered-by OpenNext and Cloudflare Workers
- Guides on setting up Wrangler configs
- Guides on setting up your Cloudflare DNS
- Guides on deployment and connecting multiple Next.js zones
Misc.
- ChatGPT prompts for generating Terms of Service and Privacy Policies
- Secure API key generation