Phase 0 complete · Phase 1 spine is live
Today we did two things. We built the database that every future number will live in, shaped so it never needs a rebuild. And on top of it we lit up the Leadership dashboard — reading real numbers straight from that database, nothing typed in by hand. This page teaches you exactly what that means, and how the same foundation quietly serves all seven departments.
Read this first
Capture everything from day one. Compute every number, never type it. Visualize in sequence.
Most companies bolt tracking on later — and discover the data they needed was never captured, and can't be reconstructed. We do the opposite. From the very first lead and the very first hire, every event is written to an append-only ledger: a record that is only ever added to, never edited. Dashboards don't store numbers — they read the ledger and calculate. Change the underlying data and every number moves on its own. That's the difference between a spreadsheet someone fudges and a system you can trust to sell the company on one day.
Think of it like a bank. The ledger is the immutable record of what happened. The statements (your dashboards) are computed from it — you'd never let someone hand-edit a statement. When two systems disagree on a number, the field's designated owner wins (Stripe owns cash, GoHighLevel owns pipeline). One fact, computed once, shown at every altitude.
The architecture
Data flows top to bottom. We built the middle two today; the outer two get wired as real sources and departments come online.
Phase 0 — what we built
"Warehouse-shaped" means we built it today the way a $100M company's data warehouse is structured — so it scales up without ever being rebuilt.
These are the source of truth. Every fact is one row, stamped with a stable ID and a set of dimension tags. Rows are never edited or deleted — corrections go somewhere else (below). That immutability is what lets any future dashboard look back at clean, complete history the moment it's built.
| Table | What it captures | Owner of the truth |
|---|---|---|
raw_events | The universal log — every page view, opt-in, booked call, won deal, payment. | GA4 / GTM |
raw_ad_spend | Ad spend, impressions, video hook/hold, clicks, leads by channel. | Meta / Google / YouTube |
raw_payments | Cash in — payments, refunds, chargebacks. | Stripe (cash truth) |
raw_opportunitiesraw_appointments | Pipeline stages, deal value, show / no-show. | GoHighLevel |
raw_clients | Onboarded / first-lead / hit-$100k / churned dates, MRR, health scores. | Delivery + GHL |
finance_snapshots | Company figures with no event source yet — EBITDA, targets, goals. | Finance (computed) |
Every fact row also carries tags: departmentteam owner_idclient_id source_funnelutm_* — remember these; they're the trick behind serving all seven departments.
A view is a saved SQL query. It holds the formula, not the number. Ask the view for "Company MER" and it computes revenue ÷ marketing spend on the spot from the raw rows. This is why nothing can be faked — there's no cell to overwrite.
-- The whole formula for Marketing Efficiency Ratio lives in SQL, not in a cell: create view v_company_kpis as select sum(cash)/sum(ad_spend) as mer, -- 3,100,000 / 740,000 = 4.2× ebitda/revenue as ebitda_margin from ...the raw ledger, netted against human corrections;
We shipped 9 views — company KPIs, the five department north-stars, the revenue curve, team output, plus sales & client-success detail. Each owns its formulas, taken straight from the model you and Chris locked in the prototype.
Raw logs are machine-only. When a human needs to correct something, they append a dated,
reasoned entry to adjustments — and the reports net the raw data against it. You get a
permanent audit trail: "what the machine saw" versus "what we corrected," and why. People who read the
numbers can never quietly edit them.
The payoff
Here's the part worth internalizing. We do not build a spreadsheet per department or a tab per person — that's the trap that makes systems sprawl and rot. Because every row is tagged, the exact same rows roll up to any altitude just by filtering:
Filter the ledger to department = 'sales' and you have the Sales
dashboard. Filter to one owner_id and you have that rep's scorecard. Same data, one formula,
many lenses. Build once, filter many. That principle is what makes seven departments
(and eventually every individual) cost almost nothing extra to add.
The seven, and the decisions each one exists to drive
Phase 1 — the spine, live
This is a screenshot of the running app. Every number on it was computed by the SQL views from the ledger — none of it is typed into the page.
The test that matters
A beautiful dashboard with fake numbers is worthless — and it's the trap the plan explicitly warns about. So we tested it the only honest way: we reached into the database and changed one value, then refreshed the page. The tile moved on its own.
We set automation success to 88% in the database → the tile dropped, turned red, attainment fell to 89%. Then we set it back. Nothing on the page knew the number ahead of time — it only knows how to ask. That's the guarantee: when real data flows in, the dashboards are already correct.
Discipline
tokens.css. No invented values.phase-1-leadership-spine as PR #1 for Chris to review and wire live.Where we are
Two axes, never confused: data capture is day-one and universal; dashboards are built in sequence.
The Supabase ledger, reporting views, and the tag scheme every department reads from.
Data flowing, the company's health visible, five departments rolling up. The pipes are proven.
Funnels → strategy session → triage → close. CPL, show/close rates, cost-per-booked-call — the metrics that decide if the business works.
Client Success (health score, NRR) + Program Delivery (% at $100k, time-to-first-lead). Built the moment there are clients to keep.
Ownership, Operations, and per-rep granularity — each built as the leader who'll use it comes on.
① Chris points the app at the cloud Supabase and swaps the sample data for real ingestion — no app changes, the views are the contract. ② Then your pick: the "chat with your KPIs" AI panel (a stub today), or the Sales dashboard.
Learn the numbers
Know these cold and you can read any screen in the system.