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

TopicDescription
Repository structureApps in this workspace and how they relate to the API.
APIBackend entrypoints and HTTP conventions.
DatabasePostgreSQL via Sequelize, migrations, and modeling notes.
ERDEntity-relationship overview and example charts.
Authentication and authorizationStaff vs customer sessions and permission model (high level).
Customer MFA and recovery codesCustomer portal TOTP, recovery codes, exhaustion, settings (ethica-api).
IntegrationsExternal services: PostgreSQL, Resend, Cloudinary, InfoBip, and env var names.
Coding conventionsStyle and review expectations.
Finance modulePhase-by-phase finance implementation: GL, subledgers, Shariah rules, NAV, reports.
Appraisals moduleAppraisal tables, status machine, scoring engine, probation rule, and the confirmation write-through.
Departments moduleHeadship invariants, the department-change email event, and the staff request feed.
  • Architecture — system context, deployment, and data-flow diagrams.
  • Operations — user-facing procedures.
  • Runbooks — deployment, rollback, monitoring, and incidents.