frappe-router
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseFrappe Router
Frappe Router
Route to the appropriate Frappe skill based on your task.
根据你的任务匹配对应的Frappe技能。
When to use
适用场景
- First step when starting any Frappe-related work
- To determine which specialized skill applies to your task
- 开展任何Frappe相关工作的第一步
- 确定你的任务适用哪种专业技能
Procedure
操作流程
0) Identify task type
0) 识别任务类型
| Task | Skill |
|---|---|
| Understand project structure, versions, apps | → |
| Scaffold new app, hooks, architecture, background jobs | → |
| Create/modify DocTypes, fields, controllers | → |
| Build REST/RPC APIs, webhooks, integrations | → |
| Customize Desk UI, form scripts, list views, JS API | → |
| Build Vue 3 frontends with Frappe UI, portals | → |
| UI/UX patterns from CRM/Helpdesk/HRMS | → |
| Create print formats, email templates, Jinja, PDFs | → |
| Build reports (Builder, Query, Script) | → |
| Create public web forms for data collection | → |
| Write or run tests | → |
| Set up dev environment with Docker/FM | → |
| Build CRM/Helpdesk/enterprise systems | → |
| 任务 | 对应技能 |
|---|---|
| 了解项目结构、版本、应用 | → |
| 搭建新应用、钩子、架构、后台任务 | → |
| 创建/修改DocTypes、字段、控制器 | → |
| 构建REST/RPC API、webhook、集成功能 | → |
| 自定义Desk界面、表单脚本、列表视图、JS API | → |
| 结合Frappe UI、门户搭建Vue 3前端 | → |
| 从CRM/Helpdesk/HRMS中提取UI/UX模式 | → |
| 创建打印格式、邮件模板、Jinja模板、PDF | → |
| 构建报表(报表构建器、查询报表、脚本报表) | → |
| 创建用于数据收集的公共Web表单 | → |
| 编写或运行测试 | → |
| 使用Docker/FM搭建开发环境 | → |
| 构建CRM/Helpdesk/企业系统 | → |
1) Run triage first (recommended)
1) 建议先执行项目诊断(triage)
Before deep work, run to understand:
frappe-project-triage- Project type (bench/FM/standalone)
- Frappe version
- Installed apps
- Available tooling
在深入开展工作前,先运行来了解:
frappe-project-triage- 项目类型(bench/FM/独立部署)
- Frappe版本
- 已安装的应用
- 可用工具
2) Combine skills as needed
2) 根据需要组合技能
Complex tasks may require multiple skills:
- New app = +
frappe-app-development+frappe-doctype-development+frappe-api-developmentfrappe-testing - Feature with UI = +
frappe-doctype-development+frappe-desk-customizationfrappe-api-development - Custom frontend = +
frappe-frontend-developmentfrappe-api-development - Document workflow = +
frappe-doctype-development+frappe-printing-templatesfrappe-reports - Enterprise app = +
frappe-enterprise-patternsfrappe-doctype-development
复杂任务可能需要多种技能组合:
- 新应用 = +
frappe-app-development+frappe-doctype-development+frappe-api-developmentfrappe-testing - 带UI的功能 = +
frappe-doctype-development+frappe-desk-customizationfrappe-api-development - 自定义前端 = +
frappe-frontend-developmentfrappe-api-development - 文档工作流 = +
frappe-doctype-development+frappe-printing-templatesfrappe-reports - 企业级应用 = +
frappe-enterprise-patternsfrappe-doctype-development
Quick decision tree
快速决策树
Is this about understanding the project?
→ frappe-project-triage
Is this about creating a new app or app architecture?
→ frappe-app-development
Is this about data models or DocTypes?
→ frappe-doctype-development
Is this about APIs or external access?
→ frappe-api-development
Is this about Desk UI, form scripts, or client-side JS?
→ frappe-desk-customization
Is this about a Vue 3 frontend or portal?
→ frappe-frontend-development
Is this about UI/UX patterns or app design?
→ frappe-ui-patterns
Is this about print formats, PDFs, or Jinja templates?
→ frappe-printing-templates
Is this about reports or data analysis views?
→ frappe-reports
Is this about public web forms?
→ frappe-web-forms
Is this about testing?
→ frappe-testing
Is this about local dev environment?
→ frappe-manager
Is this a complex enterprise system?
→ frappe-enterprise-patterns是否需要了解项目情况?
→ frappe-project-triage
是否需要创建新应用或设计应用架构?
→ frappe-app-development
是否涉及数据模型或DocTypes?
→ frappe-doctype-development
是否涉及API或外部访问?
→ frappe-api-development
是否涉及Desk界面、表单脚本或客户端JS?
→ frappe-desk-customization
是否涉及Vue 3前端或门户?
→ frappe-frontend-development
是否涉及UI/UX模式或应用设计?
→ frappe-ui-patterns
是否涉及打印格式、PDF或Jinja模板?
→ frappe-printing-templates
是否涉及报表或数据分析视图?
→ frappe-reports
是否涉及公共Web表单?
→ frappe-web-forms
是否涉及测试工作?
→ frappe-testing
是否涉及本地开发环境搭建?
→ frappe-manager
是否是复杂的企业级系统?
→ frappe-enterprise-patternsGuardrails
注意事项
- Always run triage first before making code changes to unknown projects
- Check Frappe version before recommending features (API availability varies significantly between v13, v14, v15, v16)
- Don't assume ERPNext - many projects use Frappe Framework without ERPNext
- Verify site context - commands like affect specific sites
bench migrate
- 务必先执行项目诊断:在对未知项目进行代码修改前,一定要先做诊断
- 检查Frappe版本:在推荐功能前先确认版本(v13、v14、v15、v16之间的API可用性差异很大)
- 不要默认使用ERPNext:很多项目仅使用Frappe Framework而不包含ERPNext
- 验证站点上下文:类似的命令会影响特定站点
bench migrate
Common Mistakes
常见错误
| Mistake | Why It Fails | Fix |
|---|---|---|
| Skipping project triage | Applying wrong patterns for version | Always run triage first |
| Using ERPNext-specific code in Frappe-only projects | Module not found errors | Check installed apps first |
| Wrong skill for task | Incomplete implementation | Match task type to skill carefully |
| Ignoring version differences | Deprecated/missing APIs | Check version compatibility in skill references |
| Working on wrong site | Changes don't appear | Always specify |
| Using vanilla JS/jQuery for frontends | Ecosystem mismatch | Use Frappe UI (Vue 3) via |
| Custom app shell for CRUD apps | Inconsistent UX | Follow CRM/Helpdesk patterns via |
| 错误 | 失败原因 | 修复方案 |
|---|---|---|
| 跳过项目诊断 | 针对错误版本应用了不匹配的模式 | 务必先执行项目诊断 |
| 在仅使用Frappe的项目中使用ERPNext专属代码 | 出现模块未找到错误 | 先检查已安装的应用 |
| 任务与技能不匹配 | 实现不完整 | 仔细匹配任务类型与对应技能 |
| 忽略版本差异 | API已弃用或缺失 | 在技能参考中检查版本兼容性 |
| 在错误的站点上操作 | 修改未生效 | 务必指定 |
| 前端使用原生JS/jQuery | 与生态系统不兼容 | 通过 |
| 为CRUD应用自定义应用外壳 | 用户体验不一致 | 通过 |