← Back to projects

Mobile Apps

CalSnapAI

CalSnapAI simplifies daily nutrition tracking by combining photo-first meal recognition and Nutrition Facts label parsing with an offline-ready Flutter architecture.

Consumer Mobile AI ProductRole: Mobile Engineer & Product CreatorDuration: Private Development / Launch PreparationPrivate Development / Launch Preparation
CalSnapAI hero image

Project overview

A mobile-first calorie and nutrition tracker built with Flutter and Firebase, using Google Gemini multimodal vision to extract nutrition data from photos.

Who it is for
Individuals and fitness enthusiasts seeking to track meals, macros, and hydration without tedious manual database searches.
Why it was created
Eliminate food-logging friction and drop-off through an intuitive photo-first workflow with editable nutrition breakdowns.

Technology stack

  • Mobile App
  • Flutter
  • Dart
  • Gemini AI
  • Firebase
  • Clean Architecture
  • Computer Vision

Problem

  • Traditional calorie-tracking apps rely heavily on manual text searches and portion guessing, creating high logging friction that leads to user abandonment.
  • Packaged foods and prepared meals present distinct logging challenges: home-cooked dishes need visual ingredient estimation, while packaged foods require accurate label reading.
  • On-device AI API keys risk client-side extraction, requiring a secure cloud architecture that balances latency with operational safety.

Solution

  • Engineered a dual-pipeline AI recognition system: one for multi-item meal photo analysis and another dedicated to Nutrition Facts label OCR and structured parsing.
  • Built server-side Firebase Cloud Functions to broker Google Gemini multimodal vision requests securely, keeping API keys protected while returning structured macronutrient breakdowns.
  • Implemented a modular Flutter Clean Architecture with Bloc state management, Firestore offline persistence, and editable review screens that acknowledge AI estimation uncertainty.

My role

  • Designed the end-to-end mobile user journey, photo logging flow, and macro review interfaces.
  • Architected the multi-package Flutter codebase across dedicated feature modules (ai_tracker, nutrition, hydration, progress, streak).
  • Built Firebase Cloud Functions with Google Gemini vision prompt orchestration for structured food and label extraction.
  • Integrated Firestore offline caching, Firebase Auth (Google & Apple Sign-In), and dynamic macro charting with fl_chart.

Key features

Meal Photo Recognition

Capture meal images to receive instant AI-powered calorie, protein, carb, and fat estimates.

Nutrition Label Scanner

Dedicated OCR parsing pipeline to extract exact serving sizes and micronutrients from food packaging.

Modular Clean Architecture

Multi-package architecture separating AI detection, nutrition tracking, hydration, and streak analytics.

Offline-Ready Firestore Sync

Local cache persistence ensuring meal logging and history remain accessible without internet connectivity.

Editable Review Workflow

Interactive breakdown cards allowing users to adjust items and portion estimates before confirming.

Health & Progress Analytics

Visual macro distributions, daily calorie trend charts via fl_chart, and water intake tracking.

Screenshots and visuals

CalSnapAI cover illustration
mobile
Mobile interface and AI food recognition workflow for CalSnapAI.

Technical architecture

Mobile Client

  • • Flutter 3.24+ (Dart ^3.6)
  • • flutter_bloc & provider
  • • get_it Service Locator
  • • fl_chart & mobile_scanner

Backend & Cloud

  • • Firebase Cloud Functions (Node.js)
  • • Cloud Firestore (Offline Cache)
  • • Firebase Storage

AI & Vision

  • • Google Gemini AI Multimodal Vision
  • • Dual Ingestion (Meal Photo & Label OCR)
  • • Image compression & MIME parsing

Auth & Security

  • • Firebase Auth (Google & Apple Sign-In)
  • • Firestore Security Rules
  • • Server-side API key isolation

Challenges and solutions

Server-Side AI Vision & Secret Isolation: Running multimodal vision without exposing Gemini API credentials in the mobile binary.

Implemented Firebase Cloud Functions (NutritionApiService) as a secure proxy. The mobile client compresses and streams image byte arrays with MIME detection, while the cloud function prompts Gemini and enforces structured JSON response schemas.

Probabilistic AI Estimation vs. User Control: Food photography can have hidden ingredients, portion ambiguities, or varying preparation methods.

Designed a review-first mobile workflow. Rather than blindly committing AI outputs, CalSnapAI presents structured, editable item cards (name, calories, protein, carbs, fat, serving size) so users can quickly refine results before Firestore persistence.

Multi-Package Dependency & State Management: Managing interconnected features (AI tracker, nutrition totals, daily streaks, hydration) without monolithic coupling.

Decomposed the app into modular packages (feature_ai_tracker, feature_nutrition, feature_progress, core_common) registering strictly typed repositories through get_it, facilitating independent unit testing and maintaining an 85%+ test coverage gate.

Development process

  1. 01Product Concept & User Flow: Mapped photo capture, label scanning, editable confirmation, and daily nutrition tracking journeys.
  2. 02Modular Package Scaffolding: Established multi-package repository structure and get_it dependency injection boundaries.
  3. 03Cloud Functions & AI Integration: Built secure Gemini vision prompts and JSON validation pipelines.
  4. 04Persistence & Analytics: Integrated Firestore offline caching, authentication providers, and fl_chart progress visualizations.
  5. 05Quality & CI/CD: Established GitHub Actions automated linting, test suites, and coverage requirements.

Results

  • • Engineered a release-ready, cross-platform mobile client with server-side AI vision integration.
  • • Established a clean, modular Flutter architecture with strict package isolation and offline reliability.
  • • Streamlined meal and label logging into a sub-second capture and review workflow.

Lessons learned

  • • Consumer AI products succeed when they provide user agency—making probabilistic AI predictions easy to review and correct builds long-term user trust.
  • • Separating mobile feature packages from the start prevents state entanglement and makes multi-developer feature iteration seamless.
  • • Server-side AI orchestration is essential for mobile apps to protect API credentials and allow prompt iterations without requiring App Store updates.

Next steps

  • • Conduct closed beta testing for real-world portion estimation feedback.
  • • Implement barcode database lookup fallback for packaged food items.

Need a similar product?

Let's talk about the next useful version of your product.

Discuss a Project