Data model, export and API
Organizations own projects; projects own sites, assets, cases and documents; everything you own leaves as CSV and files on demand.
The model in one breath
An organization (tenant) has people through relationships (employee, client, vendor, subcontractor, partner, agent) and roles through org_memberships. It owns projects; a project has sites, buildings, floors and rooms; assets sit in rooms and carry an equipment type, which carries the document requirements the closeout package is built from. Cases run against assets; steps carry evidence; deficiencies, NCRs, punch lists, RFIs, tests, warranties and maintenance schedules hang off the same asset. Events record all of it.
Leaving
The everything-export streams one ZIP: a CSV per table for every row the organization owns, read as the requesting administrator so RLS decides each row; optionally every file the records reference; a manifest and a README that states the hash-chain formula. Specific exports exist for the audit trail, COBie asset handoff, payroll hours, billable lines and the schedule.
The import side takes CSV for locations, people and assets with a preview and a re-checked write, so a workspace can be rebuilt from its own archive or from another system's spreadsheet.
- Public API
- /api/v1 with per-organization keys (lt_live_…, stored as hashes). Projects, assets and deficiencies to read, and deficiencies to create, scoped to the key's organization. Exports and the API switch on for customers, not trials.
- No lock-in by design
- Ninety days of full export after a plan ends. The pricing page states it; the database enforces the window.
- What never leaves
- API keys and QuickBooks tokens. They are credentials, not records.
- · src/app/api/portability/export/route.ts, src/lib/zip.ts
- · src/app/api/v1/*, db/039
- · test/plan-doors.test.mjs, test/assets-import.test.mjs
File names refer to the codebase. A customer under agreement can be walked through any of them.