Get the FREE Ultimate OpenClaw Setup Guide →

vite-flare-starter

npx machina-cli add skill jezweb/claude-skills/vite-flare-starter --openclaw
Files (1)
SKILL.md
4.8 KB

Vite Flare Starter

Clone and configure the batteries-included Cloudflare starter into a standalone project. Produces a fully rebranded, deployable full-stack app.

What You Get

LayerTechnology
FrontendReact 19, Vite, Tailwind v4, shadcn/ui
BackendHono (on Cloudflare Workers)
DatabaseD1 (SQLite at edge) + Drizzle ORM
Authbetter-auth (Google OAuth + optional email/password)
StorageR2 (S3-compatible object storage)
AIWorkers AI binding
Data FetchingTanStack Query
DeploymentCloudflare Workers with Static Assets

See references/tech-stack.md for the full dependency list.

Workflow

Step 1: Gather Project Info

Ask for:

RequiredOptional
Project name (kebab-case)Admin email
Description (1 sentence)Google OAuth credentials
Cloudflare accountCustom domain

Step 2: Clone and Configure

Perform these operations to scaffold the project. See references/setup-pattern.md for exact replacement targets and the .dev.vars template.

  1. Clone the repo and remove .git, init fresh repo
  2. Find-replace vite-flare-starter with the project name in wrangler.jsonc (worker name, database name, R2 bucket names), package.json (name, database refs), and index.html (title, meta)
  3. Remove hardcoded account_id and replace database_id with placeholder in wrangler.jsonc
  4. Reset package.json version to 0.1.0
  5. Generate BETTER_AUTH_SECRET using openssl rand -hex 32 (or Python secrets.token_hex(32))
  6. Create .dev.vars from template (convert kebab-case name to Title Case for display, underscore for ID)
  7. Optionally create Cloudflare D1 database and R2 buckets, update wrangler.jsonc with database_id
  8. Install dependencies with pnpm install
  9. Run local database migration with pnpm run db:migrate:local
  10. Initial commit

Step 3: Manual Configuration

After the script completes:

  1. Google OAuth (if using):

    • Go to Google Cloud Console
    • Create OAuth 2.0 Client ID
    • Add redirect URI: http://localhost:5173/api/auth/callback/google
    • Copy Client ID and Secret to .dev.vars
  2. Favicon: Replace public/favicon.svg with your own

  3. CLAUDE.md: Update project description and remove vite-flare-starter references

  4. index.html: Update <title> and meta description

Step 4: Verify Locally

pnpm dev

Check:

  • http://localhost:5173 loads
  • Shows YOUR app name, not "Vite Flare Starter"
  • Sign-up/sign-in works (if Google OAuth configured)

Step 5: Deploy to Production

# 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

Critical: After first deploy, update BETTER_AUTH_URL with your actual Worker URL. Also add the production URL to Google OAuth redirect URIs.

Common Issues

SymptomCauseFix
Auth silently fails (redirect to homepage)Missing TRUSTED_ORIGINSSet TRUSTED_ORIGINS secret with all valid URLs
"Not authorized" on deployWrong account_idRemove account_id from wrangler.jsonc or set yours
Database operations failUsing original database_idCreate YOUR database, use YOUR database_id
localStorage shows "vite-flare-starter"Missing VITE_APP_IDSet VITE_APP_ID=yourapp in .dev.vars
Auth fails in productionBETTER_AUTH_URL mismatchMust match actual Worker URL exactly

What Gets Rebranded

The setup process handles these automatically:

FileWhat Changes
wrangler.jsoncWorker name, database name, bucket names
package.jsonPackage name, database references in scripts
.dev.varsApp name, secret, URL
index.htmlTitle, meta tags

These need manual attention:

  • CLAUDE.md — project description
  • public/favicon.svg — your favicon
  • Google OAuth — redirect URIs
  • Production secrets — via wrangler secret put

See references/customization-guide.md for the complete rebranding checklist.

Source

git clone https://github.com/jezweb/claude-skills/blob/main/plugins/cloudflare/skills/vite-flare-starter/SKILL.mdView on GitHub

Overview

Vite Flare Starter clones a batteries-included Cloudflare project and turns it into a standalone, deployable full-stack app. It combines React 19, Hono on Cloudflare Workers, D1+Drizzle ORM, better-auth, Tailwind v4 with shadcn/ui, TanStack Query, R2 storage, and Workers AI to deliver a ready-to-run stack.

How This Skill Works

The workflow automates cloning and branding the starter, then replacing identifiers across wrangler.jsonc, package.json, and index.html. It generates a .dev.vars file, installs dependencies, runs local migrations, and finally builds and deploys the app with Cloudflare Workers and static assets. Use setup.sh to clone, configure, and prepare the project for deployment.

When to Use It

  • You want a batteries-included Cloudflare app scaffold powered by React 19, Hono, D1+Drizzle, and Tailwind.
  • You need edge-first storage with D1 and R2 aligned to your app's data model.
  • You require Google OAuth-based authentication via better-auth (plus optional email/password).
  • You are preparing a production deployment using wrangler and Cloudflare Workers.
  • You want an end-to-end starter that includes Workers AI binding and TanStack Query for data fetching.

Quick Start

  1. Step 1: Run setup.sh to clone and configure the project for your app name.
  2. Step 2: pnpm install && pnpm run db:migrate:local to set up the database locally.
  3. Step 3: pnpm run build && pnpm run deploy to publish to Cloudflare.

Best Practices

  • Run setup.sh in a clean repo and ensure all identifiers (names, URLs) are consistently replaced in wrangler.jsonc, package.json, and index.html.
  • Create and populate .dev.vars from the template, converting kebab-case project name to Title Case.
  • Keep secrets in Cloudflare via wrangler secret put and avoid committing sensitive values.
  • Test Google OAuth redirect URIs locally and in prod; validate TRUSTED_ORIGINS before deployment.
  • Migrate the local DB first, then migrate remotely after deploying to production.

Example Use Cases

  • edge-portal to manage customer docs with D1+Drizzle and R2 backing storage
  • shoplite-ecomm on Cloudflare with Google sign-in and edge-first data access
  • docs-hub with static assets, search, and TanStack Query data layer
  • inventory-d1-app for edge inventory management
  • media-streamer using Workers AI and R2 for assets

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers