A SwiftUI-based recipe app that displays recipes from the Fetch API.
- Display list of recipes with images and cuisine types
- Pull-to-refresh functionality
- Detailed recipe view with large images
- Links to original recipe and YouTube videos
- Custom image caching implementation
- Error handling for malformed data and empty states
- Unit tests for network layer
- MVVM architecture pattern
- SwiftUI for UI implementation
- Async/await for asynchronous operations
- Custom image caching system
- No third-party dependencies
-
Models
Recipe: Codable model for recipe dataRecipeResponse: Container for API response
-
Networking
NetworkManager: Handles API requestsImageCache: Custom image caching implementation
-
ViewModels
RecipeViewModel: Manages recipe data and state
-
Views
RecipeListView: Main list viewRecipeDetailView: Detailed recipe viewRecipeRowView: List item viewErrorView: Error state viewEmptyStateView: Empty state view
- iOS 16.0+
- Xcode 14.0+
- Swift 5.7+
The project includes unit tests for the network layer, covering:
- Successful recipe fetching
- Error handling for malformed data
- Image caching functionality
-
Performance
- Efficient image loading and caching
- Minimal memory usage
- Smooth scrolling experience
-
User Experience
- Clean and intuitive interface
- Responsive UI
- Clear error states
- Pull-to-refresh functionality
-
Code Quality
- Clean architecture
- Type safety
- Error handling
- Unit tests
The app follows all the requirements specified in the project guidelines:
- Uses Swift Concurrency (async/await)
- No external dependencies
- Custom image caching implementation
- SwiftUI for UI
- iOS 16+ support
- Comprehensive error handling