Complete setup guide: See
/docs/integrations/ChatSync.md in the projectWhat Is Chat Sync?
Offline-First
Writes go to local database first (fast!)
Background Sync
Syncs to cloud in background
Cross-Device
Access from all devices
Optional
Enable only when needed
Quick Overview
1
Run Migration
Create Supabase tables:
2
Enable Feature Flag
In
FeatureFlags.swift:3
Uncomment Implementations
Uncomment in Storage package:
SupabaseConversationRepository.swiftSupabaseMessageRepository.swift
4
Wire Up in CompositionRoot
Enable hybrid repositories:
How It Works
- ✅ Instant writes (no network wait)
- ✅ Works offline
- ✅ Syncs when online
- ✅ Graceful degradation
Prerequisites
- Supabase project configured
- Supabase dependency added to Storage package
- User authenticated
What You Get
After setup:- ✅ Conversations sync across devices
- ✅ Messages sync across devices
- ✅ Offline-first behavior preserved
- ✅ Automatic conflict resolution
- ✅ Background sync (non-blocking)
Complete Guide
The 22KB comprehensive guide includes:- Database schema design
- Row Level Security policies
- Repository implementations
- Hybrid sync strategy
- Conflict resolution
- Testing procedures
- Troubleshooting
View Complete Setup Guide
Find complete 22KB chat sync guide with architecture diagrams in your project
Related Guides
Storage Module
Repository architecture
Profile Photos
Another optional sync feature
Supabase Setup
Required backend
Building Your App
Customize features
Need Help?
- 📖 Complete troubleshooting section in full guide
- 💬 Create an issue
- 🔍 Check Supabase Dashboard logs
