finances/docs/MIGRATION_FROM_LP.md
Natalie d8ae381847 feat: stub extraction of finances to dedicated app (Nest+PWA+MCP+DB) modeled on prospector
- Full skeleton: backend modules (financials per LP contract + shape), auth/health, web PWA tabs (dashboard/income/etc), mcp stub, migrations, docs (FINANCES.md + detailed MIGRATION_FROM_LP.md), CLAUDE, STANDARDS, run/scripts.
- Design embodied: scope from lp.live entities/financials + surfaces/my/financials* + my/backend schema + frontend Financials* pages/tabs + docs/quinn-my/financials.md
- Follows prospector extraction precedent exactly for future cutover/proxies from lp.live
- Verified: structure ls, partial tsc (dep errors only), files read
2026-06-29 16:13:15 -04:00

2.6 KiB

Migration from LP (lilith-platform.live) to Dedicated @finances App

Date: 2026-06-29
Status: Stub skeleton created. Core extraction not yet ported.

What lives in LP today (sources to port)

  • codebase/@features/api/src/entities/financials/ (index, repo, schema, types) + financialsMigrations (fin_ prefixed tables + alters)
  • codebase/@features/api/src/surfaces/my/financials.ts + pending-income.ts + projects.ts (partial), tour-legs.ts
  • codebase/@features/api/src/app/server.ts (mounts), my index.ts
  • codebase/@features/my/backend-api/src/db/schema-financials.ts + routes/data.ts (my specific DB)
  • codebase/@features/my/frontend-public/src/pages/FinancialsPage.tsx + tabs: CashFlowTab, IncomeTab, OpExTab? (purchases), PendingTab, PurchasesTab, RoiTab, SubscriptionsTab, TourLegsTab, Projects* (financial tie-ins), Dashboard mentions
  • codebase/@features/my/frontend-public/src/layouts/* + routes + types/api.ts + financials-styled.ts
  • mcp: my/mcp-server + admin/mcp for financial tools (log session etc)
  • tests: my-financials.test.ts , e2e
  • docs: docs/quinn-my/financials.md (source of truth for shape + endpoints)

Also related: tour financials in quinn-my docs, pending-income handling.

What the dedicated app owns post-cutover

  • Own DB + clean table names (income_sessions etc, or keep fin_ for back-compat)
  • Full Nest modules: financials/ (shape, CRUD per doc), aggregates
  • PWA: focused financial console (installable), replaces or augments my/FinancialsPage
  • MCP: full tools for log income, update roi/savings, query cash position, project P&L etc.
  • Migrations ported/adapted from LP schema

Remaining / plan (analogous to prospector phases)

  1. Flesh entities + repo + buildFinancialsShape port (pure + I/O)
  2. Controller + service full (all endpoints + validation)
  3. PWA views port from LP my/ pages + tabs (match shapes)
  4. Add tour-legs + project financial views + cross refs (via clients or HTTP to my/projects)
  5. MCP full parity
  6. Proxy in LP (quinn-api forward /my/financials or /finances to this during dual)
  7. Data backfill / dual-write cutover
  8. Remove from LP (entities, surfaces, my/ pages, mcp, tests, docs updates)
  9. Health + verif (dashboard shape matches LP, CRUD roundtrips, PWA install, MCP)

Proxies during transition

Extend LP my/ rewrite or add thin forwarders to FINANCES_BASE + token. Update useMyApi calls or add /finances app link at my.transquinnftw.com/finances/app .

See prospector MIGRATION_FROM_LP.md + handoffs for exact playbook. Update this as phases complete.

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com