Setup guide
Deploy Flint in 20 minutes
Everything you need to go from clone to a live SaaS on Cloudflare.
1. Clone & install
git clone https://github.com/flint-dev/flint.git my-appcd my-app && npm install
2. Cloudflare setup
- 1.Create a free Cloudflare account at cloudflare.com
- 2.Create a D1 database: wrangler d1 create flint-db
- 3.Create an R2 bucket: wrangler r2 bucket create flint-storage
- 4.Create a KV namespace: wrangler kv namespace create CACHE
- 5.Update wrangler.toml with your database_id and kv namespace id
- 6.Run migrations: npm run db:migrate
3. Environment secrets
wrangler secret put BETTER_AUTH_SECRET # random 32-char stringwrangler secret put GOOGLE_CLIENT_IDwrangler secret put GOOGLE_CLIENT_SECRETwrangler secret put STRIPE_SECRET_KEYwrangler secret put STRIPE_WEBHOOK_SECRETwrangler secret put RESEND_API_KEY
4. Stripe configuration
- 1.Create three products in the Stripe dashboard: Pro ($29/mo), Lifetime ($249 one-time), and Flint kit ($149 one-time)
- 2.Copy the price IDs into wrangler.toml [vars] as NEXT_PUBLIC_STRIPE_PRO_PRICE_ID, NEXT_PUBLIC_STRIPE_LIFETIME_PRICE_ID, NEXT_PUBLIC_STRIPE_KIT_PRICE_ID, and STRIPE_KIT_PRICE_ID
- 3.Set up a webhook endpoint pointing to https://your-domain.com/api/stripe/webhook
- 4.Enable events: checkout.session.completed, customer.subscription.created/updated/deleted
5. Package the sellable kit
npm run package:kitnpx wrangler r2 object put flint-storage/kit/flint-latest.zip --file dist/flint-latest.zipKeep KIT_DOWNLOAD_KEY set to kit/flint-latest.zip unless you upload to a different R2 key
6. Google OAuth
- 1.Go to console.cloud.google.com → APIs & Services → Credentials
- 2.Create an OAuth 2.0 client ID (Web application)
- 3.Add authorized redirect URI: https://your-domain.com/api/auth/callback/google
- 4.Copy Client ID and Secret → wrangler secret put GOOGLE_CLIENT_ID / GOOGLE_CLIENT_SECRET
7. Deploy
npm run checknpm run build:cloudflarenpm run deploy # deploys to Cloudflare WorkersYour app is live — no servers, no monthly bill until you scale
Need help? Join the Discord community or open a GitHub issue.