Organization (Semantic Module)
The Organization semantic module is used to model multi-tenant systems where resources and user memberships are scoped to specific organizations.
By designating an entity with the Organization semantic, the platform’s Serverless Engine automatically enables organization-level tenancy partitioning, membership validation, and scoped API routing.
Technical Specifications
Section titled “Technical Specifications”| Attribute | Specification |
|---|---|
| Scope | Entity (Applied to a whole table/entity) |
| Setup Limit | At most one Organization table per Data Domain is allowed |
| Has Configuration | Yes (via OrganizationConfig) |
Configuration Options
Section titled “Configuration Options”When configuring the Organization semantic module, you can specify the following parameter:
- Membership Model (
membershipModel): Specifies whether a user can belong to a single organization ('single', default) or multiple organizations ('multiple').
Design Guidelines & Validation Rules
Section titled “Design Guidelines & Validation Rules”To build a valid multi-tenant schema, the platform enforces the following compile-time rules:
- Single Organization Constraint: A domain can contain at most one entity designated with the
Organizationsemantic (e.g.,Organization,Company,Tenant, orWorkspace). - User Entity Requirement: An
Organizationentity requires aUserentity to exist in the same domain. - Membership Link: The
Organizationentity must have an association marked with theOrganizationMemberssemantic pointing to theUserentity. - Membership Roles on Relationship Edge: Member access roles (e.g.
owner,admin,editor,viewer) are defined directly on theroleproperty attached to theOrganizationMembersrelationship edge (tagged withOrganizationRole), rather than on theOrganizationentity itself.
Configuring in the Domain Modeler
Section titled “Configuring in the Domain Modeler”To designate an entity as the Organization in the user interface:
- Open the Domain Modeler and select the entity representing your organization (or create a new entity, e.g.,
Organization). - In the entity details panel, locate the Semantic Module dropdown and select
Organization. - Configure the tenant settings in the sidebar:
- Membership Model: Set whether members can belong to a single organization (
'single') or multiple ('multiple').
- Membership Model: Set whether members can belong to a single organization (
- Save your changes.
(UI screenshots of this configuration will be added soon)
Runtime Behavior
Section titled “Runtime Behavior”The Serverless Engine leverages the Organization semantic to automatically secure nested routes:
- When accessing a nested path like
/orgs/{orgId}/projects/{projectId}/tasks/{taskId}, the engine extractsorgIdfrom the URL parameters. - It then verifies that the authenticated user has an active membership link to the organization
orgId(validated via theOrganizationMembersassociation) before allowing access to the target resource.