Skip to content

mariiammaysara/Veonix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Veonix Logo

Veonix

AI-powered nutrition analysis. Upload a meal photo — get instant, accurate nutrition data.

Status Backend Frontend AI License

Live Demo · API Docs · Report Bug


Features

Backend

  • Gemini 2.5 Flash Integration: Google's latest multimodal AI for food identification and nutrition estimation.
  • Clean Architecture: Modular design (Controllers, Services, Providers, Repositories).
  • Provider Protocol Pattern: Easily swap vision providers (Gemini, OpenAI, etc.).
  • Repository Pattern: Centralized data access using SQLAlchemy and SQLite.
  • Image Optimization: Automatic compression and normalization via Pillow.
  • Middleware Stack: Request tracing, detailed logging, and performance timing.
  • Pydantic v2: Strict schema validation for robust API contracts.

Frontend

  • Next.js 15 App Router: High-performance React framework for optimal UX.
  • Modern TypeScript: End-to-end type safety for reliable development.
  • Drag & Drop Upload: Secure, intuitive interface with real-time image preview.
  • Interactive Loading: Multi-step real-time progress indicator during analysis.
  • Data Visualization: Animated macro progress bars and nutrition ratio charts.
  • Premium Design System: Dark Emerald aesthetic with deep slate and vibrant accents.
  • Micro-animations: Seamless transitions (fade-up, float, shimmer) via CSS.

⚠️ Known Limitations

  • Portion estimation from images is inherently unreliable without a reference scale.
  • Current approach relies on AI estimation (Gemini Vision), which may produce inaccurate weights.
  • Future improvement: user-assisted portion input or reference-based estimation.

Architecture

System Flow

  [ User ]                        [ Cloud ]
      |                               |
      v                               v
[ Frontend ] -- (Multipart Image) -> [ FastAPI ] 
    (Next.js)                         (Backend)
                                          |
                                          |-- [ Image Processor ] (Pillow)
                                          |-- [ Vision Provider ] (Gemini API)
                                          |-- [ Data Repository ] (Sqlite/Alchemy)
                                          |
[ Dashboard ] <--- (Analyzed Data) --- [ Controller ]

Backend Layer Diagram

┌───────────────────────────────────────────┐
│              API Controllers              │ (FastAPI Routes)
└─────────────────────┬─────────────────────┘
                      v
┌───────────────────────────────────────────┐
│               Service Layer               │ (MealService)
└─────────────────────┬─────────────────────┘
           ┌──────────┴──────────┐
           v                     v
┌────────────────────┐ ┌────────────────────┐
│ Vision Provider    │ │  Meal Repository   │ (Data Access)
│ (Gemini/Multimodal)│ │ (SQLAlchemy CRUD)  │
└────────────────────┘ └─────────┬──────────┘
                                 v
                       ┌────────────────────┐
                       │     SQLite DB      │ (Persistence)
                       └────────────────────┘

Tech Stack

Backend

Technology Role
FastAPI High-performance API framework.
Pydantic v2 Data modeling and validation.
SQLAlchemy SQL Toolkit and Object Relational Mapper.
Pillow Image processing and optimization.
Google GenAI Gemini 2.5 Flash / Pro model integration.

Frontend

Technology Role
Next.js 15 Application framework & SSR.
TypeScript Type-safe development environment.
Tailwind CSS Utility-first styling engine.
Framer Motion UI animation and orchestration.
Lucide React Premium icon system.

DevOps

Technology Role
Docker Containerization of services.
Docker Compose Multi-container orchestration.
GitHub Actions CI/CD automation.

Installation

Prerequisites

Running with Docker

Start the entire stack with one command:

docker-compose up --build

The app will be available at http://localhost:3000.


Deploy with Docker

# Build production images
docker-compose -f docker-compose.yml build

# Run in detached mode
docker-compose up -d

⚠️ Deployment Notes

  • Backend is deployed on Render (free tier)
  • First request may take ~30–60 seconds due to cold start

Contributing

  1. Fork the repository.
  2. Create your feature branch (git checkout -b feature/amazing-feature).
  3. Commit your changes (git commit -m 'Add amazing feature').
  4. Push to the branch (git push origin feature/amazing-feature).
  5. Open a Pull Request.

License

Distributed under the MIT License. See LICENSE for more information.


Author

© Built by Mariam Maysara

About

Full-stack AI nutrition dashboard. Upload a food photo → instant calories, protein, carbs & macros. Built with FastAPI, Next.js 15, and Google Gemini Vision.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors