vite-flare-starter by jezweb/claude-skills
npx skills add https://github.com/jezweb/claude-skills --skill vite-flare-starter克隆并配置这个开箱即用的 Cloudflare 启动项目,将其转化为一个独立的项目。最终生成一个完全重新品牌化、可部署的全栈应用。
| 层级 | 技术 |
|---|---|
| 前端 | React 19, Vite, Tailwind v4, shadcn/ui |
| 后端 | Hono (运行于 Cloudflare Workers) |
| 数据库 | D1 (边缘 SQLite) + Drizzle ORM |
| 认证 | better-auth (Google OAuth + 可选的邮箱/密码) |
| 存储 | R2 (兼容 S3 的对象存储) |
| AI | Workers AI 绑定 |
| 数据获取 | TanStack Query |
| 部署 | Cloudflare Workers 与静态资源 |
完整的依赖列表请参见 references/tech-stack.md。
询问以下信息:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 必需项 | 可选项 |
|---|---|
| 项目名称 (kebab-case) | 管理员邮箱 |
| 描述 (一句话) | Google OAuth 凭证 |
| Cloudflare 账户 | 自定义域名 |
执行以下操作来搭建项目脚手架。具体替换目标和 .dev.vars 模板请参见 references/setup-pattern.md。
.git,初始化新的仓库vite-flare-starter 替换为项目名称,范围包括 wrangler.jsonc (worker 名称、数据库名称、R2 存储桶名称)、package.json (名称、数据库引用) 和 index.html (标题、元数据)account_id,并将 database_id 替换为占位符0.1.0BETTER_AUTH_SECRET,使用 openssl rand -hex 32 (或 Python 的 secrets.token_hex(32)).dev.vars 文件 (将 kebab-case 名称转换为 Title Case 用于显示,下划线用于 ID)pnpm installpnpm run db:migrate:local脚本完成后:
http://localhost:5173/api/auth/callback/google.dev.varspublic/favicon.svg<title> 和元描述pnpm dev
检查:
# 设置生产环境密钥
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
# 如果使用 Google OAuth
echo "your-client-id" | npx wrangler secret put GOOGLE_CLIENT_ID
echo "your-client-secret" | npx wrangler secret put GOOGLE_CLIENT_SECRET
# 迁移远程数据库
pnpm run db:migrate:remote
# 构建并部署
pnpm run build && pnpm run deploy
关键 : 首次部署后,使用你实际的 Worker URL 更新 BETTER_AUTH_URL。同时将生产环境的 URL 添加到 Google OAuth 的重定向 URI 中。
| 症状 | 原因 | 解决方法 |
|---|---|---|
| 认证静默失败 (重定向到首页) | 缺少 TRUSTED_ORIGINS | 使用所有有效的 URL 设置 TRUSTED_ORIGINS 密钥 |
| 部署时显示 "Not authorized" | 错误的 account_id | 从 wrangler.jsonc 中移除 account_id 或设置你自己的 |
| 数据库操作失败 | 使用了原始的 database_id | 创建 你的 数据库,使用 你的 database_id |
| localStorage 显示 "vite-flare-starter" | 缺少 VITE_APP_ID | 在 .dev.vars 中设置 VITE_APP_ID=yourapp |
| 生产环境认证失败 | BETTER_AUTH_URL 不匹配 | 必须与实际的 Worker URL 完全一致 |
设置过程会自动处理以下内容:
| 文件 | 变更内容 |
|---|---|
wrangler.jsonc | Worker 名称、数据库名称、存储桶名称 |
package.json | 包名称、脚本中的数据库引用 |
.dev.vars | 应用名称、密钥、URL |
index.html | 标题、元标签 |
以下内容需要手动处理:
CLAUDE.md — 项目描述public/favicon.svg — 你的网站图标wrangler secret put完整的重新品牌化清单请参见 references/customization-guide.md。
每周安装数
362
代码仓库
GitHub 星标数
643
首次出现
2026年2月18日
安全审计
安装于
opencode323
github-copilot318
codex318
gemini-cli317
cursor312
kimi-cli308
Clone and configure the batteries-included Cloudflare starter into a standalone project. Produces a fully rebranded, deployable full-stack app.
| 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 |
See references/tech-stack.md for the full dependency list.
Ask for:
| Required | Optional |
|---|---|
| Project name (kebab-case) | Admin email |
| Description (1 sentence) | Google OAuth credentials |
| Cloudflare account | Custom domain |
Perform these operations to scaffold the project. See references/setup-pattern.md for exact replacement targets and the .dev.vars template.
.git, init fresh repovite-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)account_id and replace database_id with placeholder in wrangler.jsonc0.1.0BETTER_AUTH_SECRET using openssl rand -hex 32 (or Python secrets.token_hex(32))After the script completes:
Google OAuth (if using):
http://localhost:5173/api/auth/callback/google.dev.varsFavicon : Replace public/favicon.svg with your own
CLAUDE.md : Update project description and remove vite-flare-starter references
index.html : Update <title> and meta description
pnpm dev
Check:
# 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.
| 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 VITE_APP_ID=yourapp in .dev.vars |
| Auth fails in production | BETTER_AUTH_URL mismatch | Must match actual Worker URL exactly |
The setup process handles these automatically:
| File | What Changes |
|---|---|
wrangler.jsonc | Worker name, database name, bucket names |
package.json | Package name, database references in scripts |
.dev.vars | App name, secret, URL |
index.html | Title, meta tags |
These need manual attention:
CLAUDE.md — project descriptionpublic/favicon.svg — your faviconwrangler secret putSee references/customization-guide.md for the complete rebranding checklist.
Weekly Installs
362
Repository
GitHub Stars
643
First Seen
Feb 18, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
opencode323
github-copilot318
codex318
gemini-cli317
cursor312
kimi-cli308
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
105,000 周安装
Python类型注解模式指南:现代类型提示与Typing最佳实践
24 周安装
Web应用安全模式指南:OWASP Top 10防护、输入验证、身份认证与授权最佳实践
25 周安装
task-runner任务运行器:使用just简化项目命令执行,替代make的跨平台工具
30 周安装
EdgeOne Pages 一键部署:无需账户,秒级将HTML文件发布到公共URL
35 周安装
Vibe Security 安全扫描器 - 多语言代码漏洞检测与AI智能修复工具
38 周安装
wechat-publisher:一键发布Markdown文章到微信公众号草稿箱工具
323 周安装
.dev.varspnpm installpnpm run db:migrate:local