- Append-only
fee_ledgerwith status state machine - Unique invoice per period (
invoices_instance_periodindex) - Secure session (passkey re-auth) for all financial mutations
- Non-blocking fee collection — cheques work even if fees fail
- Atomic invoice number generation via JSONB sequence
- Multi-tenant isolation — all financial queries include
instance_id - CSV export for external accounting
- On-chain collection with atomic lock (
FOR UPDATE SKIP LOCKED)
Gaps vs. Industry Best Practices