Shared Components
Components reused across multiple features
UI Components
Shared widget that allows users holding multiple roles to switch their active role within the app session. Triggers role...
Bottom navigation bar that conditionally renders tabs and restricts navigation options based on the user's active role. ...
Mobile screen shown during the activity registration wizard that allows a peer mentor to pick an activity type from thei...
A per-field microphone trigger widget that activates Flutter's speech_to_text package and appends the transcription resu...
Reusable widget for capturing or selecting a receipt photo via the device camera or gallery using image_picker. Displays...
Searchable list of peer mentors drawn from the coordinator's existing contact list, allowing selection of exactly one pe...
Reusable inline widget that renders a subtle 'Recorded by coordinator' badge on any activity card or detail view where r...
Date range picker pre-configured with common Bufdir reporting periods (quarterly, annual). Users can also pick a custom ...
Reusable card widget displaying a contact's key information (name, role, organization, notes snippet). Styled with desig...
Accessible search input component with debounce support for filtering contacts by name and notes. Built on the shared Ap...
Reusable card widget for displaying peer mentor-specific information including availability status, assigned members cou...
Scrollable list section within the contact detail screen showing the contact's past activities, dates, and durations. Pr...
Reusable chip/tag widget displaying a contact's membership across up to 5 local chapters simultaneously (NHF requirement...
Reusable widget rendering a pill-shaped badge indicating a peer mentor's certification state: active, paused, or expired...
Dismissible warning dialog surfaced during activity submission when the system detects a potential duplicate across coor...
Reusable multi-select contact list widget that allows coordinators to pick one or more peer mentors from their managed c...
Collapsible filter panel allowing coordinators to narrow visible mentor markers by availability status or specialization...
Compact, reusable chip widget that renders the current status of a claim (draft, submitted, approved, rejected, exported...
Reusable UI component for selecting a configurable start and end date for export operations. Used in both accounting exp...
Reusable date range selection widget used when predefined presets do not cover the required period. Enforces logical dat...
Reusable activity form pre-configured for proxy entry. Shows all standard activity fields (date, type, duration, notes) ...
Search and select widget that lets a coordinator pick one or more peer mentors from their chapter's roster. Supports typ...
Reusable date selection widget used within the pause activation flow to capture an optional expected return date. Enforc...
Full-screen modal allowing a peer mentor to activate or lift a pause. Collects optional expected return date and display...
Reusable badge/chip widget rendering the peer mentor's status enum (active, paused, expired_cert, resigned) with appropr...
Reusable stat card widget displaying a single KPI metric (e.g., active peer mentors, activities this month, pending reim...
Tree-based navigation component for browsing deeply nested org structures (NHF: national association → region → local ch...
Reusable date-range picker pre-configured for common Bufdir reporting periods (quarter, half-year, full year). Validates...
Displays the audit log of past Bufdir exports for the current organisation, showing who triggered each export, the perio...
Donut chart built with fl_chart showing breakdown of activities by type for the selected coordinator and period. Include...
Bar chart built with fl_chart showing activity count per month for the selected period. Supports tap-to-highlight and an...
Horizontal filter bar allowing selection of time period (this month, last 3 months, this year, custom range) and optiona...
Row of stat cards displaying key coordinator KPIs: total activities this month and year-to-date, hours of peer mentor su...
Unread count badge overlaid on the Notifications tab in the bottom navigation bar. Subscribes to a real-time unread coun...
Reusable widget that visually communicates a peer mentor's certificate status across multiple surfaces such as coordinat...
Reusable animated card that reveals a single statistic (e.g., total hours volunteered, number of people helped) with a c...
WCAG 2.2 AA compliant in-app banner component that renders scenario-based notification messages while the user is active...
Wraps bottom sheets and modal dialogs with correct focus trapping, initial focus placement, and focus restoration on clo...
Provides live-region announcements for asynchronous state changes such as loading completions, form submission results, ...
A reusable Flutter widget that wraps interactive elements with Flutter Semantics properties, providing labels, roles, hi...
An OS-level alert dialog that fires before a screen reader vocalises a field flagged as containing sensitive personal da...
A reusable summary screen inserted as the final step of every activity or report wizard. Lists all entered values in a r...
Provides field-level and screen-level help text inline within the UI, replacing separate help sections. Help is revealed...
Flutter NavigationBar implementation that enforces labelled icons — no icon-only buttons. All tabs display both icon and...
Renders form and server errors in plain Norwegian using a two-part structure: what went wrong and how to fix it. Never s...
A composable screen wrapper that enforces the cognitive accessibility rule of at most three primary choices per screen. ...
Displays current step position and total step count in all multi-step wizards. Enforces the maximum of 5 steps and provi...
Provides a Flutter TextTheme derived entirely from design tokens, ensuring all body copy uses FontWeight.w400 or heavier...
A Flutter widget wrapper that enforces a minimum 44×44 pt tappable area for all interactive controls. Wraps GestureDetec...
A Flutter ThemeData color scheme built exclusively from contrast-verified token pairs. Exposes foreground/background pai...
A persistent five-tab bottom navigation bar built on StatefulShellRoute that preserves tab state across navigation event...
A clearly labelled close IconButton injected into every ModalBottomSheet, AlertDialog, and full-screen overlay. Ensures ...
A back control that appears on every screen that is not a root tab destination, providing an explicit tap-based way to n...
A scroll view wrapper that enforces vertical-only scrolling throughout the application, preventing horizontal carousels ...
Reusable card widget that displays a single partner organization with its logo, display name, and a brief descriptor. Re...
A drop-in replacement for Flutter Text widgets that automatically resolves label keys through the active organization's ...
A conditional rendering wrapper widget that gates any child widget behind a single boolean feature flag check. Accepts a...
Slack-style workspace-switching bottom sheet that appears for users (typically NHF peer mentors) who belong to multiple ...
Service Components
Application-layer service orchestrating authentication flows against the Supabase Auth backend. Abstracts Supabase SDK c...
Centralized Supabase session lifecycle manager shared across all authentication methods. Persists, refreshes, and invali...
Wraps Flutter's local_auth package to manage device-level biometric authentication for returning users. Checks hardware ...
Evaluates whether the current active role is authorized to access a specific screen, action, or data set. Used by route ...
BLoC/Riverpod-based state manager that holds the current active role and exposes role change events to the widget tree. ...
GoRouter redirect callback that intercepts navigation for users whose role is flagged as mobile-blocked. Acts as a termi...
Service that reads the JSON metadata column of an activity type and exposes strongly typed accessors for downstream feat...
Service that determines the set of chapter IDs a coordinator is authorized to query. Handles NHF's multi-chapter members...
Resolves the organisational scope for export queries. Given a scope ID and level (local/region/national), returns all ch...
Service responsible for delivering push and in-app notifications to coordinators when a peer mentor changes status. Reso...
Compares a pending activity submission against existing activity records for the same contact across all chapters they b...
Encapsulates filtering logic for mentor search criteria including availability status and specialization tags. Translate...
Evaluates whether a receipt attachment is required or optional based on the org-configurable monetary threshold (default...
Sends push notifications to the submitting peer mentor when their claim status changes (approved or rejected). Uses Supa...
Shared Dart utility implementing the threshold decision logic used both client-side (immediate UX feedback) and server-s...
Encrypts confidentiality declaration content before upload to Supabase Storage, consistent with the encrypted assignment...
Provides read access to organization-level feature flags, including the driver administration feature toggle. Used by bo...
Ensures that unique participant counts are accurate by detecting and excluding double-counted records arising from coord...
Manages the definition and boundaries of Bufdir reporting periods (typically annual). Determines which activity records ...
Manages the distinction between who registered an activity and who it is attributed to. Ensures every proxy entry stores...
Detects conflicting activity entries by querying all registrations matching the triple (peer mentor ID, date, activity t...
Core business logic service handling all peer mentor status transitions. Enforces valid state machine transitions (activ...
Handles dispatch of push and in-app notifications to coordinators when a peer mentor's pause status is activated, lifted...
Generates CSV and Excel exports of org-level data for Bufdir grant reporting and internal governance. Queries activity, ...
Middleware service that enforces Supabase row-level security policies for org_admin and super_admin roles. Intercepts al...
Resolves and traverses the organisation tree structure, supporting both NHF's deeply nested model (national → region → c...
Business logic layer for creating, updating, deactivating, and role-assigning user accounts within an admin's org scope....
Validates and scopes statistics access based on user role. Coordinators may only see their own peer mentors via Supabase...
Computes aggregated activity statistics for a peer mentor required by badge criteria evaluation, including total assignm...
Business logic layer for reading, updating, and enforcing notification opt-out preferences per user and scenario type. A...
Mobile-side service that parses incoming push notification payloads and routes the user to the correct in-app screen. Ha...
Service responsible for generating localised, personalised notification copy for each scenario type. Injects user-specif...
Acts as the bridge between recruitment attribution events and the badge and recognition system. Evaluates recruitment mi...
Reads the volunteer's registered activity data and aggregates session count and total duration to pre-populate the calcu...
Centralizes screen reader focus management for navigation transitions, dialog opens/closes, and dynamic content updates....
Detects whether a screen reader (VoiceOver or TalkBack) is active on the device and exposes this state as a reactive str...
Business logic service that intercepts screen reader focus events on fields flagged as sensitive and orchestrates the wa...
Centrally manages all user-facing copy to ensure it meets plain-language guidelines. Provides keyed access to labels, er...
BLoC-based state manager for all multi-step wizards, implementing pause-and-resume semantics. Persists partial wizard st...
A Riverpod-backed service that tracks and restores per-tab navigation state using StatefulShellRoute branch navigators. ...
go_router redirect guard that intercepts navigation for unauthenticated users or users without an active organization co...
Central service responsible for seeding and maintaining the active tenant context after an organization is selected. Loa...
Stateless utility service that applies resolution logic to raw terminology maps: handles missing keys with fallbacks, su...
A Riverpod StateNotifier that manages the active organization's terminology map lifecycle. On login it fetches the JSONB...
A Riverpod provider that exposes the resolved feature flag map for the currently active organization. Reads flags from t...
Determines the set of organization units a given user may read or write data for, based on their assignments and role. U...
Rolls activity data upward through the hierarchy tree from local chapter level to regional and national levels. Used by ...
Core business logic service for managing organization unit trees. Wraps Supabase queries for the recursive adjacency-lis...
Manages the junction table that links users to one or more organization units. Enforces the is_primary constraint (only ...
Data Components
Data layer repository providing a stable interface for authentication persistence operations. Manages local session cach...
Secure local storage adapter for OAuth tokens (Vipps, BankID) and Supabase session data. Uses Flutter Secure Storage to ...
Encrypted key-value store backed by flutter_secure_storage that persists the Supabase session token, its expiry timestam...
Riverpod AsyncNotifier that fetches activity types on login and holds them in memory for the session. Serves cached data...
Adapter encapsulating all interactions with Supabase Storage for receipt image management. Handles image compression bef...
Riverpod provider that exposes the coordinator's peer mentor contact list filtered and ready for use in proxy and bulk s...
Data access layer for contacts and peer mentors backed by Supabase. All queries are scoped by organization ID and rely o...
Data access layer for retrieving and updating full contact profiles, including extended attributes like chapter affiliat...
Data access layer for peer mentor profile records in Supabase. Provides typed Dart models for peer mentor data including...
Data access layer for reading and writing peer mentor status fields in Supabase. Manages the status enum (active, paused...
Data access layer for the contact_chapters junction table in Supabase, providing CRUD operations for contact-to-chapter ...
Maintains a local Drift SQLite cache of contacts and notes fetched from Supabase, used by the offline search repository....
Fetches and caches the organisation-level per-km reimbursement rate and auto-approval threshold from Supabase. Provides ...
Enforces strict per-organization data isolation across all database queries, ensuring that NHF, Blindeforbundet, HLF, an...
Read-only data access layer that queries the aggregated activity records used by the Bufdir reporting pipeline. Shared w...
Supabase Storage adapter managing upload, retrieval, and signed URL generation for exported Bufdir report files. Enforce...
Supabase data access layer for peer mentor certification records. Stores certification type, issue date, expiry date, an...
Supabase data access layer for peer mentor status records and pause history. Manages the peer_mentor_status table includ...
In-memory cache for statistics query results with a 15-minute TTL to avoid repeated heavy Supabase queries. Cache is key...
Data access layer for persisting and retrieving in-app notification records displayed in the Notifications tab. Supports...
Data access layer for reading peer mentor pause status records and resolving coordinator relationships from the org memb...
Executes aggregation queries over the activity table to compute session counts, total hours, and other metrics for a giv...
Persistence layer for user-level notification preference records keyed by user ID and scenario type. Provides fast upser...
Data access layer for persisting and querying scenario-based push notification records, including trigger history, deliv...
Defines and persists the list of form fields throughout the app that are designated as containing sensitive personal dat...
Static registry mapping every application error code to a plain-language two-part message object containing a cause desc...
Stores and serves inline contextual help texts keyed by screen identifier and field identifier. Loaded from a bundled as...
Persists and retrieves partial wizard answers locally using shared preferences or Hive, enabling pause-and-resume withou...
Central repository of all design tokens (colors, typography, spacing, sizing, radii) for the application. Tokens are def...
Data access layer responsible for fetching, caching, and exposing organization records from Supabase. Provides the compl...
Persists terminology maps to device-local storage (e.g., SharedPreferences or Hive) so that labels are available immedia...
Supabase data access layer for the organization_units table which implements a recursive adjacency-list structure (paren...
Data access layer for the user_organization_unit_assignments junction table. Manages user-to-unit relationships includin...
Infrastructure Components
Utility widget or mixin providing keyboard-aware scrolling behavior for form screens. Automatically adjusts scroll offse...
Infrastructure wrapper around the Supabase Flutter SDK's auth module. Provides an injectable singleton client used acros...
Intercepts incoming deep links during OAuth flows for both Vipps and BankID. Registers the app's custom URI scheme, pars...
Thin wrapper around Flutter Secure Storage providing a consistent interface for encrypted local persistence. Used by mul...
Centralized service responsible for Supabase session lifecycle operations including token refresh, session validation, a...
Thin wrapper around the Flutter url_launcher package used by the admin portal link widget to open external URLs in the d...
Thin wrapper around the device key-value store (SharedPreferences on Flutter) providing a typed, async interface for per...
Low-level Supabase client wrapper scoped to the activities table. Abstracts PostgREST query construction and error mappi...
Riverpod provider that loads and exposes the per-organisation terminology overrides used throughout the app. Extended fo...
Shared singleton that initialises and exposes the Supabase client instance used by all repository layers throughout the ...
Fetches and parses the JSON field configuration stored in Supabase that defines org-specific form fields. Supports addin...
Wraps Flutter's speech_to_text package and exposes a simplified interface for per-field transcription. Handles microphon...
Flutter utility that receives a file URL or byte payload from the edge function and triggers the native device download ...
Lightweight interceptor layer that injects the duplicate_reviewed field into the activity insert payload based on user r...
Utility that constructs Supabase query filters aligned with the Row Level Security policies for the contacts and peer_me...
Client-side validation utilities for the edit contact form, enforcing required field rules, format constraints (e.g., ph...
Flutter ThemeData extension exposing the project's design token system (colors, typography, spacing, radii) as typed Dar...
Riverpod provider exposing the initialized Supabase client instance to all repository layers. Centralizes client configu...
Wraps a RxDart or Timer-based debounce around the search input stream to prevent excessive Supabase queries on every key...
Lightweight event tracker that records which expense types are selected and how often mutual exclusion is triggered, pro...
Wraps the Flutter image_picker package to provide a unified interface for both camera capture and gallery/file-picker se...
Utility that converts structured export records into a downloadable CSV or JSON file. Handles encoding, column ordering,...
Utility that enforces coordinator or higher role authorization before granting access to proxy registration UI and servi...
Infrastructure component that schedules and triggers backend cron jobs, specifically the nightly certification expiry ch...
Database-level row-level security policy definitions for org_admin and super_admin roles in Supabase. Policies are appli...
Uploads generated export files and attachment ZIPs to Supabase Storage under organisation-scoped paths. Generates time-l...
Wraps the Supabase Storage SDK to provide a typed interface for file upload, deletion, and signed URL generation. Config...
Shared service that handles transitioning a peer mentor into and out of paused status. Used by the certification feature...
Shared infrastructure service that delivers push notifications to mobile devices. Used by the reminder dispatch service ...
Thin adapter layer wrapping the fl_chart Flutter library to provide typed, app-specific chart configuration builders. Ce...
Shared infrastructure component responsible for sending push notifications via Firebase Cloud Messaging. Used across cer...
Shared Firebase Cloud Messaging dispatch function that sends push notifications to device tokens and writes in-app notif...
Shared infrastructure component responsible for sending push notifications via the platform push service (FCM/APNs throu...
Manages Supabase Realtime channel subscriptions for the notifications table, scoped to the current user's user_id. Emits...
Middleware utility that enforces organisation-scoped row-level security on all summary-related Supabase queries. Ensures...
Processes incoming deep links containing referral tokens when a new member taps the referral URL. Extracts the referral ...
Utility wrapper around a Flutter QR code rendering package (e.g., qr_flutter). Accepts a referral URL string and returns...
Wraps the Flutter Share plugin (share_plus) to invoke the native iOS and Android system share sheet. Packages the referr...
Abstracts Flutter's SemanticsService and platform accessibility APIs behind a unified interface to simplify testing and ...
Ensures all UI components consume colour, typography, and spacing values exclusively from the project's design token sys...
Assembles the final Flutter ThemeData by composing the contrast-safe color scheme, the accessible text theme, and token-...
Central GoRouter configuration that defines all application routes with accessibility constraints built in: StatefulShel...
A shared utility that posts accessibility announcements to the platform's screen reader via Flutter's SemanticsService. ...
Infrastructure component that loads and exposes the organization-specific feature flag configuration fetched from Supaba...
Infrastructure utility that injects the selected organization ID into the Supabase client configuration so all subsequen...
A compile-time constant registry of all label keys used across the application, defined as a Dart abstract class with st...
Defines the Riverpod provider graph for the terminology system: the root organizationLabelsProvider, derived providers f...
Infrastructure utility that bridges the terminology system with Flutter's Semantics tree to satisfy WCAG 2.2 AA requirem...
A centralized constants file defining all valid feature flag keys as typed string constants. Prevents magic strings scat...
Manages Supabase Row Level Security policies that join through the unit assignment junction table to enforce data access...