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.
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
- Clone repository
git clone https://github.com/Color-Kat/Pomelo-food-analyzer.git ./Pomelo-food-analyzer-
Copy
.env.exampleto.envand fill in the necessary environment variables. You can request secret keys from @ColorKat. -
Development mode:
docker compose up --build- Production mode:
docker compose -f docker-compose.prod.yml up --build-
Wait until message
Application is running on: http://localhost:3000appears in the console. -
Ping all microservices through kafka: open in browser http://localhost:3000/ping
If you face issues try to look for solutions in troubleshooting.md
colima start --cpu 6 --memory 6
docker compose up --buildAll microservices are located in the ./apps directory.
- web (NextJS)
- api-gateway (NestJS)
- account (NestJS)
- scan (NestJS)
- product-analyzer (NestJS)
- ingredients-recognition (Python, OCR)
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