Frontend Architecture

DynamoDB → Postgres → RxDB

Phase 1 — Schema Mapping

  • Document current DynamoDB items.
  • Identify relational structures.
  • Design PostgreSQL schema accordingly.
  • Identify all metadata fields to migrate.
  • Keep binary content in DynamoDB/S3.

Deliverable: GraphQL API running against Postgres.

Phase 2 — Build Postgres & GraphQL Layer

  • Deploy Postgres instance
  • Build migrations
  • Build GraphQL resolvers
  • Add delta sync routes
  • Add conflict resolution logic

Deliverable: GraphQL API running against Postgres.

Phase 3 — Data Migration from DynamoDB to Postgres

  • Export DynamoDB tables
  • Transform into relational shape
  • Import into Postgres
  • Verify referential integrity

Deliverable: Clean dataset in Postgres

Phase 4 — Implement RxDB in Capacitor App

  • Create RxDB schemas
  • Create sync handler
  • Create outbox mechanism
  • Implement background sync
  • Implement conflict feedback messages

Deliverable: Client app with full offline DB + sync.

Phase 5 — Dual Run (Staged Rollout)

  • Run old system and new system in parallel
  • New system reads from Postgres only
  • Gradually port features

Deliverable: Beta release for testing.

Phase 6 — utover & Decommission

  • Migrate all users to Capacitor app
  • Turn off DataStore
  • Remove DynamoDB relational tables

Deliverable: Final migrated system.