A SwiftUI-based iOS app that displays photos from JSONPlaceholder API with smart caching and compression.
- 📱 Browse 5,000 photos in a smooth, scrollable list
- 🔍 View photo details with editable titles
- 💾 Intelligent LRU cache with Brotli compression
- 🚀 Async/await networking with proper error handling
- ⚡ Memory pressure monitoring and auto-cleanup
- ✅ Unit tested cache implementation
- UI: SwiftUI with NavigationStack
- Architecture: MVVM pattern
- Networking: URLSession with async/await
- Caching: Custom LRU cache with linked list
- Compression: Brotli algorithm for optimal storage
- Concurrency: Swift Concurrency (
@Sendable,@MainActor)
- Xcode: 15.0+
- iOS: 15.0+
- Clone the repository
- Open
PhotoViewer.xcodeprojin Xcode - Select a simulator or device
- Run the project (
Cmd + R)
- Protocol-driven design for testability and flexibility
- Automatic memory management with cache eviction on memory pressure
- Image compression reduces memory footprint by ~60-80%
- Dependency injection for easy testing and mocking