Infrastructure
66 components in the infrastructure layer
Infrastructure components provide foundational utilities, system integrations, and supporting functionality for the application.
Infrastructure layer responsible for JWT token parsing, validation, and expiry checks. Decodes access token claims to extract user ID, roles...
Flutter infrastructure layer wrapping flutter_web_auth_2 (or equivalent) to launch external OAuth provider URLs inside a secure in-app brows...
Shared backend infrastructure for signing, verifying, and managing platform JWTs. Used by both BankID/Vipps authentication and Email & Passw...
Next.js API route infrastructure that receives OAuth authorization code callbacks from BankID and Vipps after the user completes authenticat...
Platform-level abstraction wrapping the local_auth Flutter plugin and Flutter Secure Storage package. Provides a stable interface over iOS L...
Next.js middleware layer that intercepts every API request and validates the JWT role claims server-side before the request reaches any rout...
BLoC (Business Logic Component) state management layer for the activity logging flow. Translates UI events (form field changes, submission t...
Infrastructure utility that intercepts and resolves incoming deep links targeting the activity wizard, extracting optional pre-fill paramete...
Configures the platform audio session to prevent speech recognition from conflicting with active phone calls, media playback, or other audio...
Provides the infrastructure layer for object storage of uploaded documents using an S3-compatible provider or Vercel Blob. Generates presign...
Infrastructure utility that determines whether a selected activity type qualifies as a home visit category, triggering injection of the Stru...
Manages the SQLite FTS5 virtual table that indexes contact names and note content for fast, offline-capable full-text search. Handles index ...
Defines and registers the REST API endpoints for caregiver operations in the Next.js backend. Implements `/api/v1/contacts/:contactId/caregi...
A scheduled backend job that runs daily to compare certification expiry dates against the current date and automatically creates pause log e...
Backend infrastructure component that proxies geocoding requests to an external geocoding API (e.g., Google Maps Geocoding or Nominatim) ser...
Abstraction layer wrapping the chosen Flutter mapping SDK (flutter_map with OpenStreetMap tiles as the privacy-respecting default, with opti...
Next.js REST API route (/api/v1/statistics/personal) that computes aggregated activity rollups per user using PostgreSQL window functions an...
Drift table definition for the local SQLite statistics cache on the mobile device. Stores serialized StatsSnapshot objects keyed by userId a...
Next.js API route middleware that enforces role-scoped access control for all team report endpoints, verifying the requesting user holds Coo...
Middleware that enforces role-based access control for all Bufdir report generation and export endpoints, restricting access to Coordinator ...
Handles the actual file rendering of Bufdir reports into XLSX and CSV formats using a library such as exceljs, applying the correct column m...
Next.js REST API endpoint at /api/v1/activities/duplicate-check that exposes the duplicate detection service to the Flutter mobile client. A...
Infrastructure adapter implementing the organization-specific integration hooks for forwarding approved expense records to external accounti...
Next.js REST API route handler at /api/v1/receipts that accepts multipart POST requests from the Flutter mobile client, validates the upload...
Manages the object storage layer for receipt image files using an S3-compatible storage backend. Handles secure file uploads from the Next.j...
Infrastructure component that writes structured audit log entries to audit_logs for every approval lifecycle event: submission, auto-approva...
Implements the asymmetric key exchange and symmetric encryption layer used for assignment payloads. Generates and stores per-user X25519 key...
Performance infrastructure that maintains a denormalized or materialized counter store to avoid expensive assignment table scans on every th...
Backend-side infrastructure responsible for dispatching push notifications via the FCM server SDK triggered by database events (new assignme...
Infrastructure layer that wires the Vercel Cron Job scheduler to the reminder evaluation and delivery pipeline. Runs at configurable interva...
Backend infrastructure that exposes a per-user iCal feed endpoint secured with a user-specific token. Serializes PostgreSQL activity and eve...
BLoC state management unit for the home dashboard that processes role resolution events and emits typed states for each role variant (PeerMe...
Wraps the url_launcher and webview_flutter Flutter packages to provide a unified, testable interface for opening URLs. Abstracts platform di...
Local SQLite caching layer for talking cards and toolbox content, enabling full offline access during home visits in low-connectivity enviro...
Adapter layer wrapping the transactional email provider (Resend or SendGrid) used for all outbound system emails. Provides a uniform interfa...
Generates and validates time-limited cryptographically signed tokens used in user invitation links. Tokens encode the invitee email, role, a...
Client-side caching layer for organization label maps on the Flutter mobile app. Stores the resolved label map in memory and optionally pers...
Infrastructure utility that validates organization feature toggle payloads against a versioned JSON schema before persistence. Prevents inva...
Next.js API route handlers for the admin dashboard endpoints (/api/v1/admin/dashboard). Handles request authentication, role authorization, ...
Next.js API route handlers under /api/v1/admin/activities that expose the oversight and approval endpoints consumed by the admin panel front...
Server-side infrastructure component responsible for transforming aggregated report data into Bufdir-compliant CSV or Excel files using a li...
Manages the async job lifecycle for report generation to handle large organizations where generation may take several seconds. Enqueues expo...
Infrastructure utility that generates time-limited signed URLs for accessing receipt images stored in object storage (Vercel Blob or S3-comp...
Database migration and seeding infrastructure that initializes the full known organizational hierarchy for all four client organizations (NH...
Application-level tenancy scoping layer that intercepts every incoming API request and attaches the resolved tenant context derived from JWT...
Backend middleware (Next.js API route middleware) that intercepts all write requests and validates that the association_id in the request bo...
Core adapter framework defining the IntegrationAdapter interface and adapter registry. All external system adapters implement this interface...
REST API route definitions for the courses and enrollment endpoints exposed under /api/v1/courses. Applies JWT authentication middleware and...
Infrastructure component that orchestrates periodic expiry evaluation for all certifications and coordinates the triggering of alert notific...
Next.js API route infrastructure responsible for generating short-lived referral tokens, constructing deep links that route back into the Fl...
Infrastructure layer that bundles and manages Rive or Lottie animation assets used in the Annual Summary Screen. Handles asset versioning, l...
Cron-based infrastructure component that schedules and triggers the annual aggregation job at the start of each calendar year. Runs on Verce...
Object storage integration for hosting SVG and PNG badge imagery. Provides URL generation for badge assets consumed by Flutter's cached netw...
Provides low-level utilities for generating image snapshots and PDF exports of the calculator result screen. Uses Flutter's rendering pipeli...
Next.js middleware that enforces JWT-based authentication on all protected /api/v1/... routes and HTTP-only cookie session verification on /...
Next.js route handler scaffolding and conventions that define how all /api/v1/... and /admin/... endpoints are organized, mounted, and execu...
URL-prefix versioning layer that namespaces all public API endpoints under /api/v1/... to enable non-breaking evolution of the API contract ...
Flutter-side Dio/HTTP interceptor chain that transparently handles token refresh, retry logic, and error normalization for every outgoing AP...
Single Dart constants file defining all visual design tokens for the application including colors, typography, spacing, border radii, shadow...
Infrastructure layer providing localized, organization-aware semantic label strings for all interactive elements and screen regions. Integra...
Monitors device network connectivity using the connectivity_plus Flutter package and exposes reactive streams of connectivity state changes....
Bootstraps and manages the on-device SQLite database using the drift (formerly moor) package for Flutter. Defines the full local schema mirr...
Wraps flutter_secure_storage to provide hardware-backed secure storage delegating to iOS Keychain and Android Keystore. Ensures JWT access a...
Manages a pool of PostgreSQL connections for the Next.js backend using node-postgres (pg). Configures pool size, idle timeout, and connectio...
Configures and manages automated daily backups of the PostgreSQL database at the managed provider level (e.g., Supabase, Neon, or Railway). ...
Manages versioned SQL schema migrations for the PostgreSQL database. Applies migration scripts in sequence, tracks applied migrations in a d...
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.
Data Layer components manage data persistence, storage operations, and data access patterns throughout the application.