SKILL.md (Primary Document)
- 2,709 lines | 73 KB
- 9 complete sections with 40+ code examples
- Production-ready implementations
- Enterprise security patterns
SKILL_SUMMARY.md (Quick Reference)
- 240 lines | 9.3 KB
- Section-by-section breakdown with line numbers
- Technology comparison matrix
- Quick technology selector
DELIVERY_MANIFEST.md (Navigation Guide)
- Complete delivery checklist
- Implementation roadmap
- Content statistics and quality metrics
- Deployment readiness assessment
- 1.1 SharedPreferences (13-67) - Platform-native key-value store
- 1.2 Hive (68-186) - Blazing-fast NoSQL database
- 1.3 SQLite (187-372) - ACID-compliant relational DB
- 1.4 ObjectBox (373-581) - High-performance NoSQL with AI/ML
- 2.1 Firebase Firestore (584-831) - Real-time document sync
- 2.2 Firebase Realtime DB (832-987) - Sub-second latency streaming
- 3.1 Versioning Strategy (990-1064) - Migration framework
- 3.2 Denormalization Patterns (1065-1121) - Performance optimization
- 4.1 Advanced Create (1124-1192) - Upsert & batch patterns
- 4.2 Sophisticated Update (1193-1306) - Patch, atomic, optimistic
- 4.3 Advanced Delete (1307-1376) - Soft, hard, cascading
- 5.1 Index Strategy (1379-1439) - Composite, expression, covering
- 5.2 Query Patterns & Performance (1440-1553) - Pagination, aggregation
- 5.3 Query Analysis & Monitoring (1554-1640) - Metrics & profiling
- 6.1 End-to-End Encryption (1643-1763) - AES-256, RSA, key derivation
- 6.2 Secure Storage (1764-1834) - Biometric, platform-specific
- 6.3 Data Sanitization (1835-1886) - Memory scrubbing, audit logging
- 7.1 Offline Queue Management (1889-2039) - Priority, retry, events
- 7.2 Conflict Resolution (2040-2144) - LWW, three-way merge
- 8.1 Pull-Based Sync (2147-2238) - Full, incremental, selective
- 8.2 Push-Based Sync (2239-2329) - Real-time listeners
- 8.3 Hybrid Sync (2330-2392) - Periodic + connectivity
- 9.1 Background Task Scheduling (2395-2475) - WorkManager integration
- 9.2 Advanced Background Operations (2476-2562) - Uploads, notifications, cache
- 9.3 Smart Sync Decision Engine (2563-2654) - ML-based decisions
- Best Practices Summary (2655-2687) - 5 core categories
- Conclusion (2688-2700) - Key takeaways
- Further Resources (2701-2709) - External links
| Technology | Lines | Complexity | Performance |
|---|---|---|---|
| SharedPreferences | 13-67 | β | β‘β‘β‘ |
| Hive | 68-186 | ββ | β‘β‘β‘ |
| SQLite | 187-372 | βββ | β‘β‘ |
| ObjectBox | 373-581 | βββ | β‘β‘β‘ |
| Solution | Lines | Use Case | Speed |
|---|---|---|---|
| Firestore | 584-831 | Real-time, serverless | β‘β‘ |
| Realtime DB | 832-987 | Gaming, presence | β‘β‘β‘ |
| Topic | Lines | Coverage |
|---|---|---|
| Schema Evolution | 988-1121 | Versioning + denormalization |
| CRUD Operations | 1122-1376 | Create, update, delete patterns |
| Query Performance | 1377-1640 | Indexing + monitoring |
| Security | 1641-1886 | Encryption + authentication |
| Offline-First | 1887-2144 | Queueing + conflict resolution |
| Synchronization | 2145-2392 | Pull, push, hybrid |
| Background Sync | 2393-2654 | Scheduling + smart decisions |
- SharedPreferences singleton pattern (13-45)
- Hive encryption setup (82-108)
- SQLite connection with Drift (238-283)
- ObjectBox store initialization (432-475)
- Firebase Firestore setup (607-640)
- Hive upsert with batching (112-126)
- SQLite transaction safety (308-331)
- Firestore batch operations (662-678)
- Realtime DB transactions (946-965)
- Hive full-text search (143-149)
- SQLite complex JOINs (265-285)
- ObjectBox semantic search (533-553)
- Firestore pagination (689-716)
- Offline queue management (1903-1985)
- Three-way merge algorithm (2050-2130)
- Pull-based sync (2169-2207)
- Push-based sync (2260-2310)
- AES-256 encryption (1681-1710)
- RSA key exchange (1721-1745)
- Biometric authentication (1800-1825)
- Audit logging (1862-1885)
Start Here
ββ Need simple settings/tokens?
β ββ SharedPreferences (13-67)
β
ββ Building offline-first app?
β ββ With relational data?
β β ββ SQLite + Drift (187-372)
β β
β ββ NoSQL document model?
β ββ Hive (68-186)
β ββ ObjectBox (373-581)
β
ββ Need real-time sync?
β ββ Sub-second latency?
β β ββ Firebase Realtime DB (832-987)
β β
β ββ Document model with rules?
β ββ Firebase Firestore (584-831)
β
ββ Complex architectural decision?
ββ See comparison matrix in SKILL_SUMMARY.md
- Hive for product cache (80-140)
- SQLite for orders (200-350)
- Firestore for sync (600-700)
- ObjectBox for search (380-450)
- AES-256 for payment data (1680-1720)
- Firebase Realtime DB for sync (850-950)
- Offline queue for pending changes (1900-1950)
- Three-way merge for conflicts (2050-2130)
- Biometric for sensitive actions (1800-1825)
- Firebase Realtime DB for players (880-920)
- Presence detection (930-950)
- Transaction support (946-965)
- Exponential backoff retry (1995-2010)
- Firebase Realtime DB for messages (1000-1020)
- Offline queue for drafts (1910-1930)
- LWW conflict resolution (2042-2055)
- Background sync (2410-2470)
- Read: Section 1 (Local Storage) - Lines 11-580
- Time: 1-2 hours
- Focus: Choose your local storage
- Read: Section 2 (Cloud Databases) - Lines 582-987
- Time: 1-2 hours
- Focus: Firestore vs Realtime DB decision
- Read: Sections 4 & 5 (CRUD & Queries) - Lines 1122-1640
- Time: 2 hours
- Focus: Implement basic operations
- Read: Sections 6 & 7 (Security & Offline) - Lines 1641-2144
- Time: 2 hours
- Focus: Offline-first patterns
- Read: Sections 8 & 9 (Sync & Background) - Lines 2145-2654
- Time: 2 hours
- Focus: Background sync strategy
- Last-Write-Wins (LWW) - Simple timestamp comparison
- Three-Way Merge - Sophisticated base/local/remote resolution
- Custom Strategies - Field-level custom resolution
- Composite Indexes - Multiple column indexing
- Expression Indexes - Case-insensitive search
- Covering Indexes - Index-only scans
- Partial Indexes - Filtered row indexes
- Network type detection
- Battery level monitoring
- Data volume calculation
- ML-based decision making
- Dynamic batch sizing
- SharedPreferences: Sub-millisecond reads
- Hive: Microsecond-level operations
- SQLite: B-tree indexed queries
- ObjectBox: 100K+ ops/second
- Firestore: Read consistency in milliseconds
- Realtime DB: Sub-second latency
- β AES-256 encryption
- β RSA asymmetric encryption
- β Argon2 key derivation
- β HKDF key expansion
- β Biometric authentication
- β Secure platform storage
- β Audit logging
- β Memory sanitization
- β Multi-tenant architecture
- β Row-level security
- β Data lifecycle policies
- β Compliance audit trails
- β Encryption at rest & in transit
- β Background sync optimization
- β Battery-aware scheduling
- β Network-aware retry
Performance Optimization β See Section 5 (Lines 1377-1640)
Security Hardening β See Section 6 (Lines 1641-1886)
Offline Development β See Section 7 (Lines 1887-2144)
Sync Architecture β See Section 8 (Lines 2145-2392)
Production Deployment β See Section 9 (Lines 2393-2654)
- SKILL.md - Complete analysis (2,709 lines)
- SKILL_SUMMARY.md - Quick reference guide
- DELIVERY_MANIFEST.md - Delivery checklist
- INDEX.md - This navigation guide
Last Updated: November 18, 2025 Status: Complete & Production-Ready Target Audience: Flutter Developers (All Levels)
Use this index to jump to any section that interests you!