fullstack-next-cloudflare
๐ Full-stack Next.js 15 + Cloudflare Workers template with D1 database, R2 storage, Better Auth, and Server Actions. Production-ready with automated CI/CD and generous free tiers.
Learn to set up preview deployments with GitHub Actions for Cloudflare. Build, migrate, deploy your Next.js app, and get PR URLs automatically.
How to Manage Database Schema Changes and Migrations in Production with Drizzle ORM and Cloudflare D1Safely manage database schema changes and migrations in production using Drizzle ORM and Cloudflare D1. Automate SQL file generation and application in your CI/CD for seamless updates.
How to Optimize React Server Components for Edge Runtime in Next.jsLearn to optimize React Server Components for the edge runtime in Nextjs. Keep bundles small, use async functions, and query edge data sources directly for faster performance.
How to Switch Between Local Development and Remote Cloudflare Resources in Next.jsSeamlessly switch between local dev and remote Cloudflare resources in Next.js. Learn to use NODE_ENV to manage R2, D1, and secrets across environments with the same API.
How to Implement Protected Routes with Middleware in Next.js on CloudflareImplement protected routes in Next.js on Cloudflare using middleware. Validate Better-Auth sessions at the edge and redirect unauthenticated users efficiently before page loads.
How to Handle Hot Module Replacement with the Wrangler Dev Server in Next.jsLearn how to handle hot module replacement with Wrangler dev server in Next.js. Run both servers concurrently for seamless UI hot-reloading and Cloudflare Workers runtime.
How to Configure Observability and Logging in Cloudflare Workers: A Complete GuideLearn to configure observability and logging in Cloudflare Workers by enabling the observability flag and using console methods. Monitor traces and logs in the Cloudflare Dashboard with this complete guide.
How to Use Drizzle ORM with SQLite for Edge Database Queries: A Complete Cloudflare D1 GuideLearn to use Drizzle ORM with SQLite for edge database queries on Cloudflare D1. Execute type-safe SQLite queries with the d1-http driver and @opennextjs/cloudflare.
How to Implement CORS Policies for R2 Storage Buckets in Next.js Cloudflare WorkersLearn to implement CORS policies for R2 storage buckets in Next.js Cloudflare Workers. Manually add headers to your Worker response to enable cross origin resource sharing.
How to Generate TypeScript Types from wrangler.jsonc Bindings in Cloudflare WorkersAutomatically generate TypeScript types from wrangler.jsonc bindings with the wrangler types CLI command. Get a strongly-typed Env interface for D1, R2, Vectorize, and AI bindings.
How to Debug Next.js Applications Running on Cloudflare Workers: Local and Production TechniquesDebug Next.js on Cloudflare Workers with `wrangler dev` for local debugging and `wrangler tail` for production log streaming. Master edge application troubleshooting.
How to Configure a Cloudflare R2 Bucket: Public Development URLs vs Custom DomainsConfigure your Cloudflare R2 bucket for development with public URLs and for production using custom domains. Learn how to set CLOUDFLARE_R2_URL in your Next.js app.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too โ