Loading...
Loading...
Scaffold a full-stack Cloudflare app from vite-flare-starter — React 19, Hono, D1+Drizzle, better-auth, Tailwind v4+shadcn/ui, TanStack Query, R2, Workers AI. Run setup.sh to clone, configure, and deploy.
npx skill4agent add jezweb/claude-skills vite-flare-starter| Layer | Technology |
|---|---|
| Frontend | React 19, Vite, Tailwind v4, shadcn/ui |
| Backend | Hono (on Cloudflare Workers) |
| Database | D1 (SQLite at edge) + Drizzle ORM |
| Auth | better-auth (Google OAuth + optional email/password) |
| Storage | R2 (S3-compatible object storage) |
| AI | Workers AI binding |
| Data Fetching | TanStack Query |
| Deployment | Cloudflare Workers with Static Assets |
references/tech-stack.md| Required | Optional |
|---|---|
| Project name (kebab-case) | Admin email |
| Description (1 sentence) | Google OAuth credentials |
| Cloudflare account (Jezweb Team or Personal) | Custom domain |
bash skills/vite-flare-starter/scripts/setup.sh.gitvite-flare-starterBETTER_AUTH_SECRET.dev.varspnpm installhttp://localhost:5173/api/auth/callback/google.dev.varspublic/favicon.svg<title>pnpm dev# Set production secrets
openssl rand -base64 32 | npx wrangler secret put BETTER_AUTH_SECRET
echo "https://PROJECT_NAME.SUBDOMAIN.workers.dev" | npx wrangler secret put BETTER_AUTH_URL
echo "http://localhost:5173,https://PROJECT_NAME.SUBDOMAIN.workers.dev" | npx wrangler secret put TRUSTED_ORIGINS
# If using Google OAuth
echo "your-client-id" | npx wrangler secret put GOOGLE_CLIENT_ID
echo "your-client-secret" | npx wrangler secret put GOOGLE_CLIENT_SECRET
# Migrate remote database
pnpm run db:migrate:remote
# Build and deploy
pnpm run build && pnpm run deploy| Symptom | Cause | Fix |
|---|---|---|
| Auth silently fails (redirect to homepage) | Missing TRUSTED_ORIGINS | Set TRUSTED_ORIGINS secret with all valid URLs |
| "Not authorized" on deploy | Wrong account_id | Remove account_id from wrangler.jsonc or set yours |
| Database operations fail | Using original database_id | Create YOUR database, use YOUR database_id |
| localStorage shows "vite-flare-starter" | Missing VITE_APP_ID | Set |
| Auth fails in production | BETTER_AUTH_URL mismatch | Must match actual Worker URL exactly |
| File | What Changes |
|---|---|
| Worker name, database name, bucket names |
| Package name, database references in scripts |
| App name, secret, URL |
| Title, meta tags |
CLAUDE.mdpublic/favicon.svgwrangler secret putreferences/customization-guide.md