1
Data Models
55
Entities
67
Relationships
4
Categories

Configuration (15)

Accessibility Preferences

Stores user-controlled accessibility settings including font scale factor, contrast mode, and haptic feedback configuration. Persisted local...

configuration 11 attrs CRUD
Activity Type

Defines a category of peer mentor activity within an organization's catalogue. Each type has metadata flags controlling travel expense eligi...

configuration 14 attrs CRUD
Bufdir Column Schema

Stores the per-organization mapping from internal activity fields to official Bufdir export column names, date formats, and decimal separato...

configuration 13 attrs CRUD
Expense Type

Defines the fixed categories of allowable expenses (kilometers driven, toll road fees, parking, public transit). Expense types carry mutual ...

configuration 13 attrs CRUD
Feature Flag

Defines an individual feature toggle for a specific organization, controlling which capabilities are visible (travel reimbursement, certific...

configuration 8 attrs CRUD
Field Mapping

Defines how an internal data field maps to the corresponding field name and format in an external accounting or member management system. St...

configuration 14 attrs CRUD
Notification Preference

Stores a user's opt-in or opt-out decision for each notification category (assignment_reminders, certificate_expiry, pause_status, scenario_...

configuration 6 attrs CRUD
Organisation Configuration

Stores all organization-specific runtime configuration including feature flag JSONB, terminology label overrides JSONB, receipt amount thres...

configuration 13 attrs CRUD
Organisation Label

Stores organisation-specific display labels used when warning a user or nearby listeners before a screen reader vocalises sensitive field co...

configuration 10 attrs CRUD
Report Field Schema

Defines the dynamic form field configuration for post-session reports on a per-organization basis. Specifies field types (text, multiline, c...

configuration 11 attrs CRUD
Report Period

Defines a Bufdir reporting period (start and end date) for an organization, typically aligned to grant cycles. Organizations may configure p...

configuration 16 attrs CRUD
Scenario Rule

Defines the trigger conditions and message template for a context-aware scenario notification (e.g., 'no activity logged in 21 days', '50th ...

configuration 13 attrs CRUD
Sensitive Field Definition

Defines which form fields are classified as sensitive personal data (e.g., address, contact details, medical history) requiring a spoken dis...

configuration 13 attrs CRUD
Sync Schedule

Configures the automated synchronization frequency and preferred time window for an organization integration. Supports daily, weekly, monthl...

configuration 15 attrs CRUD
User Warning Preferences

Stores user-level feature-specific settings, primarily the boolean flag controlling whether sensitive field disclosure warnings are suppress...

configuration 6 attrs CRUD

Core Entities (31)

Activity

Core business record representing a peer mentor interaction or event, created through the accessible multi-step activity wizard. Captures th...

core 25 attrs CRUD
Assignment

Represents the formal pairing of a peer mentor to a contact for ongoing support. Tracks status (open, pending, completed) and the date of la...

core 13 attrs CRUD
Badge Definition

Defines a badge type within an organization's peer mentor recognition system. Includes display name, icon key, criteria type (activity_count...

core 10 attrs CRUD
Confidentiality Declaration

A formal confidentiality agreement that Blindeforbundet drivers must electronically sign before accessing sensitive service recipient inform...

core 18 attrs CRUD
Contact

Represents an individual who is served by or associated with a peer mentor programme — a service recipient, family member, or professional r...

core 20 attrs CRUD
Contact Chapter Membership

Junction entity linking a contact to an organization unit (chapter). A contact in NHF may belong to up to 5 local chapters simultaneously. T...

core 10 attrs CRUD
Device Token

Stores the FCM push notification token for a user's registered device. Tokens are registered on login and refreshed automatically by Firebas...

core 7 attrs CRUD
Document Attachment

A file (PDF, JPEG, PNG) attached to an activity record as supporting evidence for Bufdir audit purposes. Used by NHF to attach event invitat...

core 12 attrs CRUD
Driver Assignment

Records a Blindeforbundet-specific arrangement where a peer mentor provides transportation to a service recipient. Captures the transported ...

core 19 attrs CRUD
Driver Fee

Stores the honorarium amount awarded to a peer mentor for providing transportation in a driver assignment. The fee amount is linked to organ...

core 16 attrs CRUD
Earned Badge

Records that a specific peer mentor has earned a specific badge at a given timestamp. Award is idempotent — each badge can only be earned on...

core 8 attrs CRUD
Expense Claim

Represents a reimbursement claim submitted by a peer mentor for travel and other expenses incurred during an activity. Claims go through a t...

core 18 attrs CRUD
Generated Report

Represents a generated Bufdir export file (PDF or Excel/CSV) for a specific organization and reporting period. Stores the Supabase Storage f...

core 16 attrs CRUD
Mileage Claim

Stores kilometer distance and route details for a mileage-based expense claim line. Linked one-to-one to an expense claim, capturing origin,...

core 18 attrs CRUD
Notification

Represents a single in-app or push notification delivered to a user. Notifications carry a type (assignment_reminder, certificate_expiry, pa...

core 12 attrs CRUD
Organization

Represents one of the partner organizations using the platform (NHF, Blindeforbundet, HLF, etc.). Each organization has its own branding, te...

core 14 attrs CRUD
Organization Integration

Stores the configuration for a connection between the platform and an external system (Xledger accounting, HLF Dynamics portal, Bufdir API, ...

core 20 attrs CRUD
Organization Unit

Represents a node in the organizational hierarchy such as a local chapter, regional office, or national association. Units form a recursive ...

core 12 attrs CRUD
Peer Mentor

Profile record for a peer mentor (likeperson), the primary subject of coordinator bulk registration and the actor who creates activity recor...

core 22 attrs CRUD
Peer Mentor Certification

Tracks the HLF certification status of a peer mentor including issue date, expiry date, certification type, and a JSONB renewal history log....

core 16 attrs CRUD
Post Session Report

A formalised structured report completed by a peer mentor after a home visit or one-on-one session. Fields are dynamically rendered from the...

core 17 attrs CRUD
Receipt

Stores the metadata and Supabase Storage reference for a receipt image attached to an expense claim. Receipts are required when a claim amou...

core 8 attrs CRUD
Recognition Tier

Defines a recognition level (e.g., Bronze, Silver, Gold) with eligibility criteria, icon, and award period (annual, seasonal). Tiers are ass...

core 13 attrs CRUD
Recurring Activity Template

A saved template for activities that recur regularly (e.g., weekly group training sessions), used by coordinators during bulk proxy registra...

core 11 attrs CRUD
Referral Code

A unique code generated per peer mentor encoding their identity and organization in a shareable URL and QR code for the membership recruitme...

core 11 attrs CRUD
Scenario Prompt

A generated notification instance created when a scenario rule's trigger conditions are satisfied for a specific peer mentor. Tracks whether...

core 16 attrs CRUD
Unit Assignment

Links a user to one or more organization units, defining their operational scope for activities and contacts. A coordinator may be assigned ...

core 11 attrs CRUD
User

Represents an authenticated system user account with a unique email address. Each user belongs to one or more organizations and is assigned ...

core 13 attrs CRUD
User Role

Assigns a specific role (peer_mentor, coordinator, org_admin, global_admin) to a user within an organization context. Role assignments deter...

core 13 attrs CRUD
User Session

Represents an authenticated user session storing JWT tokens and expiry metadata for persistent login. Sessions enable biometric re-authentic...

core 14 attrs CRUD
Way Forward Item

An individual follow-up action item extracted from the 'way forward' section of a post-session report. Each item represents a specific coord...

core 12 attrs CRUD

Entity Relationships (67)

FromTypeToDescription
accessibility_preferences References sensitive_field_definition The screen reader active state in accessibility_preferences determines whether the sensitive field p
activity Many-to-One activity_type Every activity record references the organization-specific activity type that determines its Bufdir
activity One-to-Many document_attachment An activity record may have multiple supporting document attachments (invitations, screenshots, flye
activity One-to-Many driver_assignment A Blindeforbundet activity involving transportation may have one or more driver assignments linked t
activity One-to-One expense_claim A travel-eligible activity may have exactly one linked expense claim covering all expense lines for
activity One-to-One post_session_report An activity requiring a structured report (based on activity type metadata) has exactly one linked p
bufdir_export_audit_log References report_period A Bufdir export audit record references the target reporting period for traceability of which grant
certification Belongs To peer_mentor A certification record belongs to exactly one peer mentor and tracks the full HLF certification life
confidentiality_declaration One-to-One declaration_acknowledgement A sent confidentiality declaration has at most one acknowledgement record created when the driver ex
contact One-to-Many assignment A contact may be assigned to peer mentors sequentially or simultaneously depending on organizational
contact One-to-Many contact_chapter A contact (especially in NHF) may belong to up to 5 local chapters simultaneously through the contac
contact_chapter Many-to-One organization_unit Each contact-chapter membership links to a specific organization unit (local chapter) in the hierarc
driver_assignment One-to-One confidentiality_declaration Each Blindeforbundet driver assignment requires exactly one confidentiality declaration to be sent a
driver_assignment One-to-One driver_fee Each driver assignment has exactly one fee record storing the agreed honorarium amount and acknowled
earned_badge Many-to-One badge_definition Each earned badge record references the badge definition that specifies the criteria that were satis
expense_claim One-to-Many claim_event Every state transition of an expense claim generates an immutable audit event forming a complete app
expense_claim References export_run An approved expense claim is stamped with the export_run_id when it is first included in an accounti
expense_claim One-to-One mileage_claim When a claim includes a kilometers-driven expense type, exactly one mileage_claim record stores the
expense_claim One-to-One receipt When a claim amount exceeds the configured threshold, exactly one receipt image record is linked to
generated_report Many-to-One report_period Each Bufdir export file references the reporting period it covers, ensuring traceability between rep
organisation_configuration One-to-Many feature_flag Organisation configuration embeds the features JSONB whose individual entries are logically represen
organisation_configuration One-to-Many organisation_label Organisation configuration embeds the full terminology label map whose individual entries are logica
organization One-to-Many activity_type Each organization maintains its own catalogue of activity types with organization-specific names and
organization One-to-Many badge_definition Each organization configures its own badge definitions matching its volunteer recognition programme
organization One-to-One bufdir_column_schema Each organization has one active Bufdir column schema that maps internal fields to official Bufdir e
organization One-to-Many bufdir_export_audit_log Bufdir export audit records are scoped to an organization for regulatory accountability
organization One-to-Many contact All contacts are scoped to a single organization for multi-tenant data isolation via Supabase RLS
organization One-to-Many export_run Accounting system export runs are scoped to an organization and used to track double-export preventi
organization One-to-Many generated_report All Bufdir export files are scoped to the requesting organization for audit trail and re-download pu
organization One-to-One organisation_configuration Each organization has exactly one configuration record containing feature flags, terminology labels,
organization One-to-Many organization_integration An organization may have multiple external system integrations (Xledger, Dynamics, member management
organization One-to-Many organization_unit An organization owns its entire hierarchy of units (chapters, regions, national associations) as roo
organization One-to-Many recognition_tier Organizations configure their own tier structure (Bronze/Silver/Gold) with organization-specific thr
organization One-to-Many report_period An organization defines its own Bufdir reporting periods aligned to its grant cycle calendar
organization One-to-Many sensitive_field_definition An organization defines its own set of sensitive fields that require screen reader disclosure warnin
organization_integration One-to-Many field_mapping An integration configuration contains multiple field mapping entries defining how internal fields ma
organization_integration One-to-One sync_schedule Each integration has exactly one sync schedule configuring its automated execution frequency and pre
organization_unit One-to-Many activity Activities are recorded within a specific chapter context for chapter-level Bufdir aggregation and c
organization_unit One-to-Many organization_unit Organization units form a recursive parent-child hierarchy (national → region → local chapter) via a
organization_unit One-to-Many recurring_activity_template Recurring activity templates are scoped to a chapter so coordinators only see templates relevant to
organization_unit One-to-Many scenario_rule Scenario notification rules are configured per chapter so coordinators can enable or disable scenari
organization_unit One-to-Many unit_assignment A chapter or regional unit has multiple users (coordinators, peer mentors) assigned to it for scoped
peer_mentor One-to-Many activity A peer mentor is the attributed actor for all activities they conduct, regardless of whether they se
peer_mentor One-to-Many annual_summary A peer mentor has one annual summary record per year for the Wrapped impact feature, supporting mult
peer_mentor One-to-Many assignment A peer mentor holds multiple active and historical assignments to contacts across their service tenu
peer_mentor One-to-One certification An HLF peer mentor has exactly one current certification record tracking issue date, expiry, and ren
peer_mentor One-to-Many earned_badge A peer mentor accumulates earned badges over time as activity and engagement milestones are reached
peer_mentor One-to-One peer_mentor_stats A peer mentor has one stats snapshot record that is recomputed on each activity event for gamificati
peer_mentor One-to-Many periodic_summary A peer mentor has periodic summaries generated for each half-year and quarterly period they are acti
peer_mentor One-to-Many referral_code A peer mentor may have multiple referral codes over time (active plus rotated/invalidated historical
peer_mentor One-to-Many scenario_prompt A peer mentor receives scenario prompts when the rule engine detects trigger conditions in their act
periodic_summary Belongs To user A periodic summary is computed for and owned by a specific user (peer mentor or coordinator) for the
post_session_report References report_field_schema A post-session report is rendered using the organization's dynamic field schema active at the time o
post_session_report One-to-Many way_forward_item A submitted post-session report generates one or more follow-up action items representing coordinato
referral_code One-to-Many recruitment_attribution A referral code accumulates multiple attribution events (clicks and confirmed conversions) over its
report_field_schema Many-to-One organization Each field schema is owned by exactly one organization and defines that organization's post-session
scenario_prompt References activity A scenario prompt may reference the specific activity that triggered its generation, enabling deep-l
scenario_rule One-to-Many scenario_prompt A scenario rule generates multiple prompt instances over time as its trigger conditions are met for
user One-to-One accessibility_preferences Each user has exactly one accessibility preferences record controlling font scale, contrast mode, an
user One-to-Many device_token A user may have FCM push tokens registered across multiple devices simultaneously
user One-to-Many notification A user receives many notifications over their lifetime across all notification types
user One-to-Many notification_preference A user has one preference record per notification category controlling opt-in and opt-out state
user One-to-One peer_mentor A user account that holds the peer_mentor role is linked to exactly one peer_mentor profile record p
user One-to-Many session A user may have multiple active sessions across different devices for biometric re-authentication
user One-to-One user_preferences Each user has exactly one preferences record storing last-used activity type, default duration, and
user One-to-Many user_role A user may hold multiple role assignments across different organizations (peer_mentor in one org, co
user_role Many-to-One organization Each role assignment is scoped to a specific organization, enabling users to hold different roles in