An open-source Airtable style base builder, built end-to-end on Cloudflare.
Note
This is a prototype, not a production-ready product.
Stack:
- TanStack Start (RC) on Vite, deployed as a Cloudflare Worker
- Cloudflare D1 - bases, tables, fields, records, views
- Cloudflare R2 - attachments
- Durable Objects - one per table, for realtime cell sync + presence over WebSockets
- Workers AI - generate a table's schema and sample rows from a prompt
- Drizzle ORM + Drizzle Kit, Zod, Tailwind v4, Kumo (
@cloudflare/kumo)
# 1. install
npm install
# 2. create your D1 database and R2 bucket
npx wrangler d1 create cloudtable-db
npx wrangler r2 bucket create cloudtable-storage
# copy the printed database_id into wrangler.jsonc
# 3. generate + apply migrations locally
npm run db:generate
npm run db:migrate
# 4. run it
npm run dev| script | what it does |
|---|---|
dev |
Vite dev server with the Cloudflare plugin + local D1/R2 (runs db:migrate first via predev) |
build |
Production build |
preview |
Build + serve via vite preview |
deploy |
Build + wrangler deploy |
cf-typegen |
Regenerate worker-configuration.d.ts from wrangler |
db:generate |
Generate SQL migrations from src/db/schema.ts |
db:migrate |
Apply migrations to local D1 |
db:migrate:prod |
Apply migrations to remote D1 |
db:studio |
Open Drizzle Studio |
src/
db/schema.ts # drizzle tables + drizzle-zod schemas
server/ # server functions (bases, tables, fields, records, views)
routes/ # file-based routes + api/ routes
features/table/ # grid, kanban, gallery views, record panel, realtime
worker.ts # Worker entry - routes /ws to the TableRoom Durable Object
wrangler.jsonc # bindings + Worker config
AGENTS.md # patterns for AI coding agents working in this repo