create-new-project
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesecreate-new-project
创建新项目
When to use
使用场景
Use this skill whenever the user wants to start a new web app using the standard stack:
- Next.js (App Router) + TypeScript
- Tailwind CSS + shadcn/ui
- Supabase (Postgres, Auth, Storage, Realtime)
- Deploy on Vercel
- API routes in Next.js for internal + third-party integrations
当用户想要使用以下标准技术栈启动新Web应用时,使用此技能:
- Next.js (App Router) + TypeScript
- Tailwind CSS + shadcn/ui
- Supabase (Postgres、身份验证、存储、实时功能)
- 部署至Vercel
- 用于内部及第三方集成的Next.js API路由
What you must ask (minimal)
必须询问的内容(最少项)
Ask only what is necessary:
- Project name (kebab-case recommended)
- Package manager: pnpm (default) / npm
- Supabase mode:
- "local-first" (init Supabase locally + migrations)
- "cloud-only" (create env placeholders; user will link later)
If the user explicitly wants external integrations, confirm:
- "public API for third-party order creation" yes/no (default: yes)
仅询问必要信息:
- 项目名称(推荐使用短横线分隔的kebab-case格式)
- 包管理器:pnpm(默认)/ npm
- Supabase模式:
- "local-first"(本地初始化Supabase + 迁移脚本)
- "cloud-only"(创建环境变量占位符;用户后续自行关联)
如果用户明确需要外部集成,请确认:
- 是否需要「用于第三方订单创建的公开API」(默认:是)
Execution plan (do this in order)
执行步骤(按顺序操作)
-
Create the project folder using the script (pick the right OS reminder):
- macOS/Linux/Git-Bash/WSL:
bash scripts/create-new-project.sh <name> - Windows PowerShell:
powershell -ExecutionPolicy Bypass -File scripts/create-new-project.ps1 -Name <name>
- macOS/Linux/Git-Bash/WSL:
-
Ensure the scaffold includes:
- Next.js app (App Router) + Tailwind
- shadcn/ui initialized
- Supabase client helpers (server + browser)
- +
.env.exampleplaceholders (never commit secrets).env.local - Supabase migration file with baseline schema for orders/sales (multi-tenant ready)
- Example API routes:
- (authenticated internal)
/api/v1/orders - (API key for third-party callers)
/api/v1/public/orders
-
After generation, run:
- install deps (if not already)
- (or npm) quick smoke test
pnpm dev - if Supabase CLI present and local-first: and confirm migration file exists
supabase init
-
Output to the user:
- what was created (high-level)
- exact next steps to connect Supabase Cloud + Vercel env vars
- how to call the public API endpoint from another system
-
使用脚本创建项目文件夹(根据操作系统选择对应提示):
- macOS/Linux/Git-Bash/WSL:
bash scripts/create-new-project.sh <name> - Windows PowerShell:
powershell -ExecutionPolicy Bypass -File scripts/create-new-project.ps1 -Name <name>
- macOS/Linux/Git-Bash/WSL:
-
确保模板包含以下内容:
- Next.js应用(App Router)+ Tailwind
- 已初始化的shadcn/ui
- Supabase客户端工具(服务端 + 浏览器端)
- +
.env.example环境变量占位符(切勿提交敏感信息).env.local - 包含订单/销售基准架构的Supabase迁移文件(支持多租户)
- 示例API路由:
- (需身份验证的内部接口)
/api/v1/orders - (供第三方调用的API密钥验证接口)
/api/v1/public/orders
-
项目生成后,执行以下操作:
- 安装依赖(若未自动安装)
- 运行(或npm dev)进行快速冒烟测试
pnpm dev - 若已安装Supabase CLI且采用local-first模式:执行并确认迁移文件存在
supabase init
-
向用户输出以下内容:
- 已创建的内容(概要)
- 关联Supabase Cloud + Vercel环境变量的具体后续步骤
- 如何从其他系统调用公开API端点
Guardrails
注意事项
- Do NOT add next-themes/react-day-picker unless versions are compatible with the chosen React/Next baseline.
- Do NOT commit , Supabase service role keys, or Vercel tokens.
.env.local - Keep the project "boring": simple, predictable, production-ready defaults.
- 除非与所选React/Next基础版本兼容,否则请勿添加next-themes/react-day-picker。
- 请勿提交、Supabase服务角色密钥或Vercel令牌。
.env.local - 保持项目「简洁实用」:采用简单、可预测的生产就绪默认配置。
References
参考资料
- See for backend/API model on Vercel + Supabase.
references/STACK.md - See for schema + RLS-ready patterns.
references/DB_SCHEMA.sql
- 查看获取Vercel + Supabase的后端/API模型。
references/STACK.md - 查看获取架构及支持RLS的实现模式。
references/DB_SCHEMA.sql