Platform + Ops

Dual-write adapter plan

Checklist for moving from local-only writes to Convex and Supabase without breaking the store.

  • Track readiness per layer (local, Convex, Supabase)
  • Coordinate flag flips and feature gates with Ops
  • Keep Phase 0 preview data consistent during migration

Adapter interface

Local

Define persistence interface (get/list/create/update) used by store hooks.

Status: done

  • Existing store.ts will call adapter methods

Feature flag switch

Local

Config toggle chooses LocalAdapter vs BackendAdapter at runtime.

Status: in-progress

  • Keep seed default for now

Write-through mutations

Convex

Create mutations for signals/resources/sessions/discussions mirroring current store writes.

Status: not-started

  • Use same types as Supabase for easy parity

Dual-write queue

Convex

After local write succeeds, enqueue job to Convex with retry/backoff.

Status: not-started

  • Queue can live in IndexedDB/localStorage until confirmed

Authoritative copy

Supabase

Mirror Convex writes into Supabase (or vice versa) once API stable.

Status: not-started

  • Supabase triggers or background job

Backfill & reconciliation

Supabase

Script to compare local/Convex/Supabase and resolve conflicts.

Status: not-started

  • Use owner_id + updated_at for merge