Program Scope·2026-05-18

True Legacy — ES Reporting Platform

True Legacy's internal Estate Sales reporting & operations platform. Core weekly P&L editor, versioned saves, and regional roll-ups are live for editors and admins. Next phase wires NetSuite live sync, surfaces trend analytics, and ships kanban workflows for disposition and renovation teams.

Prepared for Peter OhmBy Trevor FowlerActive — stabilizing core, expanding integrations
Section 01

Program Scope

Done· 10
  • Auth
    Email/password + role-gated routes (admin · editor · viewer)
  • Reporting
    Weekly P&L breakdown editor — per-region editable cells
  • Reporting
    Versioned saves with full audit timeline
  • Reporting
    Undo / Redo cursor — persists every step to DB
  • Reporting
    Reset-to-original (clear all overrides) with version trail
  • Properties
    Properties index + per-deal P&L detail page
  • Forecast
    Upcoming weeks roll-up from `coe_disposition` dates
  • Reports
    Static reports surface
  • Admin
    User role management UI (admin-only)
  • Data
    Renovation milestones + NetSuite txn ingest tables provisioned
In Progress· 4
  • Trends
    Multi-week comparison charts2026-05-25
  • NetSuite
    Live read-path sync (sandbox → production toggle)2026-06-01
  • Reporting
    Profit-share calc surfacing in dashboard2026-06-15
  • Ops
    HIR repair submissions UI2026-06-22
Planned· 6
  • Ops
    Kanban board — DispositionP1
  • Ops
    Kanban board — RenovationP1
  • Ops
    Listing prep workflowP1
  • Ops
    MLS checklist workflowP2
  • Integrations
    Slack EOW digest (Friday 5pm auto-post)P2
  • Integrations
    QuickBooks / NetSuite write-backP2
Section 02

Architecture & Data Flow

Browser
TanStack Start · React 19
Server Functions
createServerFn · Bearer JWT
Supabase Postgres
RLS + has_role()
NetSuite
Sandbox + Production OAuth

Every authenticated request attaches the user's Supabase bearer via attachSupabaseAuth. Editor/admin gates live in middleware (requireSupabaseAuth + assertEditor). External syncs run server-side only.

Section 03

APIs & Data Syncs

FunctionMethodAuthWrites ToCadence
getWeekOverrides
src/lib/api/weekly-edits.functions.ts
GETPublic (RLS)on-demand
listWeekVersions
src/lib/api/weekly-edits.functions.ts
GETPublic (RLS)on-demand
saveWeekChanges
src/lib/api/weekly-edits.functions.ts
POSTEditor+tlh_weekly_overrides · tlh_weekly_override_versionson-demand
revertToVersion
src/lib/api/weekly-edits.functions.ts
POSTEditor+tlh_weekly_overrides · tlh_weekly_override_versionson-demand
clearWeekOverrides
src/lib/api/weekly-edits.functions.ts
POSTEditor+tlh_weekly_overrides · tlh_weekly_override_versionson-demand
getMyEditRole
src/lib/api/weekly-edits.functions.ts
GETOptional beareron-demand
getUpcomingWeeks
src/lib/api/upcoming.functions.ts
GETPublicon-demand
listUsers + role mutations
src/lib/api/admin-users.functions.ts
GET/POSTAdminuser_roleson-demand

External Integrations

NetSuite (Sandbox + Production)

Transaction ingest, future write-back

OAuth + Token-Based, env-switched via NETSUITE_ENVIRONMENT
Wiring (M2)
Lovable AI Gateway

AI-assisted summarization / forecasting (planned)

LOVABLE_API_KEY
Available
Supabase Storage

Property files bucket (private)

RLS
Live
Section 04

Database Surface

P&L / Reporting

TablePurposeRLS
tlh_dealsSource-of-truth deals + close datesRead: auth
tlh_weekly_overridesEditable per-cell P&L overridesRead: auth · Write: editor+ (upsert only)
tlh_weekly_override_versionsAppend-only edit timelineRead: auth · Insert: editor+
tlh_budget_line_itemsPer-deal budget breakdownRead: auth
tlh_change_ordersScope / cost change trackingRead: auth
tlh_profit_shareProfit-share splits per dealRead: auth
tlh_netsuite_transactionsNetSuite txn cacheRead: auth · Write: service
tlh_renovation_milestonesReno timeline eventsRead: auth

Ops / Workflow

TablePurposeRLS
kanban_disposition_tasksDisposition pipeline cardsRead: auth
kanban_renovation_tasksRenovation pipeline cardsRead: auth
listing_prep_tasks + templatesPre-list checklist instancesRead: auth
mls_checklist_items + submissionsMLS compliance auditsRead: auth
hir_repair_items + submissions + filesHome inspection response repairsRead: auth
meeting_hostsWalkthrough / meeting assignmentsRead: auth
property_filesPer-property file metadataRead: auth
property_stage_historyStage transition audit logRead: auth

Auth

TablePurposeRLS
user_rolesRole assignments (admin / editor / user)Self-read · Admin write · has_role() SECURITY DEFINER
admin_usersAdmin user metadataAdmin-only
Section 05

Milestones & Deadlines

  1. M1Trends v12026-05-25

    Multi-week comparison charts on /trends

  2. M2NetSuite live sync (read)2026-06-01

    Sandbox → Production toggle, txn ingest on schedule

  3. M3Kanban Disposition UI v12026-06-08

    Drag/drop board backed by kanban_disposition_tasks

  4. M4Profit-share dashboard2026-06-15

    Per-deal splits surfaced in property detail

  5. M5Listing prep + MLS checklist2026-06-22

    Workflow UIs for both checklist tables

  6. M6RLS hardening + audit2026-06-29

    Formal DELETE policy on overrides, security pass

  7. M7Slack digest + QB write-back α2026-07-06

    Friday EOW Slack auto-post, QuickBooks alpha sync

Section 06

Risks & Open Questions

RLS gap on tlh_weekly_overrides

Editors can UPDATE but not DELETE; reset uses null-upsert workaround

Mitigation · Formalize DELETE policy in M6

No automated test coverage

Manual QA only — regression risk grows with surface area

Mitigation · Add Vitest + Playwright smoke suite alongside M3

NetSuite rate-limit budget undefined

Live sync could throttle during peak hours

Mitigation · Confirm quota with NetSuite admin before M2 cutover

Slack bot install owner unassigned

Blocks M7

Mitigation · Decision needed this week

Section 07

Next Actions (this week)