Service Layer high complexity mobile
0
Dependencies
0
Dependents
4
Entities
0
Integrations

Description

Core service responsible for end-to-end encryption of assignment payloads using libsodium (via the Flutter cryptography package). Encrypts plaintext with the recipient's public key so that Supabase stores only ciphertext. Handles the full dispatch lifecycle including payload construction, encryption, submission, and decryption on the receiving device.

Feature: Encrypted Assignment Dispatch

encrypted-message-service

Responsibilities

  • Encrypt assignment payload with recipient public key
  • Submit ciphertext to Supabase assignments table
  • Decrypt received assignments using device private key
  • Manage key retrieval for encrypt/decrypt operations

Interfaces

encryptPayload(plaintext, recipientPublicKey)
decryptPayload(ciphertext, senderPublicKey)
dispatchAssignment(assignmentDto)
retrieveAssignment(assignmentId)
listAssignmentsForRecipient(userId)
listAssignmentsForCoordinator(coordinatorId)
updateAssignmentStatus(assignmentId, status)
rotateKeys(userId)