Cloudflare starter module
Deployment setup
Maps Worker settings, environment bindings, migrations, routes, and deployment commands.
- Files
- 22
- Lines
- 999
- Languages
- Config + Markdown + TypeScript + SQL + JSON + TOML
Included files
This page lists paths and purposes, not source contents.
.env.example
Configuration required by this starter pack.
Config
16 lines
ADAPT.md
Give these instructions to the coding agent working in the buyer's Next.js project.
Markdown
119 lines
app/api/edge/agent/route.ts
Mounts scoped agent record actions at /api/edge/agent.
TypeScript
5 lines
app/api/edge/files/route.ts
Mounts customer-scoped R2 upload and download at /api/edge/files.
TypeScript
5 lines
app/api/edge/records/route.ts
Mounts authenticated record creation and listing at /api/edge/records.
TypeScript
6 lines
app/api/edge/verify/route.ts
Mounts deployment verification at /api/edge/verify.
TypeScript
5 lines
app/api/edge/webhook/route.ts
Mounts the signed webhook receiver at /api/edge/webhook.
TypeScript
5 lines
app/demo/route.ts
Serves a dependency-free page for clicking through records and R2 uploads.
TypeScript
113 lines
migrations/0001_init.sql
Configuration required by this starter pack.
SQL
86 lines
OPERATIONS.md
The code handles normal requests.
Markdown
30 lines
package.json
Configuration required by this starter pack.
JSON
22 lines
README.md
This starter gives a Next.js App Router application production-ready Worker routes, D1 records, customer-scoped R2 files, two-tier rate limiting, signed webhooks, background work, and deployment verification.
Markdown
89 lines
src/setup/create-bucket.ts
Creates every R2 bucket in the canonical deployment catalog.
TypeScript
54 lines
src/setup/create-database.ts
Creates the canonical D1 database and applies the starter schema locally.
TypeScript
134 lines
src/setup/create-webhook-secret.ts
Generates a strong webhook signing secret without writing it to disk.
TypeScript
18 lines
src/setup/deployment-config.ts
Defines the trusted catalog of Cloudflare resources this starter deploys.
TypeScript
66 lines
src/setup/seed-demo-session.ts
Seeds one local demo customer and rotates its bearer session token.
TypeScript
71 lines
starter.json
Configuration required by this starter pack.
JSON
6 lines
TROUBLESHOOTING.md
Find the symptom and apply the fix first.
Markdown
75 lines
tsconfig.json
Configuration required by this starter pack.
JSON
15 lines
types/cloudflare-env.d.ts
Declares every Cloudflare binding the starter reads at run time.
TypeScript
22 lines
wrangler.toml
Configuration required by this starter pack.
TOML
37 lines
Questions about deployment setup
Is this a Cloudflare Next.js starter?
Yes. The pack is built for Next.js apps that deploy through Cloudflare with Workers routes, D1 data, R2 files, rate limits, signed events, and verification connected.