rl-docs-hub

Home · Apps · rl-main-infra · todo_api · todo_mobile


DB Schema (Local-first)

todo_mobile persists primary state in Hive, then syncs to backend.

Hive Boxes

Box Type Purpose
lists Box<Map> Local cache of TodoList entities
todos Box<Map> Local cache of TodoItem entities
auth Box<String> Reserved app auth storage box
syncQueue Box<Map> Pending outbound sync jobs (SyncJob)

Entity Shapes

TodoList

TodoItem

SyncJob

Local Data Model

erDiagram
    TODO_LIST ||--o{ TODO_ITEM : contains
    TODO_ITEM ||--o{ SYNC_JOB : enqueued_as_payload

    TODO_LIST {
      string id PK
      string name
      string description
      datetime updatedAt
      bool deleted
      int version
    }

    TODO_ITEM {
      string id PK
      string listId FK
      string title
      string description
      datetime dueDate
      string[] labels
      datetime reminderAt
      bool completed
      datetime updatedAt
      bool deleted
      int version
    }

    SYNC_JOB {
      string id PK
      string entityType
      json payload
      datetime updatedAt
      int retries
    }

Notes