Document Attachments
Feature Detail
Description
Document Attachments enables peer mentors to attach files - photos, PDF invitations, and screenshots - to a registered activity record. Attachments are selected via the device's native file picker or camera and uploaded through the File Upload Service. Uploaded files are linked to the parent activity via the activity_attachments table and displayed as thumbnails in the activity detail view. The feature addresses NHF's specific need to include documentary evidence with activities for Bufdir audit purposes.
Sources & reasoning
Section 3.2 directly names document attachments as an NHF-specific need and ties it to Bufdir audit evidence. Fase 2 (ยง5) explicitly lists it. The priority matrix marks it as "NICE TO HAVE | 2", mapping to v1.0 by ordinal phase. The Bufdir audit linkage makes it commercially important despite the NICE priority label.
No source references โ this artifact was included based on reasoning alone (see above).
Analysis
NHF is the primary driver: their Bufdir compliance workflow requires documentary evidence attached to activity records, and the current process of emailing documents separately from Word-based reports cannot reliably associate evidence with specific activities. Without attachments, NHF's ability to defend grant claims in Bufdir audits is weakened. Beyond compliance, attachments enrich coordinator review - a coordinator can assess an activity's context by viewing the attached invitation or screenshot rather than requesting it separately, reducing coordinator follow-up workload and improving turnaround time for activity approval and Bufdir export preparation.
The Attachment Picker Widget wraps the file_picker and image_picker Flutter plugins to support gallery selection, file browser access, and camera capture in a single UI entry point. The File Upload Service performs a multipart POST to the backend attachment endpoint; the server returns a stored-file reference persisted in activity_attachments linked to the parent activity. Uploads are queued in the mutation outbox when offline and retried with exponential backoff on reconnect. Client-side validation enforces file size limits and permitted MIME types before upload; server-side validation provides a second enforcement layer. Image thumbnails are generated server-side and returned for display in the activity detail card, reducing bandwidth in list views.
Components (47)
Shared Components
These components are reused across multiple features
Service Layer (11)
Data Layer (23)
Infrastructure (7)
User Stories
No user stories have been generated for this feature yet.