system-design

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

System Design

系统设计

Generate comprehensive Technical Architecture Documents with modular design for startups.
生成针对创业公司优化的模块化设计的全面技术架构文档。

Design Principles

设计原则

  • Modularity: Separated concerns for independent testing and development
  • Simplicity: Minimal complexity appropriate for startup resources
  • Scalability: Designed to grow with user base
  • Cost-effectiveness: Optimized for startup budget
  • 模块化:关注点分离,支持独立测试与开发
  • 简洁性:复杂度最低化,适配创业公司资源
  • 可扩展性:可随用户规模增长而扩展
  • 成本效益:针对创业公司预算优化

Input

输入

Project folder path in
$ARGUMENTS
containing:
  • prd.md
    - Product requirements (required)
  • idea.md
    ,
    validate.md
    - Additional context (optional)
$ARGUMENTS
中的项目文件夹路径需包含:
  • prd.md
    - 产品需求文档(必填)
  • idea.md
    validate.md
    - 额外上下文(可选)

Workflow

工作流程

Phase 1: Setup & Validation

阶段1:设置与验证

  1. Verify
    prd.md
    exists
  2. Read supporting docs if present
  3. Read references/tech-stack.md for technology recommendations
  4. Backup existing
    tad.md
    if present
  1. 验证
    prd.md
    是否存在
  2. 若存在则读取支持文档
  3. 读取references/tech-stack.md获取技术建议
  4. 若存在现有
    tad.md
    则备份

Phase 2: Extract Context

阶段2:提取上下文

From PRD extract:
  • Product name and vision
  • Core features and requirements
  • User flows
  • Non-functional requirements
  • Third-party integrations
  • Analytics requirements
从PRD中提取:
  • 产品名称与愿景
  • 核心功能与需求
  • 用户流程
  • 非功能性需求
  • 第三方集成
  • 分析需求

Phase 3: Clarify Architecture

阶段3:明确架构

Ask user (if not clear):
DecisionOptions
DeploymentVercel/Netlify (recommended), AWS, GCP, Self-hosted
DatabasePostgreSQL, MongoDB, Supabase/Firebase, Multiple
AuthSocial (OAuth), Email/password, Magic links, Enterprise SSO
BudgetFree tier, <$50/mo, <$200/mo, Flexible
若信息不明确,询问用户:
决策项选项
部署Vercel/Netlify(推荐)、AWS、GCP、自托管
数据库PostgreSQL、MongoDB、Supabase/Firebase、多数据库
认证社交登录(OAuth)、邮箱/密码、魔法链接、企业SSO
预算免费层级、<$50/月、<$200/月、灵活预算

Phase 4: Research & Validation

阶段4:研究与验证

Conduct 5 research rounds:
  1. Technology Stack: Validate choices against industry standards
  2. Infrastructure: Compare hosting for cost and scalability
  3. Security: Review OWASP guidelines for chosen stack
  4. Risk Assessment: Identify bottlenecks, vendor lock-in
  5. Holistic Review: Ensure PRD alignment and startup feasibility
开展5轮研究:
  1. 技术栈:验证技术选择是否符合行业标准
  2. 基础设施:对比托管方案的成本与可扩展性
  3. 安全:针对所选技术栈审查OWASP指南
  4. 风险评估:识别瓶颈、供应商锁定等风险
  5. 全面审查:确保与PRD对齐且适配创业公司可行性

Phase 5: Generate TAD

阶段5:生成TAD

Create
tad.md
with sections:
  1. System Overview - Purpose, scope, PRD alignment
  2. Architecture Diagram - Mermaid diagrams for system and flows
  3. Technology Stack - Frontend, backend, database, infrastructure, DevOps
  4. System Components - Modular design with interfaces and dependencies
  5. Data Architecture - Schema, models, flows, storage
  6. Infrastructure - Hosting, environments, scaling, CI/CD, monitoring
  7. Security - Auth, authorization, data protection, API security
  8. Performance - Targets, optimization strategies, caching
  9. Development - Environment setup, project structure, testing, deployment
  10. Risks - Risk matrix with mitigations
  11. Appendix - Research insights, alternatives, costs, glossary
See references/tad-template.md for full template structure.
创建包含以下章节的
tad.md
  1. 系统概述 - 目的、范围、与PRD的对齐情况
  2. 架构图 - 系统与流程的Mermaid图表
  3. 技术栈 - 前端、后端、数据库、基础设施、DevOps
  4. 系统组件 - 模块化设计及接口与依赖关系
  5. 数据架构 - schema、模型、流程、存储
  6. 基础设施 - 托管、环境、扩展、CI/CD、监控
  7. 安全 - 认证、授权、数据保护、API安全
  8. 性能 - 目标、优化策略、缓存
  9. 开发 - 环境搭建、项目结构、测试、部署
  10. 风险 - 含缓解措施的风险矩阵
  11. 附录 - 研究见解、替代方案、成本估算、术语表
查看references/tad-template.md获取完整模板结构。

Phase 6: Output

阶段6:输出

  1. Write
    tad.md
    to project folder
  2. Summarize architecture decisions
  3. Highlight modular design benefits
  4. List cost estimates by phase
  5. Suggest next steps (setup dev environment, create tasks)
  1. tad.md
    写入项目文件夹
  2. 总结架构决策
  3. 强调模块化设计的优势
  4. 按阶段列出成本估算
  5. 建议后续步骤(搭建开发环境、创建任务)

Modification Mode

修改模式

For existing TAD changes:
  1. Create timestamped backup
  2. Ask what to modify (stack, infrastructure, security, data, scaling)
  3. Apply changes preserving structure
  4. Update revision history
针对现有TAD的修改:
  1. 创建带时间戳的备份
  2. 询问需修改的内容(技术栈、基础设施、安全、数据、扩展)
  3. 保留结构的前提下应用修改
  4. 更新修订历史

Guidelines

指南

  • Practical: Implementable solutions for startups
  • Cost-conscious: Consider budget implications
  • Modular: Emphasize separation of concerns
  • Specific: Concrete technology choices
  • Visual: Include mermaid diagrams
  • 实用性:为创业公司提供可落地的解决方案
  • 成本敏感:考虑预算影响
  • 模块化:强调关注点分离
  • 具体性:给出明确的技术选择
  • 可视化:包含Mermaid图表