synq_manager 1.0.7
synq_manager: ^1.0.7 copied to clipboard
A powerful synchronization manager for Flutter apps with secure local storage, real-time state management, and background cloud sync capabilities.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.0.7 - 2025-09-24 #
Added #
- ๐ Cloud Sync Event Tracking: Added detailed event emissions for cloud sync operations
- โ๏ธ CloudSyncFunction Events:
cloudSyncStart,cloudSyncSuccess,cloudSyncErrorevents - ๐ก CloudFetchFunction Events:
cloudFetchStart,cloudFetchSuccess,cloudFetchErrorevents - ๐ Enhanced Metadata: Cloud sync/fetch events include detailed metadata (counts, error info, etc.)
- ๐ฏ Socket.io Style Cloud Events: New listener methods
onCloudSyncStart(),onCloudSyncSuccess(), etc. - ๐ก๏ธ Detailed Error Information: Cloud sync errors now include operation context and metadata
- ๐ Example Integration: Updated example app to demonstrate cloud sync event handling
Enhanced #
- โก Real-time Cloud Operation Tracking: Users can now monitor cloud sync progress in real-time
- ๐จ Better User Experience: Apps can show specific status for cloud operations ("Pushing to cloud...", etc.)
- ๐ Debugging Support: Enhanced error reporting for cloud sync troubleshooting
1.0.6 - 2025-09-24 #
Added #
- ๐ Socket.io Style Event Listeners: Added Socket.io-like event handling with intuitive API
- โจ Builder Pattern Support: Quick setup with fluent
onInit().onCreate().onUpdate().start()pattern - ๐ฏ Granular Event Handling: Separate callbacks for
onInit,onCreate,onUpdate,onDeleteevents - ๐ก Real-time Data Streaming:
onInitprovides all data, other events provide only changed data - ๐ Sync State Management: Built-in
onSyncStartandonSyncCompleteevent handlers - ๐ก๏ธ Error Handling: Dedicated
onErrorcallback for better error management - ๐ Connection State:
onConnectionChangefor network connectivity monitoring - ๐ Comprehensive Documentation: Added detailed usage guide for Socket.io style API
Enhanced #
- ๐ก Developer Experience: More intuitive API similar to Socket.io for web developers
- โก Performance: Optimized event handling with direct data access instead of full reloads
- ๐ง Flexibility: Support for both traditional stream-based and Socket.io style event handling
Examples #
- ๐ Updated Example App: Demonstrates Socket.io style usage with real-time note management
- ๐ Usage Guide: Created comprehensive guide for Socket.io style implementation
1.0.5 #
Added #
- ๐ง Generic Type Serialization: Added
fromJsonandtoJsonfunction parameters toSynqManager.getInstance() - ๐ฆ Custom Object Support: Improved support for complex custom data types with proper JSON serialization/deserialization
- ๐ ๏ธ Type-Safe Serialization: Enhanced type safety for generic types T through configurable serialization functions
Changed #
- โก Breaking Change:
SynqManager.getInstance()now accepts optionalfromJsonandtoJsonparameters for custom object serialization - ๐ Updated Documentation: Enhanced README and example documentation with serialization function usage examples
1.0.4 #
Enhanced #
- ๐ Initial Sync Improvement: First-time connection now automatically syncs all local data to cloud
- ๐ค Complete Data Upload: When
_lastSyncTimestamp == 0, all existing local data is included in the initial sync - ๐ Better Sync Logic: Improved sync behavior for first-time users and fresh installations
1.0.3 #
- new structure
1.0.2 #
Changed #
- ๐ฑ Platform Support: Limited to Android and iOS only due to WorkManager dependency requirements
- ๐งน Removed desktop and web platform files to reduce package size
- ๐ Updated documentation to reflect mobile-only support
Removed #
- ๐๏ธ Linux, macOS, Windows, and Web platform support
- ๐๏ธ Desktop-specific configuration files
1.0.1 #
Fixed #
- ๐ Updated documentation and examples
- ๐ Minor bug fixes and improvements
- โ Package validation improvements
1.0.0 #
Added #
- ๐ Initial release of SynQ Manager
- โก Offline-first synchronization layer for Flutter applications
- ๐ Real-time and configurable sync policies
- ๐ค Guest mode support with account upgrade capability
- ๐ Background synchronization using WorkManager
- ๐ Backend-agnostic architecture:
- CloudAdapter interface for any backend implementation
- No built-in backend dependencies - complete freedom of choice
- Examples for REST API, Supabase, Firebase, and more
- ๐พ Local storage support:
- Hive implementation with type adapters
- Generic LocalStore interface for other storage engines
- โ๏ธ Intelligent conflict resolution:
- Built-in strategies (local wins, remote wins, newer wins, prompt, merge)
- Custom conflict resolver interface
- Automatic conflict detection based on versions and timestamps
- ๐ฏ Type-safe APIs:
- Generic support for any data model
- Strongly typed interfaces throughout
- SyncCacheModel base class for easy integration
- ๐งช Comprehensive testing:
- Unit tests for all core components
- Mock implementations for testing
- Example app demonstrating all features
- ๐ Real-time monitoring:
- Sync status streams
- Conflict event streams
- Network connectivity tracking
- ๐ Production-ready features:
- Error handling and retry logic
- Detailed logging with configurable levels
- Background task scheduling
- Memory-efficient data streaming
Technical Features #
- Mobile platform support: iOS and Android (WorkManager requirement)
- Background sync: Reliable synchronization even when app is closed
- Network awareness: Automatic sync when connectivity is restored
- Data integrity: Version-based conflict detection and resolution
- Scalable architecture: Modular design for easy extension
- Performance optimized: Efficient change tracking and delta sync
Dependencies #
hive: Local storage with type adaptersisar_plus_flutter_libs: Additional storage supportworkmanager: Background task executionflutter_secure_storage: Secure credential storageconnectivity_plus: Network state monitoringsupabase_flutter: Optional Supabase integrationhttp: HTTP client for REST APIs
Documentation #
- Complete README with quick start guide
- API documentation with examples
- Platform-specific setup instructions
- Testing guidelines and examples
- Architecture overview and best practices
Example App #
- Note-taking app demonstrating all features
- Guest mode and account upgrade flow
- Real-time sync with conflict resolution
- Background sync demonstration
- Production-ready code patterns
[Unreleased] #
Planned Features #
- ๐ฑ Enhanced mobile platform support
- ๐ Incremental sync optimizations
- ๐ Analytics and metrics collection
- ๐ GraphQL adapter support
- ๐พ Isar storage adapter
- ๐ Additional cloud service adapters
- ๐จ UI components for common sync patterns