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.

DomainIncludes (examples)
Identity and accessOrganization, staff, sessions, MFA, roles, permissions, customer portal accounts and sessions
Customers and onboardingCustomer, corporate customer, kids onboarding, profile update requests
Investments and productsInvestments, funds, portfolio assets, rate guides
Finance and GLJournal entries and lines, accounting transactions, chart of accounts
Operations and observabilityBranches, 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.