medium complexity medium priority could have v1.1 extracted Activity Registration Confidence: 100%
5
Components
58
Shared
0
User Stories
Yes
Analyzed

Description

Allows peer mentors and coordinators to attach files — event invitations, photographs, screenshots, or PDF documents — to activity records as supporting evidence. Attachments serve as compliance verification material for Bufdir audits and provide additional context for coordinator review. Supported file types include images and PDFs, with client-side size validation enforced before upload. Attached documents are permanently linked to the activity record and accessible to authorized users in the admin panel.

User Flow

Document Attachment to Activities user flow
Click to expand

Analysis

Business Value

NHF specifically identified document attachments as important for Bufdir compliance verification — inspectors may request evidence that reported activities occurred, including event invitations, Facebook screenshots, or sign-in sheets. Currently, coordinators maintain separate paper archives, creating administrative overhead and risk of lost documentation during audits. Digitizing attachments eliminates this parallel paper trail, permanently links evidence to the activity it supports, and dramatically reduces response time during compliance inquiries. For NHF, which manages 1,400 local associations, the audit risk mitigation value of digitized, linked evidence is substantial given the volume of publicly funded activities being reported.

Implementation Notes

FileAttachmentWidget wraps image_picker and file_picker Flutter plugins with in-app preview and deletion before submission. DocumentUploadService calls the backend upload endpoint, which returns a signed storage URL; the actual file is then PUT directly to object storage (S3-compatible or Vercel Blob) from the client to avoid routing large payloads through the API server. AttachmentRepository persists metadata (filename, MIME type, size, storage key, upload timestamp) with a foreign key to the activity record. Client-side validation enforces supported MIME types and a configurable maximum file size before upload begins. WCAG 2.2 AA compliance requires that file picker buttons have descriptive accessible labels, image previews include alt text, and error messages for invalid files are announced via Semantics.

Dependencies

simple-activity-logging

Definition of Done

Images and PDFs can be attached to any activity during or after creation
Files are uploaded to object storage and metadata persisted to the database
Attachments are viewable on activity detail screens in both mobile app and admin panel
Client-side validation rejects unsupported file types and oversized files with accessible error messages
File picker and preview are fully operable via screen reader
Attachments are included in Bufdir export data references

Components (63)

User Interface (1)

Service Layer (2)

Data Layer (1)

Infrastructure (1)

Shared Components

These components are reused across multiple features

Infrastructure (20)

User Stories

No user stories have been generated for this feature yet.