Service Layer
84 components in the service layer layer
Service Layer components contain business logic, orchestrate operations, and provide core application functionality.
Business logic layer responsible for fetching, caching, and managing the active organization context throughout the app session. Loads the o...
BLoC-based service that orchestrates the email and password authentication flow against the REST API. Submits credentials to POST /api/v1/au...
Backend service that abstracts the BankID OIDC provider flow behind a common authentication interface. Handles OAuth authorization code exch...
Shared backend service that provides a provider-agnostic interface for linking verified external identities (BankID or Vipps) to platform us...
Backend service that abstracts the Vipps Login OAuth flow behind the same common authentication interface as BankID. In addition to standard...
Core service that orchestrates biometric authentication using the local_auth Flutter plugin. Handles capability detection, invokes the OS bi...
A Riverpod provider that reads the authenticated user's role and organization context from app state and exposes a permission-checking API c...
Core business logic service orchestrating activity creation, validation, and submission. Implements optimistic saving — the activity is imme...
Service responsible for computing and injecting intelligent default values into the activity form to minimize cognitive load for peer mentor...
Shared business logic service for creating, updating, and submitting activities. Used by both the simple activity logging flow and the multi...
BLoC (Business Logic Component) that owns and persists all wizard form state across steps, serializing in-progress registration to local sto...
Business logic layer managing event lifecycle operations including creation, updates, cancellation, and attendance tracking. Communicates wi...
Manages the full lifecycle of speech recognition by delegating to the Flutter speech_to_text plugin, which invokes native platform APIs (iOS...
Business logic service that handles submission of proxy and bulk activity registrations. Accepts a single activity payload plus a list of ta...
Orchestrates the two-phase file upload process: first calls the backend API to obtain a signed storage URL, then PUTs the file directly to t...
Performs client-side validation of selected files before upload begins, enforcing allowed MIME types (images and PDFs) and a configurable ma...
Fetches and manages the active report template configuration from the backend endpoint /api/v1/report-templates, allowing organization admin...
Core business logic layer managing contact lifecycle operations including retrieval, role-filtered listing, and coordination with the offlin...
Injects the authenticated user's role into query contexts to enforce data access boundaries. Shared service originating from the Role-Based ...
Handles full-text search across contacts and notes using the local SQLite FTS5 index as the primary source and a debounced REST API call to ...
Business logic layer for contact CRUD operations, shared across the Contact List & Search and Contact Detail & Edit features. Handles REST A...
Business logic layer for all peer mentor domain operations, exposing a typed PeerMentor domain model to the UI. Handles status transitions (...
Business logic layer for all caregiver and next-of-kin operations. Validates input data at the service layer before passing to the repositor...
Core business logic service that orchestrates the full pause and resume lifecycle for a peer mentor. Exposes pauseMentor() and resumeMentor(...
Responsible for notifying the relevant coordinator whenever a peer mentor's pause status is activated or lifted. Resolves the correct coordi...
Business logic layer for the notes feature handling persistence, access control, and search index registration. Enforces row-level security ...
Business logic service handling all geospatial operations for the map feature. Delegates geocoding and reverse geocoding to the backend API ...
Flutter BLoC (or Riverpod notifier) that manages filter state and async data loading for the personal statistics dashboard. Handles events f...
Orchestrates retrieval and caching of personal statistics data. Calls the REST API to fetch pre-aggregated rollups and falls back to the loc...
Server-side Next.js service that generates CSV or PDF exports of team reports based on query parameters, keeping mobile payload small. Enfor...
Core business logic service that fetches and aggregates team activity data from the backend REST API, applying the coordinator's association...
Translates the internal aggregated report object into the exact field structure required by Bufdir's grant reporting format, reverse-enginee...
The core server-side service that orchestrates Bufdir report generation by querying activities, users, organizations, and related tables for...
Executes the complex SQL aggregation queries that compile all relevant activity data for a reporting period into a structured intermediate o...
Backend service that performs a lightweight duplicate check against the activities table when called from the activity wizard summary step. ...
Core business logic service orchestrating the full expense registration workflow. Handles creation, submission, and retrieval of expense rec...
BLoC-based validation service that enforces expense type mutual-exclusion rules and business constraints at the application layer. Prevents ...
Evaluates whether a given expense amount exceeds the organization's configured receipt requirement threshold (e.g., 100 NOK for HLF) and ret...
Orchestrates the full receipt upload workflow: compresses the captured image, sends it to the Next.js backend via multipart POST (/api/v1/re...
Flutter BLoC that manages the client-side state of the coordinator's approval queue, including pagination, filter state, real-time refresh v...
Rule evaluation service that compares reimbursement claim attributes (distance in km, out-of-pocket expense amount, receipt presence) agains...
Core backend service that orchestrates the two-track approval workflow. On claim submission it invokes the Approval Threshold Service to det...
Monitors and enforces the valid state machine for assignment lifecycle transitions on the backend. Validates that transitions follow the cor...
Core service orchestrating the full lifecycle of encrypted assignment dispatch. Encrypts assignment payloads locally on the coordinator's de...
Listens for threshold-crossing events emitted by the Threshold Tracking Service and dispatches coordinator-targeted push notifications throu...
Core business logic service that maintains per-peer-mentor assignment counters, evaluates tier boundaries against per-association threshold ...
Core service managing the full lifecycle of push notifications on the mobile client, including FCM token registration, permission request fl...
Core business logic service that manages the full lifecycle of scenario-based reminders. It evaluates scenario rules against current applica...
Business logic service that orchestrates calendar synchronization between the platform and external calendar applications. Handles one-tap e...
Business logic service responsible for resolving the authenticated user's role and assembling the role-appropriate dashboard data payload. C...
Business logic layer for the settings feature, orchestrating reads and writes across the local key-value store (shared_preferences) and the ...
Handles the opening of external URLs using either the system browser or an in-app WebView depending on per-resource configuration. Validates...
Business logic layer responsible for fetching, caching, and surfacing the organization-scoped collection of talking cards and toolbox resour...
Handles the composition and dispatch of user invitation emails via a transactional email provider such as Resend or SendGrid. Generates time...
The core backend service handling all user lifecycle operations within the admin panel. Enforces multi-tenancy boundaries so that each admin...
Backend service handling CRUD operations for organization-level settings including contact details, logo management, and feature toggle flag...
Backend service that computes and serves aggregated KPI metrics for the admin dashboard. Executes optimized PostgreSQL aggregate queries par...
Resolves the data visibility scope for a given authenticated user and role before dashboard queries are executed. Maps the user's role and o...
Backend service that handles all coordinator oversight operations for submitted activities. Enforces coordinator scope validation to ensure ...
Specialized service responsible for recording immutable audit trail entries whenever an approval action is taken on an activity. Ensures com...
Orchestrates the full Bufdir report export workflow for administrators. Accepts export parameters, invokes the backend report generation end...
Core backend service encapsulating all admin-facing reimbursement operations including filtered listing, individual approval and rejection, ...
Service responsible for writing immutable audit log entries whenever a reimbursement is approved, rejected, or included in a bulk action. Re...
Core service managing the three-tier organizational tree of national chapters, regions, and local associations. Handles tree traversal, node...
Flutter BLoC-based service that stores and broadcasts the active association context throughout the app session. All API calls inject the ac...
Core business logic service responsible for managing a user's multi-association membership lifecycle. Handles fetching all associations for ...
Core orchestration service that manages all outbound integration calls to external systems. Routes requests to the appropriate adapter based...
Core business logic service for course listing, enrollment lifecycle, capacity enforcement, and reminder scheduling. Orchestrates enrollment...
Core service managing the full certification lifecycle for peer mentors, including issuance, renewal, expiry evaluation, and revocation. Tri...
Core business logic service for managing mentor program sessions and career workshops. Orchestrates session creation, updates, participant m...
Backend service responsible for generating short-lived referral tokens per peer mentor and recording attribution when a referred individual ...
Backend scheduled job that runs once per year (January) to pre-compute annual summary data for all active peer mentors. Queries all activity...
Core service that orchestrates retrieval and presentation logic for the peer mentor's annual summary. Fetches pre-computed summary data from...
Shared service that provides aggregated activity and contact statistics for a given user and time range. Used by both the Personal Activity ...
Backend service responsible for generating static shareable assets (PNG image card or PDF) from a peer mentor's annual summary. Renders a pr...
Core business logic service responsible for evaluating badge trigger conditions and awarding badges to users. Runs nightly evaluation jobs c...
Infrastructure service that schedules and triggers the nightly badge evaluation job. Integrates with the backend job scheduling system to in...
Core client-side calculation engine that fetches the peer mentor's activity and reimbursement history from the REST API and applies organiza...
Fetches and caches the organization-specific benefit category configuration stored as JSON in the PostgreSQL database. Provides the calculat...
Centralized HTTP client for the Flutter mobile app that handles all communication with the Next.js backend. Provides a typed, unified interf...
Central service managing runtime accessibility state, screen reader detection, font scaling, and focus traversal order across the applicatio...
Implements the server-wins conflict resolution strategy for cases where a locally queued mutation conflicts with a server-side change detect...
Core orchestration service responsible for reconciling locally queued mutations with the backend REST API when connectivity is restored. Pro...
Provides AES-256-GCM symmetric encryption for sensitive fields at rest. Wraps key derivation logic with per-user keys stored in secure stora...
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.