12 · How we develop (safely)
Rules for a real product on a live multi-tenant server — especially until git is fully online.
Change workflow
flowchart TD
A[Idea / bug] --> B{Touches money auth tenancy?}
B -->|yes| C[Read OAO chapter + code + audit note]
B -->|no| D[Read feature map anchor]
C --> E[Smallest reversible change]
D --> E
E --> F[Syntax check / local smoke]
F --> G[pm2 restart only if needed]
G --> H[Verify path live]
H --> I[Update DocHub / AUDIT-FINDINGS if truth changed]
Hard rules
- Staging = production for risk purposes.
- No parallel money ledgers — use Core Invoicing.
- No shared-schema multi-tenancy shortcuts — dedicated DBs.
- Trace frontend → API before declaring a feature missing.
- Prefer ensure-if-missing / additive over destructive migrations on all tenants.
- Ask before secret rotation, mass DB changes, Nginx rewrites of staging, dual-router deletion.
- Update the map (this DocHub + OAO) when architecture truth changes.
Trust order for docs
- Live code + live DB +
pm2/ Nginx reality documentation/OAO/AUDIT-FINDINGS.mddocumentation/OAO/*chapters- This DocHub (orientation; keep in sync)
ForGrok.md- Older
docs/and root status markdown (historical)