Skip to content

Scalable microservices app for extracting product composition from images via OCR and analyzing food additives. Powered by Kafka, Redis, and advanced OCR model.

License

Notifications You must be signed in to change notification settings

Color-Kat/Pomelo-food-analyzer

Repository files navigation

Pomelo - анализ состава продуктов

Link to the website: Pomelo - Food analyzer

This is an app for analyzing product ingredients using photos or text! Take a photo of the composition label and get a detailed report:

  • dangerous E-additives
  • allergens
  • sugar
  • preservatives
  • meat
  • alcohol
  • haram, and halal.

Technologies used: Typescript, React, NextJS, Mobx, Tanstack-query, Tailwind, HeroUI, NestJS, Python, Kafka, Docker, Prisma, PostgreSQL, Redis, MinIO, Grafana, Prometheus, Loki, Promtail, Microservices, Monorepository.

Prerequisites

Setup WSL 2 (for example Ubuntu) and install Docker. In setting select WSL 2 integration with Ubuntu. WSL 2 + Docker setup guide: https://dev.to/kristarking/setting-up-docker-on-windows-with-wsl2-3cje

Installation

  1. Clone repository
git clone https://github.com/Color-Kat/Pomelo-food-analyzer.git ./Pomelo-food-analyzer
  1. Copy .env.example to .env and fill in the necessary environment variables. You can request secret keys from @ColorKat.

  2. Development mode:

docker compose up --build
  1. Production mode:
docker compose -f docker-compose.prod.yml up --build
  1. Wait until message Application is running on: http://localhost:3000 appears in the console.

  2. Ping all microservices through kafka: open in browser http://localhost:3000/ping

Troubleshooting

If you face issues try to look for solutions in troubleshooting.md

Installation on MacOS (colima)

colima start --cpu 6 --memory 6
docker compose up --build

Microservices

All microservices are located in the ./apps directory.

Architecture

figma

Logging and metrics

I use grafana stack for logs and metrics (Grafana, Loki, Promtail, Prometheus). To run application with logs and metrics, add corresponding flag:

docker compose --profile monitoring up

About

Scalable microservices app for extracting product composition from images via OCR and analyzing food additives. Powered by Kafka, Redis, and advanced OCR model.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5