-
Notifications
You must be signed in to change notification settings - Fork 9
26 Data Portability and Sync
Vicky Patel edited this page Sep 14, 2026
·
1 revision
Engineering specifications for multi-device sync replication, offline queues, and account data portability.
PACT OS supports offline-first operations via delta synchronization (20260916000000_multi_device_sync_and_replication.sql):
graph LR
ClientOffline[Local Offline Queue IndexedDB] -->|Network Restored| SyncEndpoint[/api/sync/delta]
SyncEndpoint -->|Verify Version & Hash| DeltaLog[(PostgreSQL sync_deltas)]
DeltaLog -->|Apply Mutations| UserTables[(User Tables: tasks, habits, finance)]
-
Offline Action Queue: Mutations executed while offline are stored in a local browser IndexedDB queue (
src/lib/offline/queue.ts). -
Delta Log (
sync_deltas): Database table tracking table name, record ID, mutation type (insert,update,delete), and sequence timestamp. -
Conflict Resolution: Last-Write-Wins (LWW) based on server-evaluated
updated_attimestamps.
Users can export 100% of their personal data at any time in accordance with open-source data portability standards:
-
Export Format: Downloadable ZIP archive (
pact-data-export.zip). -
Included Files:
-
tasks.csv/tasks.json -
goals.json,projects.json -
habits.csv,habit_logs.csv -
finance_transactions.csv,finance_categories.json focus_sessions.jsonweekly_reviews.json
-
-
Sanitization Guarantee: Secrets, password hashes, OAuth tokens, and session credentials are strictly stripped before packaging (
src/lib/export/sanitizer.ts).
| 🏛️ Project Hub | 🛠️ Developer Docs | 💬 Community & Support |
|---|---|---|
| GitHub Repository | System Architecture | GitHub Discussions |
| Beginner Issue Catalog | Design System | Open Issues |
| Production Deployment | API Reference | Pull Requests |
| Project Roadmap | Testing & QA Matrix | Maintainer Governance |
- Codebase Tour
- Domain Model
- Database Architecture
- Security Model
- Financial System
- Consequence System
- External Integrations
- Discipline Intelligence
- Data Portability & Sync