The Challenge
Professional athletes are financial outliers. Careers are short, peak earnings are concentrated into a handful of years, income is often multi-currency, and the cost of getting planning wrong is measured in decades. The wealth managers who work with them don't need another generic portfolio tool — they need a dashboard that models this kind of income trajectory honestly, stress-tests it, and communicates what it means without financial jargon.
Sport Legacy came to us with that exact brief: build an advisor-and-athlete-facing platform where a wealth manager can model cashflow, run scenarios, and explain the output to a client in the same screen.
What We Built
A full dashboard application covering ten areas of the financial picture: Overview, Cashflow, Income Risk, Balance Sheet, Liquidity, Scenarios, Wealth Projection, Financial Data, Clients and Settings.
Under the surface, the interesting pieces are:
- A multi-currency cashflow model across EUR, USD, GBP and AED, with live exchange-rate syncing rather than static conversion tables
- Five scenario models — Base, Conservative, Income Loss, Cut Expenses, Optimistic — driven by a pure-function engine so the same inputs always produce the same outputs, and every scenario is reproducible
- Wealth projections using a 4% Safe Withdrawal Rate and a 7% default growth assumption, with transparent parameters advisors can adjust per client
- AI-powered plain-English analysis via the Vercel AI SDK and OpenAI — the model receives the computed KPIs and produces a short, readable summary of the client's position that sits next to the numbers, not instead of them
- A role-aware access model on Postgres — wealth managers see their full book, client users see only their own linked profile, and row-level security enforces both at the database

How We Built It
Three architectural choices define this codebase:
The engine is pure. engine.ts, scenario.ts and projections.ts are deterministic, side-effect-free TypeScript modules. Data fetching lives in api.ts. UI lives in components. This separation means the financial logic is testable with Bun's test runner in isolation — no mocked Supabase, no mocked UI — and the numbers on screen always match the numbers in the spec.
RLS at the database, not in the app. Access is enforced in Postgres policies rather than in app-layer checks. That's the only way to give a client user a read token that genuinely cannot see another client's data, and it's what a wealth advisory must have before it can put this in front of a compliance team.
AI sits next to the numbers, not on top of them. The OpenAI layer reads computed KPIs and produces commentary. It never computes the financials itself. This matters: the scenario engine is auditable; the narrative is generated. Keeping those concerns separate is what makes the AI output usable in a high-trust domain.

The Outcome
Sport Legacy has a platform that can genuinely explain an athlete's financial position to the athlete, not just to the advisor. Scenario runs that previously took a spreadsheet and a meeting now happen in the same session, and the AI layer closes the gap between "here are the numbers" and "here's what they mean."
Operationally, the client can onboard new wealth managers without bespoke engineering, and projection assumptions are configurable per-client without touching the code.
Why It Matters
The brief for a dashboard like this is trivially easy to botch. Pile on charts, call it "AI-powered," ship. The work here was the opposite: a small, correct financial engine; a deliberate AI layer on top; access control strong enough to survive a compliance review. That's the difference between a demo and a system a wealth advisory can actually run a business on.
