project-scaffolder

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Project Scaffolder

项目脚手架工具

Generate production-ready starter repositories with best-practice conventions for any tech stack.
为任意技术栈生成符合最佳实践规范的生产级启动项目仓库。

Core Workflow

核心工作流程

  1. Determine stack: Ask user to specify or infer from context (Next.js, Vite, Nest, FastAPI, etc.)
  2. Select template: Use references/templates.md to choose the appropriate project structure
  3. Generate structure: Create complete folder tree with all necessary files
  4. Add baseline code: Include working "hello world" route/page as proof of concept
  5. Configure tooling: Add package.json/requirements.txt, tsconfig, linting, formatting configs
  6. Create scripts: Include dev, build, test, and deployment scripts
  7. Document setup: Generate comprehensive README with setup steps and next actions
  1. 确定技术栈:询问用户指定或从上下文推断(Next.js、Vite、Nest、FastAPI等)
  2. 选择模板:参考references/templates.md选择合适的项目结构
  3. 生成目录结构:创建包含所有必要文件的完整目录树
  4. 添加基础代码:包含可运行的“hello world”路由/页面作为概念验证
  5. 配置工具链:添加package.json/requirements.txt、tsconfig、代码检查、格式化配置
  6. 创建脚本:包含开发、构建、测试及部署脚本
  7. 编写搭建文档:生成包含搭建步骤和后续操作的详细README

Key Deliverables

核心交付内容

Every scaffolded project must include:
  • Folder tree: Well-organized src/, lib/, config/, tests/ structure
  • Baseline code: Working hello world endpoint or page
  • Package files: package.json, requirements.txt, Cargo.toml, etc.
  • Configs: TypeScript, ESLint, Prettier, environment files (.env.example)
  • Scripts: npm scripts or Makefile for common tasks
  • README: Setup instructions, tech stack overview, next steps
  • Git setup: .gitignore configured for the stack
每个搭建完成的项目必须包含:
  • 目录树:组织清晰的src/、lib/、config/、tests/结构
  • 基础代码:可运行的hello world端点或页面
  • 包管理文件:package.json、requirements.txt、Cargo.toml等
  • 配置文件:TypeScript、ESLint、Prettier配置及环境变量模板文件(.env.example)
  • 脚本:用于常见任务的npm脚本或Makefile
  • README文档:搭建说明、技术栈概述、后续步骤
  • Git配置:针对对应技术栈配置好的.gitignore

Stack-Specific Patterns

技术栈专属模式

See
references/templates.md
for detailed patterns per stack:
  • Next.js App Router
  • Vite + React
  • NestJS
  • FastAPI
  • Express + TypeScript
  • Vue + Vite
  • SvelteKit
查看
references/templates.md
获取各技术栈的详细模式:
  • Next.js App Router
  • Vite + React
  • NestJS
  • FastAPI
  • Express + TypeScript
  • Vue + Vite
  • SvelteKit

Best Practices

最佳实践

  • Use absolute imports (@/ alias) where supported
  • Include environment variable templates
  • Add basic error handling and logging setup
  • Configure path mappings in tsconfig
  • Include Docker files for containerization (optional)
  • Add GitHub Actions or CI workflow templates (optional)
  • 在支持的技术栈中使用绝对导入(@/ 别名)
  • 包含环境变量模板
  • 添加基础错误处理和日志配置
  • 在tsconfig中配置路径映射
  • 可选:添加用于容器化的Docker文件
  • 可选:添加GitHub Actions或CI工作流模板

Progressive Enhancement

渐进式增强

Start with minimal viable structure, then add:
  • Database setup (Prisma, TypeORM, SQLAlchemy)
  • Auth scaffolding (NextAuth, Passport, JWT)
  • API client setup (Axios, Fetch wrapper)
  • State management (Zustand, Redux, Pinia)
  • Testing setup (Jest, Vitest, Pytest)
从最小可行结构开始,逐步添加:
  • 数据库配置(Prisma、TypeORM、SQLAlchemy)
  • 认证搭建(NextAuth、Passport、JWT)
  • API客户端配置(Axios、Fetch封装)
  • 状态管理(Zustand、Redux、Pinia)
  • 测试配置(Jest、Vitest、Pytest)

Output Structure

输出结构

Present the complete project tree first, then create all files in proper locations. Always provide a summary of what was created and next steps to run the project.
先展示完整的项目目录树,然后在对应位置创建所有文件。始终提供已创建内容的摘要及运行项目的后续步骤。