AI Health is a secure web application that empowers users to analyze food images using their own personal AI quota. By leveraging Google's Gemini API via OAuth, users can get detailed nutrition breakdowns without relying on a shared developer key or paid subscription.
AI Health operates on a "Bring Your Own Key" (BYOK) model via seamless OAuth integration.
- Secure Login: You sign in with your Google Account.
- Permission Grant: A specific scope request is made to access the Gemini API on your behalf.
- Encrypted Storage: Your session tokens are encrypted (AES-256-GCM) and stored in our secure Postgres Database.
- AI Analysis: When you analyze an image:
- The app retrieves your secure token.
- The image is processed by Google Gemini using your free tier quota.
- Results are instantly cached to prevent faster loading next time.
- Instant Breakdown: Get calories, macronutrients (Protein, Carbs, Fats), and micronutrients via intuitive gauges.
- Ingredient Detection: Identifies primary ingredients visible in the image.
- Health Assessment: AI provides a healthiness score and highlights potential allergens or concerns.
- Whole-Body Visualization: A high-fidelity 3D human model (Male/Female) visualizes the impact of food on your body.
- Organ Risk Mapping: Specific organs (e.g., Heart, Liver, Kidneys) light up in Red (High Risk), Yellow (Moderate), or Green (Low) based on ingredients.
- Interactive Tooltips: Hover over affected areas to read detailed medical insights (e.g., "High sodium impacts cardiovascular health").
- Context-Aware: The integrated chatbot knows about your recently analyzed food.
- Personalized Advice: Ask questions like "Is this good for a keto diet?" or "How can I make this healthier?"
- Real-time Interaction: Get instant answers to your nutrition queries.
- Scan History: All your analyses are saved to the database.
- Interactive Reports: View detailed logs of your food intake over time.
- Medication Tracking: Keep track of your supplements or medications alongside your nutrition.
- User Reports: Generate insights based on your eating habits.
- Biological Context: Define your gender, allergies, and existing conditions. The AI uses this to tailor its nutrition advice.
- Smart Caching: Duplicate images are detected immediately, saving your API quota and providing instant results.
- Optimized Assets: Images are delivered via ImageKit.io for lightning-fast loading.
- Medical Archive: Upload and store your medical records or prescriptions for easy access.
- Privacy Mode: All health data is encrypted and stored securely with row-level security policies.
Click the "Get Started" button. You will be redirected to Google to sign in.
Note: We only ask for the permissions strictly necessary to analyze images using the Gemini API.
Once logged in, you will see your personal dashboard.
- Upload Area: Drag & drop your food image here.
- Recent Scans: Your history is available in the sidebar.
- Clear History: Use the option in settings to wipe your data from our database.
- Upload an image.
- Click "Analyze Nutrition".
- Wait a few seconds for Gemini to process the visual data.
- Review the Nutrition Card that appears with detailed stats.
- Explore the 3D Model: Rotate and zoom the 3D human model to see which organs are affected by your food choice.
After analysis, use the Chat Assistant floating button.
- It automatically loads the context of your current food.
- Ask for recipes, alternatives, or explanation of specific nutrients.
Navigate to the Profile page to:
- Update Health Context: Add allergies (e.g., "Peanuts"), conditions (e.g., "Diabetes"), or medications.
- Upload Records: Store images of your prescriptions or lab results securely.
- Framework: Next.js 16 (App Router)
- Styling: Tailwind CSS
- Database: Postgres Database (via Drizzle ORM)
- AI Model: Google Gemini 2.0 Flash
- Image CDN: ImageKit.io
- 3D Models: NIH 3D Print Exchange
We deeply appreciate the tools and resources that make this project possible.
| Resource | Usage |
|---|---|
| Google Gemini API | The core intelligence engine for nutrition analysis. |
| ImageKit.io | High-performance image optimization and delivery. |
| NIH 3D Print Exchange | Source for accurate human anatomy 3D models. |
| Lucide Icons | Beautiful, consistent icons used throughout the app. |
Β© 2025 0xArchit. All Rights Reserved.
Licensed under the Custom License.
Developed with β€οΈ by 0xArchit.
- Email: mail@0xarchit.is-a.dev
- Website: 0xarchit.is-a.dev
- GitHub: @0xarchit