MessMate: Tackling Food Waste with a Modern SaaS Solution

App Store Link: https://apps.apple.com/in/app/messmate/id6749835098

Inspiration

In university hostels, we witnessed a staggering problem hiding in plain sight: massive food and resource wastage. For a single hostel of 600 students, we observed an average consumption of 10 LPG cylinders per day, with a significant amount of food being over-prepared due to pure guesswork. This wasn't just a waste of food, but also of energy and money. We saw an opportunity to tackle this untouched, yet critical, area of campus life and decided to build a solution.

What it does

MessMate is a multi-tenant SaaS platform designed to bring efficiency, transparency, and convenience to hostel and university mess management. It's a comprehensive ecosystem built on a powerful Supabase backend (PostgreSQL, Auth, Storage, Edge Functions) with a native SwiftUI frontend for iOS.

The app serves a distinct purpose for each user role:

  • For Students: They can view daily menus, pre-book their meals with a single tap (generating a unique QR code). By booking in advance, they directly help the kitchen reduce food waste.

  • For Staff (staff): The engine room of the mess. Staff can set and update daily menus, create recurring weekly schedules, and define one-time "exception" menus. Crucially, they have a dashboard showing booking statistics (Total Bookings vs. Meals Availed), allowing them to cook precisely what's needed. They can also configure core meal settings, like service start and end times.

  • For Security Guards (security_guard): A focused, single-purpose interface for scanning student QR codes to securely and quickly mark a meal as availed.

  • For Hostel Admins (admin): They have oversight of a specific hostel. Admins can manage users within their hostel, see meal schedules and analytics, and handle day-to-day user management tasks.

  • For Institute Administrators (institute_admin): The super-users. They have a full dashboard to manage the entire institute. This includes editing institute details, onboarding entire hostels and user lists via secure CSV uploads (processed by Edge Functions), and managing the institute's subscription.

For monetization, we've integrated Google AdMob for the free tier and used RevenueCat to manage a seamless "MessMate Pro" subscription, which provides an ad-free experience for the entire institute.

How we built it

We built MessMate by investing countless hours in user flow mapping, designing a robust multi-tenant database schema, and learning new technologies on the fly. The entire process was a blend of human ingenuity and AI collaboration.

We used a combination of Gemini 2.5 Pro, Claude Sonnet 4.0 and ChatGPT as brainstorming partners and coding assistants. This allowed us to rapidly prototype, solve complex PostgreSQL problems, and refactor code for performance and security. Every AI-assisted line of code was manually reviewed to ensure it aligned perfectly with our business requirements.

Challenges we ran into

This journey was filled with challenges that tested our resilience:

  • Team Dynamics: The initial team faced attrition as the project's complexity grew, leaving a core duo: Gurnoor Singh Sodhi (iOS Development) and Keya Gupta (UI/UX Design). We're incredibly proud to have pushed through to the finish line, even between the college exams.

  • Technical Deep Dive: As a beginner iOS developer, diving deep into advanced SwiftUI, understanding the nuances of PostgreSQL, and mastering Supabase was a steep learning curve. We tackled complex issues like SECURITY DEFINER vs. SECURITY INVOKER functions, solved infinite recursion bugs in database triggers, and built a scalable backend from the ground up.

  • Securing a Multi-Tenant Architecture: Ensuring that an admin from one university could never see or modify the data of another was our highest priority. This required meticulous design of our database functions and security rules.

  • The App Store Gauntlet: The app was rejected five times by the Apple review team. Each rejection was a learning opportunity, forcing us to perfect our implementation of in-app purchases (thanks, RevenueCat!), and refine our Terms of Use and Privacy Policy to meet Apple's stringent standards.

Accomplishments that we're proud of

Our greatest accomplishment is shipping a real, complex, and fully functional SaaS application to the App Store. The Shipaton hackathon provided the motivation and deadline we needed to push past the final hurdles and get MessMate into the hands of users. Seeing our app live for download just days before the submission deadline was an incredible moment.

What we learned

This project was an intense, hands-on learning experience.

  • Gurnoor Singh Sodhi: I went from basic SwiftUI to building a full-stack application. I binge-watched PostgreSQL courses, learned database security principles from Supabase's documentation, and used AI not as a crutch, but as a tool to accelerate my learning and reverse-engineer complex code.

  • Keya Gupta: Stepping into the field of UX was both challenging and rewarding. Using the application we built from the perspective of a consumer compelled us to think more holistically. This experience prompted me to study UX more deeply through the Google UX Professional Course and to implement my learning while building MessMate.

What's next for MessMate

The journey has just begun. Our immediate next step is to launch the Android version to make MessMate accessible to all students. We plan to pilot the app at our own institution(we are university students) to gather direct feedback, and based on those learnings, we will introduce more features and review our monetization strategy.

Built With

  • combine
  • coreimage
  • foundationdb
  • googlemobileads
  • photosui
  • revenuecat
  • revenuecatui
  • supabase
  • swiftui
  • tipkit
  • uikit
  • uniformtypeidentifiers
  • visionkit
Share this project:

Updates