You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FlavorScript is a simple SwiftUI app to display list of recipes from json.
Prerequisites
XCode 16.2+
iOS version: 16+
Screenshots
Some Content State
Empty State
Error
Cuisine Filters
Detail Page
Settings Page
App Icon
Splash Screen
Video
Focus Areas:
MVVM architecture - Clear separation of logic and UI.
Caching - fetch from the disk instead calling network
Functional changes - Implemented a modular design with reusable components for scalability.
Unit Testing – Ensured code reliability through test coverage.
Time spent on this project
Spent approx 4-5 hours
Architecture and design ~ 1 hr
Caching & networking ~ 1 - 1.5 hr
UI ~ 1hr
Unit testing ~1hr
Documentation ~0.5hr
Trade-offs and Decisions:
Used only disk caching and no in-memory caching to keep it minimal
Used three JSON files to toggle between success, malformed, and empty states depending on the user settings.
Although originally designed as a single-page app, added tab navigation for better organization.
Included a Settings page to manage developer options, such as switching response types and clearing image caches.
What could be improved?
Unreliable cache directory: I used cache directory which can be cleared by the system during low storage which makes it unreliable for long-term storage. Also could have used in-memory cache NSCache for fast access.
No cache invalidation: There is no cache invalidation logic if images gets updated, the cached version would continue to use the outdated data unless cleared cached from Settings. It would be