Building Plat: My Journey of Creating a Meal Planning App

Arpit Agarwal
7 min readJun 19, 2024

--

The Inspiration: A Daily Struggle with Meal Planning

Every day, I faced the same dilemma: what to cook and eat for breakfast, lunch, and dinner. Meal planning was a constant hassle. Sometimes the fridge was empty, leading to multiple runs to the grocery store. Other times, I was busy with meetings and had no idea what to cook. This persistent issue inspired me to create Plat, an app designed to simplify meal planning and make daily life a bit easier.

The Beginning: From Idea to Initial Concept

The idea for Plat came from my daily struggle with meal planning. Initially, I tried using a whiteboard to plan meals, but it lacked the convenience and flexibility of a digital solution. So, I decided to build an app. I started by creating a basic version using Airtable, setting up tables for meal plans, ingredients, recipes, and grocery shops. This structured approach helped me model the entire project effectively.

Dishes on Airtable setup for initial concept
Ingredients on Airtable setup for initial concept

From Paper to Prototype: Designing the User Interface

  1. Paper Prototyping: Designing the UI on paper to visualize the app’s flow and interactions.
  2. User Testing: Sharing the paper prototypes with friends and family to gather feedback and iterate on the design.
  3. Digital Mock-ups: Creating digital mock-ups and integrating mock data to make the app more realistic during testing.
Paper prototypes of the Plat UI

Technical Architecture: Building the Backbone of Plat

For the iOS app architecture of Plat, I used the MVVM (Model-View-ViewModel) pattern to ensure a clean separation of concerns and facilitate unit testing. Here’s how the architecture was structured:

  • Model: Data structures like MealSlot, Recipe, and UserPreferences.
  • View: UI components such as MealPlanView, GroceryListView, and RecipeDetailView.
  • ViewModel: Manages presentation logic, transforms model data for the view, and handles user actions.

Additionally, I incorporated several design patterns to enhance the app’s robustness and maintainability:

  • Singleton: Used for managing network requests and current user management, ensuring a single instance throughout the app.
  • Factory: Employed for creating meal slots for different actions (cook, dine out, order in) simplifying the creation process and promoting reusability.
  • Observer: Utilized `NotificationCenter` to broadcast updates within the app, facilitating communication between different components without tight coupling.
  • Dependency Injection: Provided ViewModels with their required services, enhancing testability and reducing dependencies.
  • Coordinator: Managed the navigation flow, ensuring smooth transitions between different parts of the app, and decoupling the navigation logic from view controllers.
  • Repository: Abstracted and centralized data fetching logic, whether from a local database or an external API, promoting a single source of truth and easier data management.
Diagram of the MVVM Architecture (credits — Kodeco)

Technology Stack: The Tools That Powered Plat

I chose a variety of technologies and frameworks to build Plat, ensuring that the app was both functional and scalable:

  • Firebase: Utilized for user authentication and analytics. Firebase provides a robust and easy-to-implement solution for managing user logins and tracking app usage, which is essential for understanding user behavior and improving the app.
  • AWS Amplify: Primarily used the Datastore part of AWS Amplify for both local storage and backend storage on DynamoDB. This choice was driven by the need for a scalable and reliable backend solution, with GraphQL enabling efficient data querying and real-time updates.
  • Signal: Implemented for app updates, ensuring users receive the latest features and improvements.
  • Spoonacular API: Integrated this API to fetch structured recipe information from recipe blogs, leveraging recipe conversions from its extensive database to provide users with shoppable recipes.
  • Integration with Shopping Platforms: Connected with Blinkit, BigBasket, and Swiggy Instamart web apps to offer a seamless shopping experience. This web integration allowed users to order ingredients and groceries, enhancing the app’s utility and convenience.
Connected with BigBasket, Blinkit, and Swiggy Instamart web apps

Performance and Scalability: Ensuring a Smooth User Experience

To ensure that the Plat app was performant and scalable, I implemented several strategies and optimizations:

  • Avoid Blocking the Main Thread: The main thread needs to be dedicated to UI updates and rendering. All calculations and processing tasks were offloaded to background threads using dispatch queues. This approach ensured that all table views, collection views, and scroll views remained smooth and responsive.
  • Background Image Fetching: Used Kingfisher for fetching images on background threads, ensuring that image loading did not impact the main thread’s performance. I also implemented a nice fading animation for image updates to enhance the user experience.
  • Smooth Animations: Applied animations to all small interactions and transitions to make the UI feel smooth and responsive. This included subtle animations for button presses, view transitions, and other UI interactions.
  • Optimized Backend Data Structures: Designed backend data structures to be scalable and easily accessible for potential future machine learning model training. This ensured that the app could handle increased loads and data processing requirements as it grew.
  • Efficient Data Management: Utilized AWS Amplify’s Datastore to efficiently manage data synchronization between local and backend storage, providing a seamless user experience even with fluctuating network conditions.

Testing Strategy: Keeping Plat Reliable and Bug-Free

To ensure the Plat app was reliable and bug-free, I employed a comprehensive testing strategy that included both automated and manual testing:

Automated Testing:

  • Unit Tests: I wrote test cases for the ViewModels, aiming for 100% code coverage. These tests were designed to ensure that all parts of the ViewModel logic functioned correctly.
  • UI Tests: I wrote UI tests using XCUITest to verify the user interface interactions and workflows.
  • Continuous Integration: Using Xcode Cloud, both XCTest (unit tests) and XCUITest (UI tests) were run automatically after each build, ensuring that any new changes did not introduce regressions or bugs.

Manual Testing:

  • TestFlight: I had a small team of closely related family and friends who manually tested the app on TestFlight. They provided feedback and reported issues using screenshots.
  • Bug Tracking: Feedback and bug reports were organized on Asana, where I tracked and prioritized issues for small releases.

Release Process

Once the testing process was robust and the app passed all tests, I would release the app on the App Store.

Continuous Integration and Deployment Process

Challenges and Solutions: Overcoming Development Hurdles

  • Determining the Shape and Direction: One of the biggest challenges was giving the app a clear shape and direction. To address this, I created a comprehensive product document detailing the project’s purpose, final product vision, and potential success factors. This helped define the app’s direction and ensure it met users’ needs.
  • User-Friendly UI: Ensuring a user-friendly UI was another major challenge. I designed paper mock-ups and tested them with friends and family, gathering feedback to iterate on the design. This process helped me create a simple and intuitive UI that was easy to navigate.
  • Backend Architecture: Architecting the backend effectively posed its own difficulties. I used AWS Amplify with DynamoDB, which provided a scalable solution that the app could control directly via Swift. This setup ensured that the backend could handle increased loads and data processing requirements as the app grew.
  • Making the App Useful for Others: Making the app useful for other people, not just myself, was the biggest challenge. People’s food needs and preferences for automation vary greatly. Some enjoy the traditional process of cooking and may resist technological changes in meal planning. To tackle this, I conducted extensive user research using Google AdWords, Google Trends, and AI suggestions. Continuous testing with users helped refine the app.

Shelving the Project: A Difficult Decision

Despite the effort and progress, I eventually decided to shelve Plat. The project didn’t gain the expected traction, and feedback from investors suggested the core problem wasn’t significant for the Indian market. Additionally, generative AI began solving meal planning dynamically, making Plat less competitive. Running out of funds as a self-funded project also played a crucial role in this decision.

Key Learnings: Insights for Future Projects

Market Research: Validate the problem space thoroughly using multiple channels, including social media, contacts, Google AdWords, and a basic landing page to gauge interest. Creating a seed funding pitch deck can also help in understanding the market, competitors, and problem space.

User Feedback: Engage with a set of users for regular feedback and be open to changes based on their input. Don’t be too attached to the original idea.

UI/UX Design: Prioritize simplicity and relevance in UI design. Make sure the UI is intuitive and doesn’t overwhelm users with too many options.

Technical Skills: Improved backend skills, design patterns, and rapid prototyping. Learned how to take a concept to a final product, including design, marketing, and development.

Funding Management: Keep costs low and use scalable backend solutions to manage expenses effectively. Even if not planning to raise funds, understanding the financial aspects can provide valuable insights.

Conclusion

My journey with Plat was filled with valuable lessons and experiences. From market research to technical development, each step provided insights that will shape my future projects. Despite shelving Plat, the skills and knowledge gained have prepared me for future endeavors with a more informed and strategic approach.

This experience has strengthened my expertise in iOS development, and I look forward to applying these learnings in my next project. Thank you for following along on this journey.

Unlisted

--

--