Skip to content
All projects
AIIn development

Food Recycler Chef

Photograph your fridge and get a recipe that uses what you already have.

Role
Architect and developer
Year
2026
Illustration of a photographed fridge turning into a step-by-step recipe card

What it is

A Flutter app sends a fridge photo through an event-driven pipeline: GPT-4o Vision identifies the ingredients and a recipe service builds step-by-step recipes from only those ingredients.

The problem

Vision and generation calls are slow and bursty, and they should not hold up sign-in, payments or browsing.

Architecture

Requests flow left to right. Hover a component for its role.

Food Recycler Chef architecturephoto uploadedrecipe readyFlutter appFlutter appNGINX gateway: per-IP rate limitsNGINX gatewaySpring Boot services: user, transaction, recipeSpring Boot servicesMinIO: photosMinIOKafka: KRaft modeKafkaFastAPI AI service: 5-stage pipelineFastAPI AI servicePostgreSQL and RedisPostgreSQL and Redis
Solid line: synchronous callDashed line: through a queueDashed box: external or infrastructure
  • Flutter app client
  • NGINX gateway edge, per-IP rate limits
  • Spring Boot services service, user, transaction, recipe
  • MinIO data, photos
  • Kafka queue, KRaft mode
  • FastAPI AI service ai, 5-stage pipeline
  • PostgreSQL and Redis data

Key decisions

  • Events between services

    Photo-to-recipe runs over Kafka topics with explicit partitions and retention, so AI load never blocks the transactional services.

  • A staged AI pipeline

    Preprocess, vision, normalise, generate and post-process are separate stages, so each can be tested and swapped on its own.

Highlights

  • Rate limits at the gateway, stricter on authentication endpoints.
  • Resilience4j around service calls.
  • Bare-metal deployment with systemd units, numbered setup scripts and a rollback script.

Stack

FlutterSpring BootJava 21KafkaFastAPIOpenAI GPT-4oPostgreSQLRedisMinIONginxPrometheusGrafana