frappe-app-dev

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Frappe Full-Stack App Builder

Frappe全栈应用构建器

Global Rules

全局规则

  • Use bare
    bench
    . Not
    ./env/bin/bench
    . Not a full path.
  • Do not run
    which bench
    ,
    bench --version
    ,
    bench --help
    , or check frappe version. No discovery commands.
  • Do not delegate bench detection to a subagent. Run
    ls apps/ sites/ Procfile
    yourself.
  • Do not create DocType folders with
    mkdir
    . Frappe creates them via
    bench migrate
    .
  • Run
    bench start
    in a background process only.
  • Before running
    bench start
    , check if it's already running in an existing terminal. Do not start a second instance.
  • Always pass
    --site <site>
    explicitly to bench commands. Never run bare
    bench migrate
    .
  • 使用纯
    bench
    命令,而非
    ./env/bin/bench
    或完整路径。
  • 不要运行
    which bench
    bench --version
    bench --help
    或检查frappe版本,禁止使用探测类命令。
  • 不要将bench检测任务委托给子Agent,自行运行
    ls apps/ sites/ Procfile
  • 不要使用
    mkdir
    创建DocType文件夹,Frappe会通过
    bench migrate
    自动创建。
  • 仅在后台进程中运行
    bench start
  • 运行
    bench start
    前,检查现有终端中是否已在运行,不要启动第二个实例。
  • 执行bench命令时,务必显式传递
    --site <site>
    参数,切勿直接运行
    bench migrate

Flow Selection

流程选择

Determine which flow applies, then read ONLY the relevant file:
确定适用的流程后,仅阅读相关文件:

Creating a brand new app

创建全新应用

Read new-app.md — covers bench setup, app scaffolding, site creation, and installation.
阅读new-app.md —— 涵盖bench配置、应用脚手架搭建、站点创建与安装。

Working on an existing app

处理现有应用

Read existing-app.md — covers finding the bench, locating the app, confirming site, and extending features.
阅读existing-app.md —— 涵盖查找bench、定位应用、确认站点及扩展功能。

Feature References

功能参考

Load ONLY the references needed for the current task:
TopicWhen to loadFile
Site managementFinding/creating/managing sitessite-management.md
DocTypesCreating/modifying DocTypes, fields, namingdoctypes.md
ControllersDocument lifecycle, server logiccontrollers.md
Whitelisted APIsREST endpoints,
@frappe.whitelist()
api.md
Database & ORM
frappe.db
, queries, raw SQL
database.md
CachingRedis,
frappe.cache
caching.md
RealtimeWebSocket,
publish_realtime
realtime.md
Background jobs
frappe.enqueue
, scheduled jobs
background-jobs.md
Hooks
hooks.py
patterns
hooks.md
PermissionsRoles, DocType permissions,
has_permission
permissions.md
TestingWriting & running teststesting.md
Frontend & UIDesk UI, Vue SPA, portal pagesfrontend.md (router → 3 sub-files)
Bench CLIAll bench commands referencebench-operations.md
仅加载当前任务所需的参考文档:
主题加载时机文件路径
站点管理查找/创建/管理站点时site-management.md
DocTypes创建/修改DocTypes、字段、命名规则时doctypes.md
控制器文档生命周期、服务器逻辑开发时controllers.md
白名单APIREST端点开发、使用
@frappe.whitelist()
api.md
数据库与ORM使用
frappe.db
、查询、原生SQL时
database.md
缓存Redis、
frappe.cache
相关操作时
caching.md
实时功能WebSocket、
publish_realtime
使用时
realtime.md
后台任务
frappe.enqueue
、定时任务开发时
background-jobs.md
钩子函数
hooks.py
模式开发时
hooks.md
权限管理角色、DocType权限、
has_permission
使用时
permissions.md
测试编写与运行测试时testing.md
前端与UI桌面UI、Vue SPA、门户页面开发时frontend.md (路由 → 3个子文件)
Bench CLI所有bench命令参考时bench-operations.md

Important: Do NOT load all references at once. Read only what the current task requires.

重要提示:请勿一次性加载所有参考文档,仅阅读当前任务所需内容。