feat(billing): enforce image generation quota with admin API and user display
Memind CI / Test, build, and release guards (push) Failing after 3s
Memind CI / Test, build, and release guards (push) Failing after 3s
Add period_images_bonus and ledger tracking, gate image_make on remaining quota, expose admin image-quota routes, show remaining image quota in the balance popover, and document that admin UI must live in memind_adm (5174) not ops. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -100,3 +100,22 @@ Cursor 额外加载:`.cursor/rules/mindspace-publish-chat-finish-guards.mdc`
|
||||
- Page Data API:见 [docs/page-data-api-usage.md](docs/page-data-api-usage.md);改动相关路径后执行 `npm run verify:page-data`
|
||||
- 生产隔离:[docs/service-isolation-runbook.md](docs/service-isolation-runbook.md)
|
||||
- 发版须 Git commit,禁止本机直 `rsync` 到 `103/105`
|
||||
|
||||
## 必读:管理后台 UI 边界(memind_adm 5174)
|
||||
|
||||
**平台管理后台的前端 UI 只能在独立仓库 `memind_adm`(本地 5174 / 生产 gadm)开发,禁止在 Memind 本仓库的 `ops/`(约 3002)新增管理功能。**
|
||||
|
||||
| 层级 | 位置 | 说明 |
|
||||
|------|------|------|
|
||||
| 管理后台 UI | `memind_adm` · **5174** | 用户、计费、图片额度、策略、模型中心等 **唯一合法入口** |
|
||||
| 管理后台 API | `memind_adm/server` · 8085 | 从 Memind 导入共享业务模块并暴露 `/admin-api/*` |
|
||||
| Memind `ops/` | 本仓库 · ~3002 | **遗留**:Plaza 运营 + 旧超级管理路由;**不得扩展**新页面或导航 |
|
||||
| Memind 后端 | 本仓库 · 8081 / 8082 | Portal、Admin API、计费/额度等业务逻辑可实现于此,但 UI 必须在 memind_adm |
|
||||
|
||||
新增管理功能时的正确流程:
|
||||
|
||||
1. 在 **Memind** 实现或扩展共享业务模块与 API(如 `billing-subscription.mjs`、`admin-routes.mjs`)。
|
||||
2. 在 **memind_adm** 添加页面、路由、API 客户端与导航。
|
||||
3. **不要**在 `ops/src/pages/admin/`、`ops/src/components/AdminLayout.tsx` 等处添加新功能。
|
||||
|
||||
详见 [ops/README.md](ops/README.md) 与 `memind_adm/AGENTS.md`。
|
||||
|
||||
Reference in New Issue
Block a user