Skip to content

docs(architecture): v0.3 — document implemented backend (API surface, points rules, DB schema, roadmap) - #76

Merged
argszero merged 1 commit into
mainfrom
docs/architecture-v0.3
Aug 18, 2026
Merged

argszero merged 1 commit into
mainfrom
docs/architecture-v0.3

Conversation

@argszero

Copy link
Copy Markdown
Owner

Summary

Docs-only update: bump docs/architecture.md from v0.2 → v0.3 to reflect the implemented backend reality (P0-A/B/C + P1, now at v0.3.0). The doc previously only described the planned architecture (v0.2, 2026-08-15) — before the backend existed. This brings it in sync with the code:

Verification

  • Facts cross-checked against source: src/routes/mod.rs (routes), src/db.rs (schema v3), src/billing.rs / src/gift.rs (points rules), src/crypto.rs (AES-256-GCM), Cargo.toml (aes-gcm 0.10)
  • No code changes — docs only

- §4.1 网关层标注已实现:OpenAI/Anthropic 双协议 + SSE 流式 + 余额预检(可用余额口径)+ 完整 API 一览
- §4.2 补上游 key AES-256-GCM 加密(v1:<nonce>:<cipher>,ATP_MASTER_KEY → config.master_key → dev 随机兜底)
- §4.3/4.4 计量与账本标注已实现:点数公式、事务性 settle、双余额账户、每日赠送/惰性过期清理、先赠后永扣减、SHARE_RATIO=0.9、管理员充值 topup
- §4.6 管理台补管理员 API(role 判定/403、种子账号)
- §5 数据库设计改为实表(gift_grants/schema_version/quotas 双列),§6 补配置说明
- §7 路线勾掉 P0/P1(v0.1.0→v0.3.0,PR #71–#75)
@argszero
argszero merged commit 6f988cc into main Aug 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant