Technical documentation
Engineering reference for Ethica Capital: APIs, persistence, auth, integrations, and repository layout. Document approaches and contracts, not secrets (no keys, passwords, or production connection strings).
Sections
| Topic | Description |
|---|---|
| Repository structure | Apps in this workspace and how they relate to the API. |
| API | Backend entrypoints and HTTP conventions. |
| Database | PostgreSQL via Sequelize, migrations, and modeling notes. |
| ERD | Entity-relationship overview and example charts. |
| Authentication and authorization | Staff vs customer sessions and permission model (high level). |
| Customer MFA and recovery codes | Customer portal TOTP, recovery codes, exhaustion, settings (ethica-api). |
| Integrations | External services: PostgreSQL, Resend, Cloudinary, InfoBip, and env var names. |
| Coding conventions | Style and review expectations. |
| Finance module | Phase-by-phase finance implementation: GL, subledgers, Shariah rules, NAV, reports. |
| Appraisals module | Appraisal tables, status machine, scoring engine, probation rule, and the confirmation write-through. |
| Departments module | Headship invariants, the department-change email event, and the staff request feed. |
Related
- Architecture — system context, deployment, and data-flow diagrams.
- Operations — user-facing procedures.
- Runbooks — deployment, rollback, monitoring, and incidents.