Service Layer
111 components in the service layer layer
Service Layer components contain business logic, orchestrate operations, and provide core application functionality.
Backend service implementing the Authentication Module's stable sign-in/sign-out/refresh contract using bcrypt password hashing, short-lived...
Client-side Riverpod service (no codegen) that calls the Auth Service REST endpoints, stores the access token in memory and the refresh toke...
Handles the generation, delivery, and validation of time-limited signed reset tokens. Sends the reset email via the platform email gateway a...
Implements the BankID OIDC authorization code flow with PKCE for the Flutter mobile app. Generates the code verifier and challenge, launches...
Implements the OIDC-compatible OAuth 2.0 authorization code flow for Vipps Login, handling redirect initiation, deep-link callback processin...
On a successful biometric pass, retrieves the device-bound refresh token from Secure Token Store and silently exchanges it for a new short-l...
Server-side WebAuthn library integration (SimpleWebAuthn or WebAuthn4J) running on the Node.js / Next.js backend. Generates and validates re...
Backend middleware that intercepts every authenticated API request, reads the role claim from the validated JWT, and evaluates it against th...
Triggers a re-fetch of the tenant bootstrap endpoint after a context switch, supplying the new organization ID to reload the module registry...
A Riverpod StateNotifier that owns the currently active role-organization pair for the authenticated user. Persists the selected context to ...
Backend REST service (Next.js /api/v1/activities) that persists peer mentor activity records to the PostgreSQL database. Validates the minim...
Shared service responsible for persisting activity records via optimistic mutation and the Drift mutation outbox, supporting both quick-log ...
Riverpod StateNotifier (keepAlive: true) that holds the full in-progress wizard form state across all steps. Prevents data loss when the app...
Integrates with the device calendar plugin (device_calendar) to write, update, and optionally delete calendar entries when activities or eve...
Manages the full speech recognition session lifecycle by wrapping the speech_to_text Flutter plugin, which delegates to Apple SpeechRecogniz...
Handles client-side validation, upload queuing, and multipart POST submission of attachment files to the backend attachment endpoint. Enforc...
Backend service (Next.js REST endpoint) that stores and serves per-organization form schemas as JSON configuration objects, defining which r...
Business logic service for submitting proxy activity records. It calls the backend API with an explicit on_behalf_of user ID, validates that...
Handles server-side creation of one activity record per selected peer mentor within a single atomic database transaction. Accepts a bulk pay...
Handles creation and persistence of events by posting to POST /api/v1/events with organization context derived from the JWT. Queues failed o...
BLoC/Riverpod state container that manages step progression, field values, and back-navigation safety for multi-step wizards. Shared with th...
Business logic layer handling participant registration and cancellation for events. Executes POST /api/v1/events/{id}/participants for sign-...
Core business-logic service that creates, validates, and syncs expense records. Evaluates auto-approval eligibility by checking the configur...
Fetches and caches the organisation-specific expense type definitions from the backend, including mutual exclusion rules that prevent invali...
Backend-bound service responsible for compressing captured images client-side to a target of 500 KB or below, computing a SHA-256 content ha...
Evaluates the JSON rules payload carried by each expense type record to determine mutual-exclusion constraints, receipt-required flags, and ...
Handles POST of a signed confidentiality declaration to the REST API, attaching the declaration version hash, user ID, and UTC timestamp. Ro...
Riverpod-based repository provider that executes role-filtered FTS5 full-text search queries against the local Drift database. Applies a use...
Riverpod-based repository that wraps Drift queries on the relatives table, providing CRUD operations for caregiver and next-of-kin records l...
Riverpod-backed service managing the full lifecycle of notes including create, read, update, and delete operations against the REST API and ...
Backend REST API endpoint that computes per-user activity totals scoped strictly to the authenticated user - count by activity type, total h...
Riverpod provider that calls the dedicated aggregation REST API endpoint and exposes a typed StatisticsSummary to the UI. Manages cache inva...
Riverpod provider that fetches coordinator-scoped team statistics from the REST API, caching results in Drift for offline access. Joins acti...
Writes delivery and read confirmation records to assignment_deliveries, both immediately when online and via the Mutation Outbox when offlin...
Implements per-tenant asymmetric encryption and decryption for assignment payloads. Generates and persists RSA/EC key pairs to Flutter Secur...
Server-side service responsible for incrementing the assignment delivery count when a peer mentor marks an assignment as contacted or comple...
Business logic layer for all consent lifecycle operations including gate evaluation, grant recording, version upgrade detection, coordinator...
Riverpod-managed service layer handling scoped CRUD operations for relative records via the REST endpoint /api/v1/contacts/:id/relatives. Ap...
Backend service and corresponding Riverpod provider that manages CRUD operations on the relative_case_links junction table. Enforces cross-o...
Riverpod service layer that issues PATCH /api/v1/users/:id/mentor-status requests to update the peer_mentor_statuses record and triggers a p...
Riverpod service that manages peer mentor status transitions (active ↔ paused) via the REST API, enforcing atomic writes and handling backen...
Backend scheduled service that runs daily to query the certifications table for records within a configurable warning window or past the exp...
Backend-integrated service that fetches role-scoped peer mentor location data from the peer_mentor_locations REST endpoint, enforcing coordi...
Server-side service that ranks eligible peer mentors by proximity to a contact's registered location using Haversine distance computation. A...
REST endpoint handler at GET /api/v1/assignments/:id/suggested-mentors that validates the caller's authorization, checks the geographic-map-...
Checks the platform module registry at runtime to determine whether the mentor-program module is enabled for the current tenant. Returns a d...
Handles all business logic for workshop CRUD operations, module-toggle awareness, and synchronisation with the Drift/SQLCipher offline store...
Riverpod provider scoped to workshop_id that manages note creation, retrieval, and auto-save debounce logic for workshop notes. Debounces wr...
Manages CRUD operations for workshop participant records, including registering new participants, updating attendance status values (registe...
Handles CRUD operations for workshop to-do items, coordinating between the Riverpod provider, the Drift local cache, and the mutation outbox...
Renders accessible HTML email templates with semantic markup, sufficient contrast, and plain-text fallback for every notification type. Inje...
Routes each notification event to the appropriate delivery channels (push, email, SMS) based on per-type configuration and user preferences....
Backend service providing CRUD operations for notification_scenario_templates, enforcing per-org isolation and validating scenario definitio...
Async backend service that subscribes to domain events such as activity overdue, assignment dispatched, and certificate expiring, then evalu...
Service that resolves placeholder variables in notification message templates at send time, substituting context values such as contact name...
Riverpod service that sends PATCH requests to the backend whenever a notification preference is toggled, ensuring server-side persistence so...
Backend service that generates server-side signed short invite URLs encoding the referrer user ID and organization tenant context, persistin...
Aggregates referral invite outcomes (sent, accepted, pending, expired) per referrer by joining referral_invites against user registration ev...
Manages the full enrollment lifecycle - fetching the org-filtered catalog from the REST API, submitting enrollment POSTs to create course_en...
Backend-aware service that fetches the current user's certification record from the REST API and exposes it to the UI layer. Determines cert...
Scheduled backend job that queries the certifications table for records with expiry_date within configurable reminder windows (60, 30, and 7...
Backend service that aggregates yearly activity metrics per peer mentor by querying activities, event_participants, and activity_statistics ...
Backend service hosting the declarative badge rule engine that evaluates badge eligibility after activity saves, certification events, and s...
Pure Dart service that executes the client-side impact calculation using a static, versioned impact model compiled into the app bundle. Acce...
A lightweight Flutter service that fetches the versioned talking-cards catalogue from the backend REST endpoint and upserts new or updated c...
Backend-coupled CI service that runs flutter_accessibility_lints and Semantics tree diffing on every pull request to gate merges on WCAG 2.2...
A Riverpod StateNotifier that combines module registry enablement state and the active role context from the role provider into a single rea...
Fetches the enabled module set for the current user's tenant from the backend bootstrap response and exposes it as a Riverpod provider consu...
Riverpod provider that reads and writes user preferences to the local Drift user_preferences table and enqueues sync mutations to the backen...
Centralized registry where each feature module registers its configurable preference options at app startup, following the same module regis...
Reads organization-level support contact values (email, phone) from the backend bootstrap response and caches them locally for offline avail...
Fetches the privacy policy document from the backend endpoint or falls back to a bundled locale-aware asset, then caches the result locally ...
Fetches the FAQ JSON dataset from the backend REST endpoint and persists it locally via Drift for offline access. Serves role-filtered and k...
Manages the lifecycle of client-side UUIDs assigned to entities created while offline and reconciles them to server-assigned IDs after a suc...
Serializes pending write operations with retry metadata into a persistent outbox queue stored in the encrypted local DB. Replays mutations i...
Resolves write conflicts that occur when the same entity is modified both locally and remotely during an offline period. Applies last-write-...
Processes the mutation outbox by polling pending Drift table rows and uploading them to the backend when connectivity is available. Implemen...
Server-side Next.js API route handler that executes tenant-scoped PostgreSQL aggregation queries to compute activity counts, active user cou...
Utility service that queries the module_configurations table for a given organization and returns the subset of KPI categories that should b...
Backend service that queries activities, events, and audit_logs tables with cursor-based pagination sorted by created_at descending. Enforce...
Generates, stores, and validates short-lived cryptographic tokens used in user invitation emails. Tokens expire after 48 hours; redemption i...
Backend service layer implementing the full user lifecycle for org admins: sending tokenized invitation emails, completing registration, upd...
Backend service that processes role assignment, change, and revocation requests. Enforces multi-tenant isolation so an admin can only modify...
Processes bulk user operations - deactivation, role change, and invitation resend - as a single batched API call executed within a database ...
Backend service responsible for processing approve and reject actions on activity submissions. Validates that the requesting user holds Coor...
Backend service exposing REST endpoints POST /api/v1/activities/:id/flags and PATCH /api/v1/activities/:id/flags/:flagId for flag creation a...
Scheduled background service that compares newly submitted activities against recent history across configurable dimensions including peer m...
Handles administrator decisions on duplicate candidates with two resolution paths: confirm-duplicate performs a soft-delete of the secondary...
Backend service handling the review lifecycle for expense claims, including single-record and bulk approval actions. Writes reviewer decisio...
Backend service that manages CRUD operations for approval_rules and evaluates submitted expense claims against the organization's active rul...
Backend service that streams query results server-side as a CSV file download in response to an export request from the Reports Page. Applie...
Backend service that executes tenant-scoped aggregation queries against the activities, users, and user_organization_roles tables to produce...
Server-side Next.js service that aggregates activity records from PostgreSQL scoped strictly to the requesting organization's tenant, maps i...
Manages the versioned server-side configuration that maps internal Meander activity fields to Bufdir's required output structure. Maintained...
Next.js API route that retrieves the finalized bufdir_exports record and streams it as a downloadable file in the format accepted by Bufdir ...
Backend Next.js API route handler that receives parameterized report queries from the Report Builder UI, applies strict tenant-scoped WHERE ...
Server-side streaming endpoint that executes a report query and writes results as CSV or XLSX to the HTTP response using Node.js streaming t...
Server-side service that defines and exposes the enumerated set of permitted dimensions, filters, groupings, and aggregation metrics availab...
Backend service that handles CRUD operations on the organization_settings table, enforcing role-based access (Org Admin and Global Admin onl...
Manages creation, expiry enforcement, and revocation of time-bounded Norse Global Admin support access grants for a tenant organization. Enf...
Next.js API route handler that manages CRUD on the terminology_overrides table scoped by organization_id, validating all writes against the ...
Backend service that manages reading and writing of per-tenant module configurations in the module_configurations table. Resolves declared i...
Backend service managing CRUD operations on organization_hierarchy_nodes using a Postgres adjacency list model with self-referential parent_...
Backend service managing CRUD operations for user-organization memberships stored in user_organization_roles. Handles assignment, transfer, ...
Backend service that persists and manages external portal configuration per organization. Handles OAuth credential encryption at rest, test-...
Backend service implementing the connector pattern that bridges Meander approved expense records to external accounting systems. Exposes a s...
Backend service that queries the audit_logs table to aggregate and categorize security-relevant events for a given tenant. Filters by event_...
Shared backend helper injected into sensitive domain services (user management, role assignment, organization settings) to emit append-only ...
Backend service that handles admin-initiated session revocation by invalidating the session record and the full refresh-token chain for the ...
Pure formula-driven calculation module that converts organization size into manual reporting cost estimates and Meander subscription cost us...
Server-side or edge-function validation logic that checks the submitted booking form payload for required fields, valid email format, and ho...
Other Component Types
User Interface components handle presentation logic, user interactions, and visual elements of the application.
Data Layer components manage data persistence, storage operations, and data access patterns throughout the application.
Infrastructure components provide foundational utilities, system integrations, and supporting functionality for the application.