落地 synastry/star/ask API 与 H5 页面,补齐 cece-frontend-re complete-design 证据文档,并加入 Android 模拟器截图抓取脚本。 Co-authored-by: Cursor <cursoragent@cursor.com>
1.4 KiB
1.4 KiB
Go 服务边界(冻结)
单二进制 apps/api;按包拆分,禁止跨层:Handler → Service → Repository。
详见 ../architecture.md。
Packages under internal/service/
| Package | 职责 | P1 |
|---|---|---|
user |
注册/游客升级/Session | Yes |
profile |
个人档案 CRUD、切换 | Yes |
portrait |
生成个人画像 → GrowthReport | Yes |
scale |
探索测试定义与计分 | Yes |
relation |
RelationInsight | Yes 必做 |
report |
GrowthReport 读取 + 权益裁剪 | Yes |
ask |
Thread/Message;P1 规则引擎 + 额度 | Yes(Demo) |
companion |
SolarTerm 读、Mood 写 | Shell |
membership |
成长会员状态与额度 | Yes |
order |
Order + pay-mock + DeepAccess 发放 | Yes |
internal/handler/:每域一组 handler,只做 bind/validate/调用 service。
internal/repository/:SQL;无 business unlock 规则(规则在 service/report + membership)。
跨域规则
- 权益判定只在
report/ask/membershipservice,不在 handler、不在 H5。 portrait与relation写growth_reports;读一律走report.Get(带裁剪)。ask强制校验profile归属当前 user。
禁止
- 新建
decode/match/unlock/fortune包名 - Handler 直连 DB
- 在 JSON 字段名使用
luck/fortune/ji_xiong