SPEC 002 — Organization Management
1. Feature Purpose
Organizations are the top-level entity in Equa. Every cap table, agreement, document, and member belongs to an organization. This module handles creating and configuring organizations (company type, equity structure, operating agreement), managing members and their roles, tracking addresses with content-addressable hashing, and enforcing member limits per plan.2. Current State (Verified)
2.1 Backend
2.2 Frontend
2.3 Permission Model
RBAC enforced through three join tables:3. Data Model
Organizations
OrganizationDetailsTable
OrganizationTemplates
Members
MemberLimits
Addresses
HashedAddresses
Content-addressable address records. The hash is derived from the address fields, enabling deduplication and immutable references from agreements and other documents.4. API Endpoints
5. Frontend Components
6. Business Rules
- Creator is default owner — The user who creates an organization is assigned the owner role automatically.
- Member limits — Each organization has a
memberLimit(set by billing plan). Adding members beyond the limit is rejected. - Members can be entities —
isIndividual = falseallows companies, trusts, and other entities as members. - Content-addressed documents —
operatingAgreementand templatecontentare stored as hashes referencing immutable content, ensuring auditability. - HashedAddresses — Addresses are content-addressed so that the same physical address used across agreements produces a single canonical reference.
- RBAC scoped to organization — OrganizationsRoles, MembersRoles, and PermissionsRoles control who can view, edit, or administer each organization.
- Legacy data room flag — Organizations migrated from the legacy system have
legacyDataRoom = trueto gate compatibility behavior. - Unique email per org — Member email (citext) is unique within an organization context to prevent duplicate invitations.
7. Acceptance Criteria
- User can create a new organization with name, company type, and equity structure
- Organization settings (EIN, website, phone, registration number, start date) can be updated
- Creator is automatically assigned the owner role
- Members can be added up to the plan’s member limit
- Attempting to exceed the member limit returns an error
- Members can be individual persons or entities (
isIndividualflag) - Addresses are stored and deduplicated via content-addressable hashing
- Operating agreement and templates are stored as immutable content-addressed hashes
- Organization dashboard displays recent actions and capital summary
- RBAC prevents unauthorized users from viewing or modifying organization data
- Organization can be deleted by the owner only