Inspiration

Food allergies and dietary restrictions affect millions worldwide, yet identifying what's in our food remains challenging. We wanted to create a quick, accessible solution that could analyze any food photo and provide instant nutritional insights using AI, making dietary management easier and more accessible for everyone.

What we learned

Through building NutriSnap, we deepened our understanding of:

  • Google Gemini API capabilities: Leveraging vision models for sophisticated image analysis
  • Cloud-native architecture: Deploying Flask applications efficiently on Google Cloud Run
  • Real-time data synchronization: Using Firebase for seamless backend operations
  • Production-grade authentication: Implementing OAuth 2.0 with Google Auth Platform
  • Responsive UI/UX design: Creating intuitive interfaces for food analysis

How we built it

NutriSnap is built on a modern tech stack combining frontend and backend technologies:

Frontend: HTML, CSS, and JavaScript for a responsive user interface that works across devices.

Backend: Python Flask framework handling API requests and business logic, integrated with Google Gemini API for sophisticated food image analysis.

Cloud Infrastructure: Google Cloud Run containerizing our Flask application for scalability and reliability, with Firebase Firestore providing secure real-time database operations.

Authentication: Google OAuth 2.0 for secure user authentication and profile management.

API Integration: Google Gemini Vision API analyzing food images to extract nutritional information, ingredients, and dietary alerts.

Challenges

  • Image Quality Variability: Food photos vary greatly in lighting, angle, and composition. We addressed this by implementing preprocessing and robust error handling.
  • Nutritional Accuracy: Ensuring AI-generated nutrition data is reasonable and helpful required careful prompt engineering and validation.
  • Real-time Responsiveness: Managing API latency while maintaining a smooth user experience through smart loading states and optimization.
  • Production Compliance: Implementing proper authentication, privacy policies, and terms of service for a production-grade application.

Built With

Share this project:

Updates