Organizations
Data Entity
Description
Represents the top-level tenant entity in the Meander multi-tenant platform. Each organization (e.g., NHF, Blindeforbundet, HLF, Barnekreftforeningen) is an independent operational unit with its own users, settings, terminology, feature flags, and reporting boundaries. Organizations form hierarchical structures with parent-child relationships and contain local associations as sub-units.
Data Structure
| Name | Type | Description | Constraints |
|---|---|---|---|
id |
uuid |
Unique identifier for the organization | PKrequiredunique |
name |
string |
Official display name of the organization (e.g., 'Norges Handikapforbund') | required |
slug |
string |
URL-safe unique identifier derived from the organization name, used in API routes and deep links | requiredunique |
parent_organization_id |
uuid |
Reference to the parent organization in a hierarchical structure. Null for top-level organizations. Enables NHF's 12 national associations, 9 regions, and 1400 local associations model | - |
organization_type |
enum |
Classification of the organization within the hierarchy | required |
status |
enum |
Current operational status of the organization on the platform | required |
contact_email |
string |
Primary contact email address for the organization | required |
contact_phone |
string |
Primary contact phone number for the organization | - |
address_line_1 |
string |
Street address of the organization | - |
address_line_2 |
string |
Additional address information | - |
postal_code |
string |
Norwegian postal code | - |
city |
string |
City name | - |
country |
string |
ISO 3166-1 alpha-2 country code, defaults to NO (Norway) | required |
logo_url |
string |
URL to the organization's uploaded logo image in cloud storage | - |
default_language |
string |
Default UI language for the organization's users (BCP 47 tag, e.g., 'nb' for Norwegian Bokmal, 'se' for Northern Sami) | required |
timezone |
string |
IANA timezone identifier for the organization, used for report generation and scheduled tasks | required |
bufdir_organization_id |
string |
External identifier used in Bufdir reporting submissions. Required for organizations that receive Bufdir grants | unique |
subscription_tier |
enum |
Commercial subscription level determining feature availability and usage limits | required |
max_users |
integer |
Maximum number of active users allowed under the current subscription tier | required |
terminology_overrides |
json |
JSON object containing organization-specific label overrides for platform terminology. Keys are platform default terms, values are organization-specific replacements. Supports the terminology customization feature required by NHF, Blindeforbundet, and HLF | - |
sensitive_fields_config |
json |
JSON configuration defining which fields trigger screen reader readout warnings. Critical for NHF and Blindeforbundet accessibility requirements | - |
impact_multipliers |
json |
JSON object with organization-specific hourly rates and impact calculation factors used by the Advantage Calculator feature | - |
onboarded_at |
datetime |
Timestamp when the organization completed onboarding and became active | - |
created_at |
datetime |
Timestamp when the organization record was created | required |
updated_at |
datetime |
Timestamp of the last update to the organization record | required |
Database Indexes
idx_organizations_slug
Columns: slug
idx_organizations_parent
Columns: parent_organization_id
idx_organizations_status
Columns: status
idx_organizations_type_status
Columns: organization_type, status
idx_organizations_bufdir_id
Columns: bufdir_organization_id
idx_organizations_parent_type
Columns: parent_organization_id, organization_type
Validation Rules
valid_email_format
error
Validation failed
valid_slug_format
error
Validation failed
unique_slug
error
Validation failed
valid_parent_reference
error
Validation failed
valid_terminology_overrides_schema
error
Validation failed
valid_sensitive_fields_config
warning
Validation failed
valid_impact_multipliers
error
Validation failed
max_users_positive
error
Validation failed
valid_bufdir_id_format
error
Validation failed
logo_url_valid
warning
Validation failed
country_code_valid
error
Validation failed
status_transition_valid
error
Validation failed
Business Rules
tenant_isolation
All data queries must be scoped to the requesting user's organization. Users from one organization must never see or modify data belonging to another organization. Global Admins manage the system but do not access org operational data by default.
hierarchy_depth_limit
Organization hierarchy must not exceed 4 levels (national → regional → local → partner) to maintain query performance and operational clarity. NHF's structure (12 national associations, 9 regions, 1400 local associations) is the maximum supported complexity.
no_circular_hierarchy
An organization cannot be its own ancestor or descendant. The parent_organization_id chain must be acyclic.
slug_immutable_after_creation
The organization slug cannot be changed after initial creation because it is used in API routes, deep links, and external integrations (e.g., Bufdir reporting references).
active_org_required_for_user_operations
Users can only be created, invited, or activated within organizations that have status 'active'. Suspended or inactive organizations block all user management operations.
max_users_enforcement
The number of active users in an organization must not exceed the max_users limit defined by the subscription tier. User invitations must be blocked when the limit is reached.
bufdir_id_required_for_reporting
Organizations that generate Bufdir reports must have a valid bufdir_organization_id. Report generation must fail with a clear error if this field is missing.
terminology_fallback_to_defaults
When terminology_overrides does not contain a key, the platform default term must be used. Overrides must never cause missing labels in the UI.
cascade_suspension_to_children
When a parent organization is suspended, all child organizations in the hierarchy must also be suspended. Reactivation of children requires the parent to be active first.
audit_all_settings_changes
Every modification to organization settings, terminology, feature flags, or hierarchy must produce an audit log entry with the actor, timestamp, and changed fields.
deletion_requires_data_migration
An organization cannot be hard-deleted if it has any associated users, activities, contacts, or financial records. Soft-deletion via status change to 'inactive' is the only supported removal path for organizations with historical data.
parallel_system_support
Organizations transitioning to Meander must be able to operate existing systems in parallel. The platform must not enforce exclusive data ownership during the onboarding phase (status 'onboarding').