Unmerged architecture evaluation
Supabase portfolio ledger — separate WIP lane
A substantial unmerged implementation adds portfolio domain/store/repository layers, in-memory and Supabase repositories, persisted funding and paper trades, atomic database RPCs, RLS-oriented schema, concurrency tests, and operational documentation.
Unmerged WIP
Keep main as product truth. This page describes a separate branch observed in Git, not shipped runtime behavior.
Observed branch
Audit snapshot
- Branch
codex/supabase-portfolio-ledger- Observed commit
11fb3974ea84e769827f576a2e790d015ae77a23Short reference: 11fb3974- Status
- unmerged
- Divergence at audit
- 14 commits ahead, 2 behind
main - Changed files
- 65
- Diff size
- +10,026 / −152 lines
Architectural impact
What the branch changes
These are the curated architecture implications of the observed branch. They are not an endorsement of merge readiness.
- Replaces canonical main's static PortfolioMockData composition with customer-scoped repository/store state.
- Adds Supabase migrations for ledger tables, atomic mutation RPCs, and zero-balance account provisioning.
- Routes order placement, funding, balances, holdings, history, and performance through persisted domain models.
- Touches ContentView, AppDependencies, RootView, Stock Detail, Watchlist, Profile, localization, project.pbxproj, and tests.
Generated comparison signals
- Adds repository-backed portfolio state and an in-memory implementation seam.
- Adds Supabase portfolio ledger migrations, RLS/RPC behavior, and database tests.
- Moves paper orders, funding, holdings, and performance toward persisted state.
| Area | Files |
|---|---|
| Documentation | 31 |
| iOS app | 27 |
| Supabase | 5 |
| Xcode project | 1 |
| iOS tests | 1 |
| Change types | 45 added · 20 modified · 0 deleted |
Review gate
Evaluation checklist
- Rebase or otherwise reconcile the two main commits missing from the branch before evaluating merge readiness.
- Re-run KYC submission/approval guards and prove non-approved customers cannot access portfolio or mutate balances.
- Review atomicity, idempotency, authorization, RLS, concurrent debit behavior, error taxonomy, and reconciliation.
- Confirm demo/paper terminology and ensure no UI implies a brokerage, RDN, or withdrawable real balance.
- Split or justify the broad 65-file scope; review project-file changes separately.
Evidence status
Freshness
- State
- verified
- Audited commit
11fb3974ea84e769827f576a2e790d015ae77a23- Audited on
- 2026-08-03
- Audit note
- Git ancestry check at audit time: branch is 14 commits ahead and 2 commits behind main; it is not an ancestor of main.