Sanity · Next.js · Cloudflare

A starter template for Sanity, Next.js, and Cloudflare.

A scalable starter template combining Sanity CMS, Next.js, and Cloudflare for building high-performance, content-first web applications.

// what's included

One template. Everything pre-configured.

Sanity CMS

Manage all your content in Sanity Studio. Create pages, posts, and structured content with a flexible schema you own.

Next.js App Router

Built on the App Router with React Server Components, TypeScript, and Tailwind CSS. Fast by default.

Cloudflare Workers

Deploy globally with a single command Powered by OpenNext — no custom server configuration needed.

// how to use it

From first clone to live site.

Three steps is all it takes. Clone the repo, write your content in Sanity Studio, and deploy with a single command.

01

Clone & configure

Clone the repo and add your Sanity project ID and dataset to the environment variables. The schema is already set up.

~git clone ... && cp .env.example .env.local
02

Build your content

Open Sanity Studio and start creating pages using the page builder. Create and arrange content blocks as you need.

~pnpm dev
03

Deploy to Cloudflare

Run pnpm run deploy and your site is live globally across Cloudflare's network.

~pnpm run deploy

// features

Built to be extended.

Page builder

Compose pages from reusable content blocks defined in your Sanity schema. Add new section types without touching layout code.

Live preview & draft mode

Edit in Sanity Studio and see changes reflected instantly in a preview of your live site before publishing.

>_

One-command deploy

Run pnpm run deploy and your site is live globally. No platform dashboard required.

{}

TypeScript end-to-end

Types generated from your Sanity schema flow through to your components. No type mismatches between content and UI.

// latest posts

From the blog

This blog post is populated from your Sanity Studio.