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

Description

Drift table adapter and repository for the assignments entity. Stores only ciphertext at rest, consistent with the E2E encryption guarantee. Provides CRUD operations scoped by tenant and user role, with offline-first support via SQLCipher-encrypted local DB.

Feature: Encrypted Assignment Dispatch

assignments

Sources & reasoning

Data layer required to persist encrypted assignments offline-first. Server stores only ciphertext; Drift local DB mirrors this with SQLCipher encryption at rest. The 10-day reminder server job queries this table, making the schema and repository a shared contract between mobile sync and backend scheduled tasks.

No source references — this artifact was included based on reasoning alone (see above).

Responsibilities

  • Persist encrypted assignment ciphertext locally in Drift/SQLCipher store
  • Expose paginated assignment list queries filtered by recipient user
  • Sync assignment records from backend REST API via background sync
  • Enforce tenant isolation - no cross-tenant assignment access

Interfaces

getAssignmentsForUser(userId) → Stream<List<Assignment>>
getAssignmentById(id) → Future<Assignment?>
upsertAssignment(assignment) → Future<void>
markDelivered(assignmentId) → Future<void>
markRead(assignmentId) → Future<void>

Relationships

Dependents (1)

Components that depend on this component