ERD overview
This is a simplified entity-relationship view derived from Sequelize models in ethica-api. It is for onboarding engineers, not a substitute for migrations or the live schema. Rename or add entities as the product evolves.
Entity-relationship diagram (subset)
Sequelize models by domain
Rough share of model files under ethica-api/src/models/ (grouped by concern—not line count or runtime traffic). Useful as a quick mental map of where persistence code concentrates.
| Domain | Includes (examples) |
|---|---|
| Identity and access | Organization, staff, sessions, MFA, roles, permissions, customer portal accounts and sessions |
| Customers and onboarding | Customer, corporate customer, kids onboarding, profile update requests |
| Investments and products | Investments, funds, portfolio assets, rate guides |
| Finance and GL | Journal entries and lines, accounting transactions, chart of accounts |
| Operations and observability | Branches, notifications, activity logs, error logs |
Maintenance
When you add or rename tables, update the ER diagram and refresh the domain pie chart (recount models per group) or replace diagrams with generated assets from your migration tool.