Skip to content

TIP

You've already created a project (or taken over an existing one) and opened its directory in Claude Code, Codex, Trae, or Cursor. Your next step isn't learning rabetbase commands — it's handing the prompts below to AI. The AI reads the project configuration, data model, and existing code on its own and carries out the work.

Before you start: have the AI verify the project state

Don't start by asking the AI which commands to run. Have it read the project facts first and confirm the project is ready for development.

INFO

Say this to the AI:

text
请检查当前目录是否已经具备 Rabetbase 项目开发条件。
确认项目结构、Lovrabet 应用绑定、环境、数据模型、页面目录、本地脚本、Backend Function 和 SQL 管理目录。
如果缺少准备工作,请按影响程度列出来,并说明下一步需要我确认什么。

The AI's answer should at least cover:

  • Whether the current directory is a Rabetbase project
  • Which Lovrabet app and environment the project is bound to
  • Whether the data model has been synced to your machine
  • Whether the page entry, build scripts, and local debugging work
  • Whether Backend Functions and SQL already have local managed directories

If the AI jumps straight into writing code, stop it.

Have the AI sync and review the business model

Your business model — datasets, fields, enums, and relations — already lives on the Lovrabet platform. Have the AI pull those facts instead of guessing field names.

INFO

Say this to the AI:

text
请同步并检查当前 Lovrabet 应用的数据模型。
拉取所有的API列表到本地;
围绕我要开发的功能,列出相关数据集、字段名、显示名、字段类型、必填项、枚举值、关联关系和可用操作。
标出哪些字段可以写入,哪些字段由平台自动维护。

What to verify:

  • Field names come from the platform, not guesses
  • Enums are written by value and displayed by label
  • Foreign keys come from real relations

WARNING

If the AI starts guessing fields:

text
请先停止写代码。
重新读取相关数据集字段、枚举值、必填项和关联关系。
把当前代码里所有猜测字段列出来,确认后再修改。

Develop the page

Tell the AI what page you need, what goes on it, and where the data comes from. The AI generates the page code on top of the project's existing React scaffold and SDK client.

INFO

Say this to the AI:

text
请基于当前项目新增一个 <页面名称> 页面。
页面需要包含 <筛选区 / 列表 / 详情抽屉 / 表单 / 图表>。
数据读写使用项目里的 Lovrabet SDK 客户端。
先检查数据集字段、枚举和关联关系,不要使用 mock 数据。
完成后说明新增或修改了哪些文件、页面路由是什么、还有哪些未验证风险。

When the page is done, have the AI self-review:

  • Does it call real data APIs
  • Does it handle loading, empty, error, and permission-denied states
  • Does it avoid fetching records one at a time in a loop
  • Does it follow the project's existing UI and routing conventions

WARNING

If the page looks done but still runs on mock data:

text
请检查这个页面是否仍在使用 mock、静态数组或临时数据。
如果有,请改成 Lovrabet SDK 或 Backend Function 的真实调用,并说明权限或环境是否阻断。

Debug locally

Get the page running locally before you jump to platform configuration.

INFO

Say this to the AI:

text
请启动当前项目的本地开发环境。
如果端口被占用,请换一个可用端口。
启动后告诉我访问地址,并检查首页、目标页面路由、接口请求和浏览器控制台错误。

If it won't open, have the AI check the port, certificates, dependencies, and current route first.

Wrap logic in a Backend Function

When a page needs validation, transactions, multi-table writes, data masking, permissions, or external integration, wrap that logic in a Backend Function — don't let the AI cram complex transactions into page code.

INFO

Say this to the AI:

text
请帮我设计一个 <功能名称> Backend Function。
先判断它应该是 ENDPOINT、HOOK 还是 COMMON。
检查相关数据集字段、必填项、枚举值、关联关系和权限边界,再生成本地脚本。
推送前先做状态检查和预览,并说明它会影响哪些数据集或接口。

WARNING

If you're not sure whether to write SQL or a Backend Function:

text
请先判断标准数据操作是否足够。
如果目标是复杂查询或统计,评估 SQL。
如果目标是事务、校验、脱敏、多表写入或外部系统集成,评估 Backend Function。
给出推荐方案和风险。

Write custom SQL

When standard data operations can't express complex statistics, aggregation, or joins, have the AI evaluate SQL.

INFO

Say this to the AI:

text
请帮我设计一个 <查询目标> 自定义 SQL。
先确认标准数据操作或已有 SQL 是否能复用。
如果必须新写,请先校验数据集来源、表名、字段名、筛选条件和风险。
完成后把 SQL 放到项目同步目录,并在推送前给我预览。

SQL is for queries and analytics — not for ad-hoc writes that bypass the business model. When deletes, truncates, or bulk replacements are involved, stop and confirm the risks first.

Build and plug into the parent app

After local verification passes, have the AI run a production build and an integration check.

INFO

Say this to the AI:

text
请为当前项目做一次生产构建。
构建后检查 dist 目录、JS/CSS 产物、模块格式和资源路径。
如果我要接入 Lovrabet 主应用,请告诉我页面路由、微应用唯一标识、资源加载方式和需要配置的资源 URL。

Before plugging into the parent app, confirm:

  • The page route matches the local file route
  • The JS/CSS asset URLs are directly accessible
  • The asset loading approach fits micro-frontend artifacts
  • Embedding won't render the local outer navigation a second time

Pre-release check

Once the feature is done, have the AI run an end-to-end check from local to platform.

INFO

Say this to the AI:

text
请对这次改动做发布前检查。
检查页面路由、数据模型、SDK 调用、Backend Function、SQL、构建产物、菜单资源和高风险写入。
把通过项、阻断项、未验证项分开列出来,不要把环境阻断写成已通过。

Before release, you should see at least:

  • The page opens locally
  • Fields, enums, and foreign keys all come from platform facts
  • No mock data posing as a real integration
  • Build artifacts generated with clear asset paths
  • Backend Function and SQL write actions previewed and confirmed
  • Anything you can't verify is explicitly flagged as environment-blocked or permission-blocked

基于飞书知识库同步生成,内容以飞书源文档为准