Send Encrypted Assignment with Sensitive Personal Data to Peer Mentor
The coordinator opens the Task Assignment Screen and fills in the sensitive fields: recipient contact name, home address, and medical summary. After selecting the target peer mentor from the available list, they confirm dispatch. The Task Encryption Service retrieves the peer mentor's public key, encrypts the payload before it ever reaches the server, and stores only ciphertext in Supabase. The coordinator sees a success confirmation with the assignment ID. The server never holds plaintext. All cryptographic operations run in a Flutter Isolate to avoid blocking the UI.
User Story
Acceptance Criteria
- Given a coordinator has opened the Task Assignment Screen, when they fill in contact name, address, and medical summary and select a peer mentor, then the form validates all required fields before enabling dispatch
- Given the coordinator taps Dispatch, when the Task Encryption Service encrypts the payload using the peer mentor's public key, then the ciphertext is stored in Supabase and no plaintext sensitive data is persisted server-side
- Given encryption completes successfully, when the assignment is saved, then the coordinator sees a confirmation screen with the assignment ID and expected delivery status
- Given the selected peer mentor has no registered public key, when the coordinator attempts dispatch, then an informative error is shown and dispatch is blocked until the key issue is resolved
- Given the device is offline, when the coordinator attempts dispatch, then a queued-for-send state is shown and the assignment is dispatched when connectivity is restored
Business Value
Sending sensitive personal data (name, address, medical summaries) to peer mentors via phone calls or unencrypted messaging creates GDPR compliance risk and information quality issues. This story delivers a cryptographically secure dispatch channel that satisfies legal obligations for data protection, gives coordinators confidence that sensitive information is handled correctly, and replaces an unsustainable manual process for Blindeforbundet's home visit workflow.
Components
- Task Assignment Screen ui
- Task Encryption Service service
- Key Management Service service
- Task Assignment Repository data
- Encryption Infrastructure infrastructure