Business product domain
When to update: Business app scaffolding, tenant rules, invoicing, or org membership changes.
Purpose
Section titled “Purpose”The business product line covers organization operations: employees, scheduling, invoicing, and (later) accounting via TigerBeetle. It runs on the business isolation plane — separate Worker, D1, R2, KV, and auth from personal.
Does not own
Section titled “Does not own”- Personal vehicles, journal, or personal finance
- Shared auth with personal
- Direct TigerBeetle wire protocol from Workers (use
ledger-bridgein phase 3) - Marketing site content or public customer docs
Key paths
Section titled “Key paths”| Area | Path | Status |
|---|---|---|
| Web SPA | apps/business-web/ | Base scaffold |
| API Worker | apps/business-api/ | Base scaffold (GET /health) |
| Binding manifest | apps/business-api/bindings.manifest.json | D1 / KV / R2 names for provisioner |
| Binding provisioner | packages/cloudflare-provision/ | Auto-creates remote bindings on deploy |
| Migrations | apps/business-api/db/migrations/ | Initial schema (employees) |
| Shared UI tokens | packages/ui/ | App shell, nav, core components |
Data model (planned)
Section titled “Data model (planned)”Business D1 (business-db): organizations, members, roles, employees, schedules, invoices, customers. PDFs and exports in R2 (business-assets).
Every business row includes org_id for future per-customer isolation and Workers for Platforms.
Invariants
Section titled “Invariants”- Never read or write personal D1, R2, KV, or auth secrets
- Every query filters by
org_id(and role where applicable) - Do not invent accounting/ledger behavior without ADR and bridge service
- Audit-sensitive changes (invoices, schedules) must be traceable
Related
Section titled “Related”- Business app help — end-user documentation