Data Layer
73 components in the data layer layer
Data Layer components manage data persistence, storage operations, and data access patterns throughout the application.
Data-access layer managing the sessions and refresh_tokens tables. Handles creation, lookup, rotation, and revocation of session records. Us...
Stores per-tenant BankID OAuth client credentials (client_id, client_secret, redirect_uri, OIDC discovery endpoint URL) encrypted at rest in...
Database table storing per-user passkey credential records: credential ID (base64url), public key (COSE format), sign count for replay prote...
Join table binding users to organizations with a role enum value, enabling per-tenant role scoping. A single user may hold different roles i...
A Drift-backed local data adapter that stores and retrieves the persisted active role-organization pair. Provides the Profile Context Servic...
Drift (SQLite) local data access object for the activities table on the mobile client. Implements the offline-first mutation pattern - write...
Drift DAO and corresponding SQLite table storing the catalog of activity types (e.g. home visit, phone call, group meeting) fetched from the...
Local Drift DAO and remote sync adapter for the activity_attachments table. Provides CRUD access to attachment metadata records linked to pa...
Data component representing the activity_reports table, which stores one structured post-visit report record per activity as a JSON blob lin...
The shared activities table persisting all activity records regardless of submission mode. For proxy records it stores the peer mentor's use...
Core activity records table storing all logged peer mentor activities regardless of submission mode. Shared by simple logging, proxy reporti...
Drift table and repository adapter for the events entity, providing offline-capable CRUD operations against the local SQLCipher database and...
Local Drift table and repository mirroring the server-side event_participants table, storing user_id, event_id, and signed_up_at with a uniq...
Drift data component managing the local expenses table, which stores peer mentor travel expense records with foreign keys to users, expense_...
Data component managing the expense_receipts table which stores the storage URL, upload timestamp, file size in bytes, and SHA-256 content h...
Drift local table and repository for the organisation-configured expense type catalogue. Each record carries a JSON rules field encoding mut...
Drift local table and repository for confidentiality declaration records. Each row stores user ID, linked activity ID, declaration version h...
Drift table and repository for the contacts entity, with SQLite FTS5 virtual table for full-text search across name and notes fields. Provid...
Drift local table and REST repository tracking which organizations a contact is a member of, enabling multi-tenant family tracking as the pl...
Drift local table and REST repository for the notes entity, carrying foreign keys to both contacts and users so queries can be scoped by con...
Drift table adapter and repository for the notes entity, providing typed access to note records linked to contacts and users. Handles local ...
Data layer managing the activity_statistics table, which caches precomputed per-user aggregates (count by type, total hours, monthly trend)....
Drift table and repository adapter for locally cached activity statistics rows. Shared with Personal Activity Statistics - this feature read...
Drift table adapter and repository for the assignments entity. Stores only ciphertext at rest, consistent with the E2E encryption guarantee....
Repository and table for assignment delivery records. Each row represents one delivery of an encrypted assignment to a specific peer mentor,...
Repository and local cache adapter for the assignment_consents table, providing CRUD operations for consent records with fields consent_type...
Drift local database table mirroring the backend relatives table, storing each relative with a foreign key to the parent contact. Supports o...
Drift table and repository adapter for the relative_case_links junction table storing explicit associations between relatives and contacts. ...
Drift local table mirroring the backend peer_mentor_statuses relation, storing the mentor's current status (active | paused | inactive), the...
Drift local table and REST-backed repository for peer mentor certification records, storing expiry dates, issuing course references, and cur...
Data access component for the peer_mentor_locations table, providing typed location records containing mentor ID, geographic coordinates, av...
Data access layer for reading peer_mentor_locations records during suggestion ranking. Provides indexed queries by organization and active s...
Drift table and repository adapter for workshop session records containing title, description, date range, location, and coordinator foreign...
Drift DAO for the workshop_notes table providing typed queries scoped by workshop_id. Handles local offline persistence via the SQLCipher-en...
Drift-backed local data store for the workshop_participants join table, caching the full participant roster per workshop so the list renders...
Drift table and repository for workshop to-do items, caching records locally in SQLCipher-encrypted storage scoped by workshop_id. Provides ...
Data component managing the notification_scenario_templates table, storing event type, trigger conditions, target role filter, message templ...
Drift (SQLite) repository and REST API adapter for the notification_settings table, storing per-user boolean flags for each notification cat...
Repository layer for the referral_invites table, providing CRUD operations for invite records with referrer attribution, signed token storag...
Drift-backed local repository tracking the authenticated user's enrollment records per course. Stores enrollment state for offline display, ...
Drift-backed local repository for the course catalog. Persists courses fetched from the REST API so the catalog is available offline, and in...
Drift-backed repository managing the certifications table, providing CRUD access to certification records that store user name, organization...
Data component managing the annual_summaries table which stores pre-aggregated yearly impact totals per user. Handles CRUD operations and qu...
Data layer managing both the achievements catalog table (badge definitions, trigger conditions, icon references) and the user_achievements j...
Drift table definition and repository for conversation-starter card records persisted locally on device. Stores card id, title, body text, o...
Drift table storing user preference key-value pairs locally on device under SQLCipher encryption. Serves as the offline-first source of trut...
Drift-backed offline repository for the external_resource_links table. Fetches the org-scoped link list from the REST API at module bootstra...
Drift-based local data store for cached FAQ entries. Each record holds question, plain-text answer, category tag, and role_filter field (pee...
Drift table definitions that mirror the server schema extended with sync-state columns (sync_status, local_id, server_id, conflict_flag). Pr...
Drift database table representing the ordered mutation queue persisted on device. Each row holds the operation type, target entity type and ...
PostgreSQL materialized view or indexed summary table pre-aggregating per-organization activity counts, expense totals, user engagement rate...
Relational table storing user account records including profile fields, invitation status, activation status flag, and organization membersh...
Junction table linking users to organizations with a role enum value. Stores the authoritative role assignment record that drives access con...
Shared relational table storing all registered peer mentor activity records. For this feature the critical column is the status enum (pendin...
Shared append-only audit log table that records every significant administrative action. This feature writes one immutable row per approval ...
Data component managing the activity_flags table with columns activity_id (FK to activities), flagged_by (FK to users), reason_code (enum), ...
Shared data component managing the activities table, extended with duplicate detection fields similarity_score (0-100) and duplicate_candida...
Per-organization configuration store for duplicate detection tolerances including date proximity window in days, minimum similarity score th...
Data component managing the expense_approvals table, which records every reviewer decision for an expense claim. Provides CRUD operations an...
Per-organization rule definitions for automatic expense approval, storing threshold dimensions and enabled state. Each row may target a spec...
Database table that persists metadata for each generated team report, providing an audit trail of when reports were run, by whom, and with w...
Data component managing the bufdir_exports table which persists generated Bufdir report records with status, reporting period, generating us...
Data access layer for the bufdir_exports table, providing typed read and update operations scoped to the current organization tenant. Manage...
PostgreSQL data layer for persisted report template records keyed to the generating user's organization. Stores report name, serialized Repo...
Data layer for the organization_settings table, which has a one-to-one relationship with organizations. Provides typed read/write access to ...
Data layer for the terminology_overrides table, storing per-org override strings keyed by organization_id and a server-enforced term_key enu...
Data layer for the module_configurations table, which stores one row per (organization, module_id) pair recording the enabled state and any ...
Postgres table storing organizational hierarchy nodes as an adjacency list with a self-referential parent_id. Each row represents a single u...
Relational table storing the composite-keyed membership records linking users to organizational hierarchy nodes with a role assignment. Acts...
Postgres table storing one configuration record per organization for their external portal integration. Holds portal URL, encrypted OAuth cr...
Persistent audit table recording every attempt to synchronize an expense record with an external accounting system. Stores connector type, a...
Append-only relational table storing structured audit entries scoped per organization. Each row records actor_id, actor_role, action_type, t...
Data component managing the sessions table, which stores active and revoked session records with user identity, tenant association, token re...
Other Component Types
User Interface components handle presentation logic, user interactions, and visual elements of the application.
Service Layer components contain business logic, orchestrate operations, and provide core application functionality.
Infrastructure components provide foundational utilities, system integrations, and supporting functionality for the application.