A comprehensive collection of production-grade mobile system design patterns for building scalable, offline-first, and resilient mobile applications. This repository serves as a technical reference for architecting complex mobile features with best practices for state management, caching, and real-time synchronization.
This repository addresses the architectural challenges that mobile engineers face when building production applications. Each pattern focuses on:
- Offline-first architecture with intelligent sync strategies
- State management patterns using modern libraries (React Query, Redux, Zustand)
- Real-time communication via WebSockets, Pusher, and Server-Sent Events
- Performance optimization through caching, prefetching, and lazy loading
- Data consistency with conflict resolution and optimistic updates
- Secure token management with iOS Keychain / Android Keystore
- Silent JWT rotation with refresh token flow
- Biometric authentication (FaceID/TouchID)
- Session persistence and multi-device support
- Offline-first chat with message queuing
- React Query infinite pagination for message history
- File uploads with presigned URLs and progress tracking
- Pusher-based real-time message delivery
- Read receipts and delivery status
- Personalized feed with ranking algorithms
- Infinite scroll with viewport-aware loading
- Optimistic UI for likes, comments, and reactions
- Delta updates and pull-to-refresh
- CDN-backed media delivery with progressive loading
- Persistent cart across sessions and devices
- Offline cart management with conflict resolution
- Product catalog with infinite scroll
- Inventory validation before checkout
- Optimistic UI for cart operations
- Multi-channel delivery (SMS, Email, Push, Voice, Slack)
- Priority-based routing with escalation rules
- Acknowledgment tracking and analytics
- Geographic targeting and role-based distribution
- Offline queuing for both senders and receivers
- Real-time search with debouncing and caching
- Recent searches and trending queries
- Hybrid search (local + remote results)
- Search analytics and personalization
- 📅 Appointment Scheduling
- 💊 Medication Dosing
- 🔄 Prescription Refills
- ⏰ Medication Reminders
- 🚚 Courier Tracking
- 📖 Reading & Note-Taking
- ✅ Audit & Compliance
- 📊 Product Catalog
- ⭐ Favorites & Bookmarks
- 🎯 Recommendations Engine
- 🗓️ Calendar Integration
- 📦 Order Management
- 🔒 Secure Vault/Storage
- 📸 Barcode Scanner
- 🆔 ID Verification
- 🚨 War Room/Incident Management
- 📓 Notes & Documentation
- 📋 Playbooks
All patterns prioritize offline functionality with:
- Local persistence using AsyncStorage, MMKV, or SQLite
- Optimistic UI updates with automatic rollback on failure
- Background sync queues for replaying failed operations
- Conflict resolution strategies for concurrent modifications
- React Query / TanStack Query for server state management
- Stale-while-revalidate pattern for instant UX
- Prefetching & pagination for seamless infinite scroll
- CDN-backed media with progressive loading
- Request deduplication and batching
- WebSocket connections for bi-directional communication
- Pusher/PubSub for event-driven updates
- Delta sync to minimize bandwidth usage
- Reconnection handling with exponential backoff
- Presence indicators and typing states
- Redux for complex global state and offline queues
- Zustand for lightweight atomic state
- React Query for server state and caching
- Local-first state with server reconciliation
Each pattern leverages modern mobile development tools:
| Layer | Technologies |
|---|---|
| Framework | React Native, Expo |
| State Management | Redux, Zustand, React Query/TanStack Query |
| Data Persistence | AsyncStorage, MMKV, WatermelonDB, SQLite |
| Real-Time | WebSockets, Pusher, Server-Sent Events |
| Networking | Axios, Fetch API, REST, GraphQL |
| Security | iOS Keychain, Android Keystore, Biometric Auth |
| Media | CDN, Progressive Loading, Image Caching |
Every feature assumes network unreliability and maintains full functionality offline.
Immediate feedback to users with automatic rollback on server conflicts.
Minimize battery drain, network usage, and memory footprint through intelligent caching and batching.
Patterns designed to handle growth from MVP to millions of users.
Sensitive data encrypted at rest and in transit; compliance with GDPR, HIPAA, and TCPA where applicable.
Graceful degradation with user-friendly error states and automatic retry logic.
- Browse by Feature: Each
.mdfile contains a complete system design for a specific mobile feature - Study the Patterns: Each design includes:
- Functional and non-functional requirements
- Caching and offline sync strategies
- Data models (TypeScript interfaces)
- API endpoint designs
- Client-side implementation patterns
- State management approaches
- Adapt to Your Stack: While examples use React Native, patterns are framework-agnostic
- Reference in Interviews: Use as preparation for mobile system design interviews
Each system design document follows a consistent format:
- Requirements - Functional and non-functional specifications
- Caching, Offline & Sync Strategy - How to handle connectivity challenges
- Data Models - TypeScript interfaces for type-safe development
- API Endpoints - RESTful API design
- Client Implementation - State management and UI patterns
- Edge Cases - Common pitfalls and solutions
This repository is provided as-is for educational and reference purposes.
Built for mobile engineers who care about scalability, performance, and user experience. 🚀