Overview
Introduction to the Next-Cloudflare-Turbo framework
What is Next-Cloudflare-Turbo?
Next-Cloudflare-Turbo is a production-ready template that shows you how to build modern full-stack applications using Cloudflare's edge infrastructure. Instead of juggling multiple platforms and services, everything runs on Cloudflare's global edge network.
Cloudflare's network, generous free tiers, and built-in performance and security optimisations make it a one-stop platform for high-performance apps.
Not sure if Cloudflare Workers is right for your project? See Workers vs. Traditional Hosting to understand the trade-offs.
Why Choose This Stack?
Built for Performance
- Your application runs on Cloudflare's global edge network (280+ cities worldwide)
- Sub-100ms response times for users anywhere in the world
- Zero cold starts and instant scaling
Cost Effective
- Generous free tiers across all Cloudflare services
- No egress fees for data transfer
- Pay only for what you actually use
Developer Experience
- Full Next.js support including Server Actions, API routes, and middleware
- Type-safe database operations with Drizzle ORM
- Monorepo structure for organised, scalable development
- One platform for database, storage, compute, and deployment
What's Included
This template integrates everything you need for a modern web application:
Core Framework
- Next.js Application - The main frontend with server-side rendering, API routes, and Server Actions
- Turborepo - Monorepo management for organised code and shared packages
- TypeScript - Full type safety across the entire stack
Cloudflare Infrastructure
- Cloudflare Workers - Serverless compute that runs your Next.js app at the edge
- D1 Database - Serverless SQL database with global replication
- R2 Storage - Object storage for files and caching (S3-compatible, zero egress fees)
- Wrangler CLI - Development and deployment tool
Built-in Features
- Database Layer - Drizzle ORM with type-safe queries and migrations
- Caching Strategy - Intelligent caching for optimal performance
- Documentation Site - Built with Fumadocs for your project docs
Architecture Overview
The template uses a monorepo structure that keeps everything organised whilst allowing for easy scaling:
Applications (/apps)
Main App - Your primary Next.js application with dashboard, user management, and data visualisation
Documentation - This documentation site built with Next.js and Fumadocs
Shared Packages (/packages)
Database Package (@nct/db) - Drizzle ORM setup, schemas, and database utilities shared across applications
TypeScript Config (@nct/typescript-config) - Shared TypeScript configurations
Cloudflare Services
Your applications deploy to Cloudflare Workers, with direct access to D1 databases, R2 storage, and other Cloudflare services through native bindings.
Why This Matters: This architecture allows you to add new applications that immediately benefit from the existing database layer, and infrastructure setup.
Next steps
How is this guide?
Last updated on