AI-powered food product analysis platform with instant insights into nutritional facts, ingredient deconstruction, NOVA processing classification, and potential health risks.
EatInformed empowers consumers to make healthier food choices by leveraging state-of-the-art vision and clinical reasoning AI to decode complex food packaging. Simply upload an image of a food product label, and receive a comprehensive health report including nutritional data, ingredient purpose, allergen alerts, and international NOVA processing classification—powered by NVIDIA NIM (nvidia/nemotron-nano-12b-v2-vl & qwen/qwen3.5-122b-a10b).
Available as a Next.js web application and an Expo React Native mobile app with full Apple HIG design compliance.
- NVIDIA NIM Vision OCR: High-precision optical character recognition and visual label parsing
- Clinical Nutrition Reasoning: In-depth ingredient purpose deconstruction and dietary evaluation
- NOVA Classification: International food processing categorization (Groups 1 to 4)
- Real-Time Processing: Single-pass vision analysis with automated fallback orchestration
- Nutritional Facts Transcription: Structured breakdown of calories, macronutrients, and sodium
- Ingredient Deconstruction: Purpose analysis and additive screening for all ingredients
- Allergen Detection: Automatic identification of declared allergens
- Health Tradeoffs: Fact-based pros, cons, and health considerations
- Responsive Web: Built with Next.js 15, Tailwind CSS, and Framer Motion
- Native Mobile App: Built with Expo SDK 53, React Native, and Apple Fluid motion
- Dark & Light Modes: System-following and user-selectable theme support
- Local-First Privacy: Scan history stored securely on-device with zero third-party tracking
| Technology | Version | Purpose |
|---|---|---|
| Next.js | 15.2.6 | React framework with App Router & Turbopack |
| React | 19.x | Component UI architecture |
| TypeScript | 5.x | Strict end-to-end type safety |
| Tailwind CSS | 3.4.x | Design token styling |
| Framer Motion | 12.x | Fluid spring animations |
| Technology | Version | Purpose |
|---|---|---|
| Expo | 53.x | Cross-platform native runtime |
| React Native | 0.86.x | Native mobile component architecture |
| AsyncStorage | 2.2.x | Persistent scan history storage |
| Expo Camera | 53.x | Real-time label photo capture |
| Technology | Provider | Purpose |
|---|---|---|
| Nemotron Nano 12B v2 VL | NVIDIA NIM | Optical character recognition & label layout parsing |
| Qwen 3.5 (122B) | NVIDIA NIM | Clinical nutrition reasoning & additive analysis |
| Firebase Auth | Multi-platform authentication & guest sessions | |
| Sharp | Node.js | EXIF auto-rotation & adaptive image normalization |
| Technology | Version | Purpose |
|---|---|---|
| React Hook Form | 7.54.2 | Performant form management |
| @hookform/resolvers | 4.1.3 | Schema validation resolvers |
| Zod | 3.24.2 | TypeScript-first schema validation |
| Technology | Version | Purpose |
|---|---|---|
| Recharts | 2.15.1 | React charting library |
| date-fns | 3.6.0 | Date manipulation library |
| html2canvas | 1.4.1 | Screenshot generation |
| React Day Picker | 8.10.1 | Date picker component |
| Technology | Version | Purpose |
|---|---|---|
| ESLint | 8.x | Code linting and quality |
| PostCSS | 8.x | CSS transformations |
| Genkit CLI | 1.8.0 | AI development and testing |
Before you begin, ensure you have the following installed:
- Node.js 18.0 or higher
- Yarn 1.22+ (specified package manager)
- Git for version control
-
Google Gemini API Key
- Visit Google AI Studio
- Create a new API key
- Keep it secure for environment configuration
-
Firebase Project
- Go to Firebase Console
- Create a new project or use existing one
- Enable Authentication (Email/Password, Google Sign-in)
- Generate Web App credentials
- Download Firebase Admin Service Account JSON
-
Clone the Repository
git clone https://github.com/amitdevx/eatinformed.git cd eatinformed -
Install Dependencies
yarn install
-
Environment Configuration
Create a
.env.localfile in the root directory:# Google Gemini AI GOOGLE_GEMINI_API_KEY=your_gemini_api_key_here GOOGLE_GENAI_API_KEY=your_gemini_api_key_here # Firebase Client Configuration NEXT_PUBLIC_FIREBASE_API_KEY=your_firebase_api_key NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your-project.firebaseapp.com NEXT_PUBLIC_FIREBASE_PROJECT_ID=your-project-id NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your-project.appspot.com NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_sender_id NEXT_PUBLIC_FIREBASE_APP_ID=your_app_id NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID=your_measurement_id # Firebase Admin SDK (Server-side) FIREBASE_PROJECT_ID=your-project-id FIREBASE_CLIENT_EMAIL=firebase-adminsdk@your-project.iam.gserviceaccount.com FIREBASE_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\nYourPrivateKeyHere\n-----END PRIVATE KEY-----\n" # Application Configuration NEXT_PUBLIC_APP_URL=http://localhost:9003 NODE_ENV=development
Important: Replace all placeholder values with your actual credentials.
-
Firebase Setup
- Enable Authentication methods in Firebase Console
- Set up Firestore Database (if using)
- Configure Firebase Storage for image uploads
- Add authorized domains for authentication
-
Database Initialization
The SQLite database will be automatically created on first run. To manually initialize:
# Database file: database.sqlite # Schema will be created automatically by the application
-
Run Development Server
# Start Next.js development server with Turbopack yarn devThe application will be available at http://localhost:9003
-
Run Genkit Development Server (Optional)
For AI workflow development and testing:
yarn genkit:watch
This starts the Genkit Developer UI for testing AI flows.
# Development
yarn dev # Start Next.js dev server with Turbopack on port 9003
yarn genkit:watch # Watch and run Genkit AI flows in development mode
# Production
yarn build # Build optimized production bundle
yarn start # Start production server
# Code Quality
yarn lint # Run ESLint with strict settings (max-warnings=0)
yarn typecheck # Run TypeScript compiler checks without emitting files
# Package Management
yarn install # Install dependencies
yarn add <package> # Add new dependencyeatinformed/
├── .github/ # GitHub configuration and workflows
├── .idx/ # IDX configuration
├── .vscode/ # VS Code settings
├── docs/ # Documentation files
├── src/
│ ├── ai/ # AI integration layer
│ │ ├── flows/ # Genkit AI flows and prompts
│ │ ├── dev.ts # Genkit development configuration
│ │ └── genkit.ts # Genkit initialization and setup
│ ├── app/ # Next.js App Router pages and layouts
│ │ ├── (auth)/ # Authentication routes
│ │ ├── (dashboard)/ # Protected dashboard routes
│ │ ├── api/ # API routes and endpoints
│ │ ├── layout.tsx # Root layout component
│ │ └── page.tsx # Home page
│ ├── components/ # React components
│ │ ├── ui/ # Reusable UI components (Radix UI)
│ │ ├── forms/ # Form components
│ │ ├── layouts/ # Layout components
│ │ └── features/ # Feature-specific components
│ ├── context/ # React Context providers
│ │ ├── AuthContext.tsx # Authentication context
│ │ └── ThemeContext.tsx # Theme management
│ ├── hooks/ # Custom React hooks
│ │ ├── useAuth.ts # Authentication hook
│ │ ├── useFirebase.ts # Firebase utilities
│ │ └── useAnalysis.ts # Food analysis hook
│ ├── lib/ # Utility libraries and configurations
│ │ ├── firebase.ts # Firebase client initialization
│ │ ├── firebase-admin.ts # Firebase Admin SDK setup
│ │ └── utils.ts # Helper functions
│ ├── types/ # TypeScript type definitions
│ │ ├── analysis.ts # Food analysis types
│ │ ├── user.ts # User-related types
│ │ └── index.ts # Exported types
│ └── utils/ # Utility functions
│ ├── validation.ts # Zod schemas
│ └── formatters.ts # Data formatting utilities
├── public/ # Static assets (images, fonts, etc.)
├── .env.local # Environment variables (create this)
├── .eslintrc.json # ESLint configuration
├── .gitignore # Git ignore rules
├── components.json # shadcn/ui component configuration
├── database.sqlite # SQLite database file
├── next.config.mjs # Next.js configuration
├── package.json # Dependencies and scripts
├── postcss.config.mjs # PostCSS configuration
├── tailwind.config.ts # Tailwind CSS configuration
├── tsconfig.json # TypeScript configuration
└── README.md
- Client-side Firebase initialization
- Authentication setup
- Firestore configuration
- Server-side Firebase Admin SDK
- Secure backend operations
- Token verification
- AI model initialization
- Google AI plugin setup
- Flow registration and management
- Image optimization settings
- Environment variable handling
- Build optimizations
- Custom color schemes
- Component styling extensions
- Animation configurations
POST /api/auth/signup # Create new user account
POST /api/auth/login # User login
POST /api/auth/logout # User logout
POST /api/auth/reset-password # Password reset request
POST /api/analyze/image # Upload and analyze food label image
GET /api/analyze/history # Get user's analysis history
GET /api/analyze/:id # Get specific analysis result
DELETE /api/analyze/:id # Delete analysis result
GET /api/user/profile # Get user profile
PUT /api/user/profile # Update user profile
GET /api/user/preferences # Get dietary preferences
PUT /api/user/preferences # Update dietary preferences
POST /api/genkit/analyze-label # AI-powered label analysis flow
POST /api/genkit/extract-nutrients # Extract nutritional information
POST /api/genkit/identify-allergens # Detect allergens in ingredients
- Email/Password Authentication
- Google Sign-In
- Password Reset & Email Verification
- Session Management
- User Profiles: Store user information and preferences
- Analysis Results: Save food label analysis history
- Favorites: Bookmark frequently scanned products
- Image Uploads: Store original food label images
- Report Generation: Save PDF reports of analyses
- Server-side Authentication: Verify user tokens
- Database Operations: Secure backend data access
- User Management: Admin operations
- Model: Gemini Pro Vision (multimodal)
- Capabilities:
- Image recognition and OCR
- Natural language understanding
- Contextual analysis of ingredients
- Nutritional data extraction
- AI Flow Management: Structured workflows for analysis
- Prompt Engineering: Optimized prompts for accurate results
- Streaming Responses: Real-time result delivery
- Error Handling: Robust fallback mechanisms
- Image Upload → User uploads food label photo
- Preprocessing → Image optimization and validation
- AI Analysis → Gemini processes image and extracts data
- Data Structuring → Genkit organizes results
- Health Assessment → AI evaluates nutritional impact
- User Presentation → Results displayed with visualizations
- Calorie breakdown (per serving and per 100g)
- Macronutrients (carbs, proteins, fats)
- Micronutrients (vitamins, minerals)
- Daily value percentages
- Comparison with recommended intake
- Complete ingredient list extraction
- Identification of artificial additives
- E-number explanation and health impacts
- Natural vs. synthetic ingredient classification
- Allergen highlighting
- Traffic light system (red/yellow/green)
- Harmful additive warnings
- Sugar and sodium level alerts
- Trans fat detection
- Preservative analysis
- Vegan-friendly verification
- Vegetarian compatibility
- Gluten-free confirmation
- Keto/Low-carb suitability
- Halal/Kosher compliance
- Allergen warnings (nuts, dairy, soy, etc.)
Built with Radix UI primitives for accessibility and Tailwind CSS for styling:
- Accordion - Collapsible content sections
- Alert Dialog - Confirmation modals
- Avatar - User profile images
- Checkbox - Form selections
- Dialog - Modal windows
- Dropdown Menu - Context menus
- Label - Form labels
- Menubar - Navigation menus
- Popover - Floating content
- Progress - Loading indicators
- Radio Group - Single selections
- Scroll Area - Scrollable regions
- Select - Dropdown selections
- Separator - Visual dividers
- Slider - Range inputs
- Switch - Toggle controls
- Tabs - Tabbed interfaces
- Toast - Notifications
- Tooltip - Hover hints
# Install Vercel CLI
npm i -g vercel
# Deploy
vercel
# Production deployment
vercel --prodEnsure all environment variables are configured in your deployment platform:
- Vercel Dashboard → Project Settings → Environment Variables
- Add all variables from
.env.local
- Automatic image optimization
- Static page generation where possible
- API route caching
- CDN distribution
Contributions make the open-source community thrive! Any contributions you make are greatly appreciated.
-
Fork the Project
# Click the 'Fork' button on GitHub -
Clone Your Fork
git clone https://github.com/your-username/eatinformed.git cd eatinformed -
Create a Feature Branch
git checkout -b feature/AmazingFeature
-
Make Your Changes
- Follow the existing code style
- Add tests if applicable
- Update documentation
-
Commit Your Changes
git add . git commit -m 'Add some AmazingFeature'
-
Push to Your Branch
git push origin feature/AmazingFeature
-
Open a Pull Request
- Go to the original repository
- Click 'New Pull Request'
- Describe your changes
- Use TypeScript strict mode
- Follow ESLint rules (
yarn lint) - Write meaningful commit messages
- Add JSDoc comments for complex functions
- Image analysis accuracy depends on photo quality
- Some obscure ingredients may not be recognized
- OCR may struggle with handwritten labels
- Analysis time varies based on image size (typically 3-10 seconds)
- Multi-language support for international labels
- Barcode scanning integration
- Product comparison feature
- Mobile app (React Native)
- Recipe suggestions based on dietary preferences
- Social sharing and community features
- Integration with fitness tracking apps
- Offline mode with service workers
- Voice input for hands-free operation
This project is licensed under the MIT License - see the LICENSE file for details.
- Google Gemini for powerful AI capabilities
- Firebase for backend infrastructure and authentication
- Next.js Team for an excellent React framework
- Radix UI for accessible component primitives
- Vercel for seamless deployment platform
- shadcn/ui for beautiful component designs
Admin - @amitdevx
Project Link: https://github.com/amitdevx/eatinformed
Made with ️ for healthier food choices
Powered by Google Gemini AI & Firebase
Overview • Setup • API • Contributing • License