SuperAPI AI 工具集

ncode-project-setup

通用与其它

查看项目

更新于 10-15 20:31

技能介绍

用途:当用户提出创建新项目、搭建 SaaS 或开始构建时,按固定的 nCode Golden Stack 结构初始化项目,不偏离该结构。

Web 路线(Next.js): 使用 npx create-next-app@latest [project-name] --app --typescript --tailwind --eslint --src-dir --import-alias "@/*" 创建项目;随后依次执行 npx shadcn@latest init(选择 New York 风格、中性色)、npm install @supabase/ssr @supabase/supabase-js、npm install ai @ai-sdk/google、npm install posthog-js、npm install @sentry/nextjs。还需创建 .env.local(从 .env.example 复制,两者都建)、lib/supabase/client.ts 与 lib/supabase/server.ts、用于刷新认证会话的 middleware.ts、以及 app/providers.tsx(接入 PostHog 等 provider)。

移动路线(Expo): 使用 npx create-expo-app@latest [project-name] --template tabs 创建项目;然后安装 NativeWind + Tailwind CSS 配置、@react-native-firebase/app 与 auth、firestore、react-native-purchases(RevenueCat)、posthog-react-native;expo-router 已包含在模板中。

两条路线共同步骤:创建 .gitignore,包含 node_modules、.next/.expo、.env*、.DS_Store;创建 .env.example,以占位符列出所有必需环境变量;执行 git init 并做首次提交,提交信息为 "feat: initial project setup with nCode Golden Stack";创建 CLAUDE.md 写入项目特定约定;并建议用户运行 design-director agent 创建 DESIGN.md 来搭建设计系统。

限制与禁止事项:不要使用 Pages Router,只能用 App Router;不要安装 Prisma,直接使用 Supabase 客户端;不要使用 styled-components,改用 Tailwind/NativeWind;除非明确要求,否则不要创建 monorepo 结构。资料中未提供该技能的收费、价格、平台与效果信息。