Data Layer medium complexity backend
0
Dependencies
0
Dependents
1
Entities
0
Integrations

Description

Data-access component that owns CRUD operations for activity records. Provides query patterns optimized for recent-activity retrieval and reporting aggregation. Encapsulates schema details behind a typed interface used by the Activity Service.

Feature: Simple Activity Logging

activity-store

Sources & reasoning

Matrix row 92 ties Enkel aktivitetsregistrering to Fase 1 = MVP across all five orgs. The "under two klikk" target and HLF's 380-registration anecdote justify a separate low-friction entry point distinct from the wizard.

  • Enkel aktivitetsregistrering (#1-prioritet hos alle) ... Mål: registrering på under to klikk ... En likeperson hadde 380 enkeltregistreringer på ett år. Standardverdier (dagens dato, 30 min) som kan overstyres.
  • Enkel aktivitetsregistrering | ✓ | ✓ | ✓ | ✓ | ✓ | MUST HAVE | 1

Responsibilities

  • Insert activity records with generated identifiers and timestamps
  • Retrieve recent activities and last-used contact context per user
  • Support reporting-oriented queries for Bufdir downstream pipeline
  • Maintain referential integrity with user and contact entities
  • Expose typed query interfaces to service layer

Interfaces

insert(activity: Activity): ActivityId
findRecentByUser(userId: string, limit: number): Activity[]
findLastContact(userId: string): Contact | null

Related Data Entities (1)

Data entities managed by this component