docs(balance): architecture + ADRs + user guide (#145) #153

Merged
maximus merged 4 commits from issue-145-bilan-7 into main 2026-04-26 13:25:44 +00:00
Owner

Closes #145

Stacked on top of #152 (Issue #144). Base: issue-144-bilan-6. Will need rebase once upstream PRs merge.

Summary

  • docs/architecture.md — 5 new balance tables + 7 indexes, balance.service.ts (4 sections), 3 scoped hooks, compute_account_return command, /balance routes
  • docs/adr/0008-modified-dietz-pour-rendement.md — choice rationale vs TWR/IRR
  • docs/adr/0009-proxy-price-fetching-via-maximus-api.md — privacy proxy architecture (BLOCKED implementation in #143, ADR documents the design)
  • docs/adr/0010-fk-restrict-balance-transfers.md — ON DELETE RESTRICT for Modified Dietz reproducibility
  • docs/guide-utilisateur.md — new "Bilan" section: snapshots, transfers, returns multi-horizons (price-fetching mentioned as upcoming Phase 5)
  • i18n FR/EN docs.* keys synced
  • CHANGELOG entries (FR + EN) under [Unreleased]

Notes

  • ADR 0009 documents architecture for Issue #143 (price-fetching) which is BLOCKED by maximus-api Phase 2 — impl section deferred
  • Price-fetching mentions in guide are flagged "à venir / coming soon"

Test plan

  • cargo check
  • npm run build (no test changes, sanity validation)
  • npm test (existing pass)
  • Manual verification of docs rendering — pending human

Generated autonomously by /autopilot run of 2026-04-25

Closes #145 > Stacked on top of #152 (Issue #144). Base: issue-144-bilan-6. Will need rebase once upstream PRs merge. ## Summary - `docs/architecture.md` — 5 new balance tables + 7 indexes, balance.service.ts (4 sections), 3 scoped hooks, compute_account_return command, /balance routes - `docs/adr/0008-modified-dietz-pour-rendement.md` — choice rationale vs TWR/IRR - `docs/adr/0009-proxy-price-fetching-via-maximus-api.md` — privacy proxy architecture (BLOCKED implementation in #143, ADR documents the design) - `docs/adr/0010-fk-restrict-balance-transfers.md` — ON DELETE RESTRICT for Modified Dietz reproducibility - `docs/guide-utilisateur.md` — new "Bilan" section: snapshots, transfers, returns multi-horizons (price-fetching mentioned as upcoming Phase 5) - i18n FR/EN docs.* keys synced - CHANGELOG entries (FR + EN) under [Unreleased] ## Notes - ADR 0009 documents architecture for Issue #143 (price-fetching) which is BLOCKED by maximus-api Phase 2 — impl section deferred - Price-fetching mentions in guide are flagged "à venir / coming soon" ## Test plan - [x] cargo check - [x] npm run build (no test changes, sanity validation) - [x] npm test (existing pass) - [ ] Manual verification of docs rendering — pending human Generated autonomously by /autopilot run of 2026-04-25
maximus added 4 commits 2026-04-25 21:07:23 +00:00
Update docs/architecture.md to reflect the Bilan feature:
- BDD: 5 new tables + 7 indexes + CHECK + FK invariants (CAD lock,
  kind invariants, ON DELETE RESTRICT on transaction_id)
- Migrations: v8 + v9 added to history
- Services: balance.service.ts with its 4 logical sections
- Hooks: useBalanceAccounts / useSnapshotEditor / useBalanceOverview
- Commands: compute_account_return (1 new) + Phase 5 fetch_price stub
- Routing: /balance, /balance/snapshot, /balance/accounts
- Components: balance/ folder added in tree

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- 0008 — Modified Dietz: justifies the choice over ROI / TWR / IRR;
  references commands/return_calculator.rs and the 7 TDD cases.
- 0009 — Proxy price-fetching via maximus-api: documents the privacy
  proxy architecture (header stripping, no log correlation, fixed
  simpl-resultat UA), the Yahoo + CoinGecko adapter abstraction, the
  Bearer activation_token auth strategy, the rate limiting (client
  + server), and the dual-side premium gating. Implementation stays
  BLOCKED in #143; this ADR documents the agreed-upon design.
- 0010 — FK ON DELETE RESTRICT on balance_account_transfers
  .transaction_id: justifies the integrity-over-friction trade-off
  for Modified Dietz reproducibility.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
New section 10 "Bilan" walks through:
- the 3 routes (/balance, /balance/snapshot, /balance/accounts)
- snapshot entry (simple + priced kinds, prefill button)
- transfer linking with auto-suggested direction
- multi-horizon Modified Dietz returns (3M / 1Y / since inception)
  read alongside the unadjusted return for comparison
- the FK RESTRICT user-facing message on linked-transaction deletion
- price-fetching premium flagged "coming Phase 5"

Renumbers Settings to section 11.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
docs: i18n + CHANGELOG for Bilan documentation
All checks were successful
PR Check / rust (push) Successful in 22m56s
PR Check / frontend (push) Successful in 2m23s
ce15c903e4
- Add docs.balance.* keys (FR + EN) for the new Balance Sheet section
  consumed by DocsPage (title / overview / features / steps / tips).
- Wire the new section into DocsPage.tsx SECTIONS array with a Wallet
  icon, slotted between reports and settings.
- Add bilingual [Unreleased] CHANGELOG entry for #145 covering the
  architecture.md updates, the 3 ADRs, the new guide section and the
  i18n keys.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
maximus added the
status:approved
autopilot:pending-human
labels 2026-04-25 21:07:28 +00:00
maximus changed target branch from issue-144-bilan-6 to main 2026-04-26 13:25:38 +00:00
maximus merged commit 9c79b73871 into main 2026-04-26 13:25:44 +00:00
maximus deleted branch issue-145-bilan-7 2026-04-26 13:25:44 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: maximus/Simpl-Resultat#153
No description provided.