A comprehensive website builder with 25+ built-in features, designed for Cloudflare deployment. Prisma-free architecture with centralized API client ready for Workers migration.
npm install
npm run dev
Then visit http://localhost:3000
| Route | Description |
|---|---|
/ |
Landing page with links to Dashboard and Builder |
/dashboard |
Data management dashboard (users, posts) |
/website-builder.html |
Full visual website builder |
/api/health |
API health check |
/api/users |
Users CRUD (GET, POST) |
/api/users/[id] |
Single user (GET, PUT, DELETE) |
/api/posts |
Posts CRUD (GET, POST) |
/api/posts/[id] |
Single post (GET, PUT, DELETE) |
src/
app/
page.tsx # Landing page
layout.tsx # Root layout
globals.css # Tailwind + theme
dashboard/page.tsx # Data dashboard (fetch-based)
api/
health/route.ts # Health check endpoint
users/route.ts # Users list + create
users/[id]/route.ts # User CRUD
posts/route.ts # Posts list + create
posts/[id]/route.ts # Post CRUD
lib/
api.ts # Centralized API client (fetch-based)
mock-data.ts # Mock data store (replace with Workers API)
types/
index.ts # TypeScript interfaces
public/
website-builder.html # Single-file visual builder
css/ # Builder CSS modules
js/ # Builder JS modules (12 files)
dist/
website-builder.html # Standalone builder (no build tools needed)
Frontend Component
↓ fetch()
lib/api.ts (centralized client)
↓ HTTP request
Next.js API Routes (/api/*)
↓ currently reads from
lib/mock-data.ts (in-memory mock store)
↓ replace with
Cloudflare Workers (D1 / KV / R2) ← future migration
This project is designed for zero-friction migration to Cloudflare:
src/app/api/*) — Currently return mock data. Replace mock data calls with fetch() to your Cloudflare Workers URL.NEXT_PUBLIC_API_BASE env var. Set it to your Workers URL and all data flows through Workers.website-builder.html) is pure static and works on Cloudflare Pages out of the box.# When ready to connect Cloudflare Workers:
NEXT_PUBLIC_API_BASE=https://your-workers.your-subdomain.workers.dev npm run dev
MIT