# raincor5/kitchen-system architecture

> Architecture diagram of the GitHub repository raincor5/kitchen-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/raincor5/kitchen-system
- Repository: https://github.com/raincor5/kitchen-system
- Video tour (about a minute): https://gitdiagram.com/raincor5/kitchen-system/video

## Overview

The repository is a multi-app kitchen management system. Its documented workflow runs from recipe creation and preparation planning through label generation, mobile printing, and QR-based traceability; it also includes tray organization and recipe scaling/export capabilities. The graph combines explicit backend routing and Android API/printer calls with README-documented cross-product stages. Some app screens and backend services are unsampled, so their internal connections are omitted or shown only where documented.

Main entry points: [`kitchen-manager/backend/app/main.py`](https://github.com/raincor5/kitchen-system/blob/main/kitchen-manager/backend/app/main.py) (API application), [`recipe-upscaler/calculator/src/App.js`](https://github.com/raincor5/kitchen-system/blob/main/recipe-upscaler/calculator/src/App.js) (Recipe web app), [`ftt-frontend/fft-android/app/src/main/java/com/fft/kitchen/LabelManagerActivity.kt`](https://github.com/raincor5/kitchen-system/blob/main/ftt-frontend/fft-android/app/src/main/java/com/fft/kitchen/LabelManagerActivity.kt) (Android app), [`prep-tracker/app/advanced-mode/index.tsx`](https://github.com/raincor5/kitchen-system/blob/main/prep-tracker/app/advanced-mode/index.tsx) (Prep tracker app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_kitchen["Kitchen Manager"]
  node_manager_api["API application<br/>[main.py]"]
  node_label_routes["Label endpoints<br/>[labels.py]"]
  node_processor_routes["Label processor<br/>[label_processor.py]"]
  node_label_storage[("Label storage<br/>[label_storage.py]")]
  node_db_client[("Database client<br/>[db_client.py]")]
  node_label_printer["Print service<br/>[label_printer.py]"]
  node_prep_routes["Prep tracking API<br/>[prep_tracking.py]"]
  node_gastronorm_routes["Tray API<br/>[gastronorm.py]"]
  node_recipe_routes["Recipe API"]
end

subgraph group_ftt["Food Traceability"]
  node_ftt_app["Android app"]
  node_api_service["Label API client<br/>[ApiService.kt]"]
  node_label_response["Label data<br/>[LabelResponse.kt]"]
  node_print_queue["Print queue"]
  node_label_printer_helper["Label printer"]
  node_aidl_printer["Printer interface"]
end

subgraph group_prep["Prep Tracking"]
  node_prep_app["Prep tracker app<br/>[index.tsx]"]
  node_prep_context["Prep state<br/>[DishesContext.tsx]"]
  node_tray_app["Tray organizer<br/>[index.tsx]"]
  node_tray_client["Tray API client"]
end

subgraph group_recipe["Recipe Upscaler"]
  node_recipe_web["Recipe web app<br/>[App.js]"]
  node_recipe_builder["Recipe builder<br/>[RecipeBuilder.js]"]
  node_recipe_scaler["Recipe scaler<br/>[RecipeUpscaler.js]"]
  node_recipe_preview["Recipe preview<br/>[RecipePreview.js]"]
  node_recipe_backend["Recipe backend<br/>[server.mjs]"]
  node_recipe_mobile["Recipe mobile app<br/>[index.tsx]"]
end

node_operator(("Kitchen staff"))

node_operator -->|"creates recipe"| node_recipe_web
node_operator -->|"plans preparation"| node_prep_app
node_recipe_web -->|"routes to"| node_recipe_builder
node_recipe_web -->|"routes to"| node_recipe_scaler
node_recipe_web -->|"routes to"| node_recipe_preview
node_recipe_web -.->|"uses recipe API"| node_recipe_backend
node_recipe_mobile -.->|"uses recipe API"| node_recipe_backend
node_recipe_web -.->|"exports recipes"| node_operator
node_recipe_mobile -.->|"shares recipes"| node_operator
node_recipe_web -.->|"supplies recipes"| node_prep_app
node_prep_app -.->|"manages prep state"| node_prep_context
node_prep_app -.->|"organizes trays"| node_tray_app
node_tray_app -.->|"requests tray data"| node_tray_client
node_tray_client -->|"calls tray API"| node_gastronorm_routes
node_operator -->|"scans labels"| node_ftt_app
node_prep_app -.->|"submits prepared items"| node_manager_api
node_manager_api -->|"registers routes"| node_label_routes
node_manager_api -->|"registers routes"| node_processor_routes
node_manager_api -->|"registers routes"| node_prep_routes
node_manager_api -->|"registers routes"| node_gastronorm_routes
node_manager_api -->|"registers routes"| node_recipe_routes
node_label_routes -->|"uses print service"| node_label_printer
node_label_routes -.->|"uses database"| node_db_client
node_processor_routes -->|"stores labels"| node_label_storage
node_processor_routes -->|"uses database"| node_db_client
node_processor_routes -->|"requests printing"| node_label_printer
node_ftt_app -->|"requests labels"| node_api_service
node_api_service -->|"calls label API"| node_manager_api
node_api_service -->|"returns label data"| node_label_response
node_ftt_app -->|"prints saved label"| node_label_printer_helper
node_print_queue -->|"dispatches labels"| node_label_printer_helper
node_label_printer_helper -->|"uses printer interface"| node_aidl_printer
node_manager_api -.->|"provides tracking labels"| node_ftt_app
node_ftt_app -->|"prints labels"| node_operator

click node_manager_api "https://github.com/raincor5/kitchen-system/blob/main/kitchen-manager/backend/app/main.py"
click node_label_routes "https://github.com/raincor5/kitchen-system/blob/main/kitchen-manager/backend/app/api/labels.py"
click node_processor_routes "https://github.com/raincor5/kitchen-system/blob/main/kitchen-manager/backend/app/api/label_processor.py"
click node_label_storage "https://github.com/raincor5/kitchen-system/blob/main/kitchen-manager/backend/app/services/label_storage.py"
click node_db_client "https://github.com/raincor5/kitchen-system/blob/main/kitchen-manager/backend/app/services/db_client.py"
click node_label_printer "https://github.com/raincor5/kitchen-system/blob/main/kitchen-manager/backend/app/services/label_printer.py"
click node_prep_routes "https://github.com/raincor5/kitchen-system/blob/main/kitchen-manager/backend/app/api/prep_tracking.py"
click node_gastronorm_routes "https://github.com/raincor5/kitchen-system/blob/main/kitchen-manager/backend/app/api/gastronorm.py"
click node_recipe_routes "https://github.com/raincor5/kitchen-system/blob/main/kitchen-manager/backend/app/api/recipe_processor.py"
click node_ftt_app "https://github.com/raincor5/kitchen-system/blob/main/ftt-frontend/fft-android/app/src/main/java/com/fft/kitchen/LabelManagerActivity.kt"
click node_api_service "https://github.com/raincor5/kitchen-system/blob/main/ftt-frontend/fft-android/app/src/main/java/com/fft/kitchen/data/ApiService.kt"
click node_label_response "https://github.com/raincor5/kitchen-system/blob/main/ftt-frontend/fft-android/app/src/main/java/com/fft/kitchen/LabelResponse.kt"
click node_print_queue "https://github.com/raincor5/kitchen-system/blob/main/ftt-frontend/fft-android/app/src/main/java/com/fft/kitchen/services/LabelPrintingService.kt"
click node_label_printer_helper "https://github.com/raincor5/kitchen-system/blob/main/ftt-frontend/fft-android/app/src/main/java/com/fft/kitchen/printer/LabelPrinterHelper.java"
click node_aidl_printer "https://github.com/raincor5/kitchen-system/blob/main/ftt-frontend/fft-android/app/src/main/java/com/fft/kitchen/printer/AidlPrinterHelper.java"
click node_prep_app "https://github.com/raincor5/kitchen-system/blob/main/prep-tracker/app/advanced-mode/index.tsx"
click node_prep_context "https://github.com/raincor5/kitchen-system/blob/main/prep-tracker/context/DishesContext.tsx"
click node_tray_app "https://github.com/raincor5/kitchen-system/blob/main/prep-tracker/app/gn-organizer/index.tsx"
click node_tray_client "https://github.com/raincor5/kitchen-system/blob/main/prep-tracker/app/services/gastronormService.ts"
click node_recipe_web "https://github.com/raincor5/kitchen-system/blob/main/recipe-upscaler/calculator/src/App.js"
click node_recipe_builder "https://github.com/raincor5/kitchen-system/blob/main/recipe-upscaler/calculator/src/RecipeBuilder.js"
click node_recipe_scaler "https://github.com/raincor5/kitchen-system/blob/main/recipe-upscaler/calculator/src/RecipeUpscaler.js"
click node_recipe_preview "https://github.com/raincor5/kitchen-system/blob/main/recipe-upscaler/calculator/src/RecipePreview.js"
click node_recipe_backend "https://github.com/raincor5/kitchen-system/blob/main/recipe-upscaler/backend/server.mjs"
click node_recipe_mobile "https://github.com/raincor5/kitchen-system/blob/main/recipe-upscaler/calculator-cross/app/(tabs)/index.tsx"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_manager_api,node_label_routes,node_processor_routes,node_label_storage,node_db_client,node_label_printer,node_prep_routes,node_gastronorm_routes,node_recipe_routes toneBlue
class node_ftt_app,node_api_service,node_label_response,node_print_queue,node_label_printer_helper,node_aidl_printer toneAmber
class node_prep_app,node_prep_context,node_tray_app,node_tray_client toneMint
class node_recipe_web,node_recipe_builder,node_recipe_scaler,node_recipe_preview,node_recipe_backend,node_recipe_mobile toneRose
class node_operator toneIndigo
```

## Components

### Kitchen Manager

- [API application](https://github.com/raincor5/kitchen-system/blob/main/kitchen-manager/backend/app/main.py): `kitchen-manager/backend/app/main.py`
- [Label endpoints](https://github.com/raincor5/kitchen-system/blob/main/kitchen-manager/backend/app/api/labels.py): `kitchen-manager/backend/app/api/labels.py`
- [Label processor](https://github.com/raincor5/kitchen-system/blob/main/kitchen-manager/backend/app/api/label_processor.py): `kitchen-manager/backend/app/api/label_processor.py`
- [Label storage](https://github.com/raincor5/kitchen-system/blob/main/kitchen-manager/backend/app/services/label_storage.py): `kitchen-manager/backend/app/services/label_storage.py`
- [Database client](https://github.com/raincor5/kitchen-system/blob/main/kitchen-manager/backend/app/services/db_client.py): `kitchen-manager/backend/app/services/db_client.py`
- [Print service](https://github.com/raincor5/kitchen-system/blob/main/kitchen-manager/backend/app/services/label_printer.py): `kitchen-manager/backend/app/services/label_printer.py`
- [Prep tracking API](https://github.com/raincor5/kitchen-system/blob/main/kitchen-manager/backend/app/api/prep_tracking.py): `kitchen-manager/backend/app/api/prep_tracking.py`
- [Tray API](https://github.com/raincor5/kitchen-system/blob/main/kitchen-manager/backend/app/api/gastronorm.py): `kitchen-manager/backend/app/api/gastronorm.py`
- [Recipe API](https://github.com/raincor5/kitchen-system/blob/main/kitchen-manager/backend/app/api/recipe_processor.py): `kitchen-manager/backend/app/api/recipe_processor.py`

### Food Traceability

- [Android app](https://github.com/raincor5/kitchen-system/blob/main/ftt-frontend/fft-android/app/src/main/java/com/fft/kitchen/LabelManagerActivity.kt): `ftt-frontend/fft-android/app/src/main/java/com/fft/kitchen/LabelManagerActivity.kt`
- [Label API client](https://github.com/raincor5/kitchen-system/blob/main/ftt-frontend/fft-android/app/src/main/java/com/fft/kitchen/data/ApiService.kt): `ftt-frontend/fft-android/app/src/main/java/com/fft/kitchen/data/ApiService.kt`
- [Label data](https://github.com/raincor5/kitchen-system/blob/main/ftt-frontend/fft-android/app/src/main/java/com/fft/kitchen/LabelResponse.kt): `ftt-frontend/fft-android/app/src/main/java/com/fft/kitchen/LabelResponse.kt`
- [Print queue](https://github.com/raincor5/kitchen-system/blob/main/ftt-frontend/fft-android/app/src/main/java/com/fft/kitchen/services/LabelPrintingService.kt): `ftt-frontend/fft-android/app/src/main/java/com/fft/kitchen/services/LabelPrintingService.kt`
- [Label printer](https://github.com/raincor5/kitchen-system/blob/main/ftt-frontend/fft-android/app/src/main/java/com/fft/kitchen/printer/LabelPrinterHelper.java): `ftt-frontend/fft-android/app/src/main/java/com/fft/kitchen/printer/LabelPrinterHelper.java`
- [Printer interface](https://github.com/raincor5/kitchen-system/blob/main/ftt-frontend/fft-android/app/src/main/java/com/fft/kitchen/printer/AidlPrinterHelper.java): `ftt-frontend/fft-android/app/src/main/java/com/fft/kitchen/printer/AidlPrinterHelper.java`

### Prep Tracking

- [Prep tracker app](https://github.com/raincor5/kitchen-system/blob/main/prep-tracker/app/advanced-mode/index.tsx): `prep-tracker/app/advanced-mode/index.tsx`
- [Prep state](https://github.com/raincor5/kitchen-system/blob/main/prep-tracker/context/DishesContext.tsx): `prep-tracker/context/DishesContext.tsx`
- [Tray organizer](https://github.com/raincor5/kitchen-system/blob/main/prep-tracker/app/gn-organizer/index.tsx): `prep-tracker/app/gn-organizer/index.tsx`
- [Tray API client](https://github.com/raincor5/kitchen-system/blob/main/prep-tracker/app/services/gastronormService.ts): `prep-tracker/app/services/gastronormService.ts`

### Recipe Upscaler

- [Recipe web app](https://github.com/raincor5/kitchen-system/blob/main/recipe-upscaler/calculator/src/App.js): `recipe-upscaler/calculator/src/App.js`
- [Recipe builder](https://github.com/raincor5/kitchen-system/blob/main/recipe-upscaler/calculator/src/RecipeBuilder.js): `recipe-upscaler/calculator/src/RecipeBuilder.js`
- [Recipe scaler](https://github.com/raincor5/kitchen-system/blob/main/recipe-upscaler/calculator/src/RecipeUpscaler.js): `recipe-upscaler/calculator/src/RecipeUpscaler.js`
- [Recipe preview](https://github.com/raincor5/kitchen-system/blob/main/recipe-upscaler/calculator/src/RecipePreview.js): `recipe-upscaler/calculator/src/RecipePreview.js`
- [Recipe backend](https://github.com/raincor5/kitchen-system/blob/main/recipe-upscaler/backend/server.mjs): `recipe-upscaler/backend/server.mjs`
- [Recipe mobile app](https://github.com/raincor5/kitchen-system/blob/main/recipe-upscaler/calculator-cross/app/(tabs)/index.tsx): `recipe-upscaler/calculator-cross/app/(tabs)/index.tsx`

### Other components

- **Kitchen staff**

## Connections

- Kitchen staff → Recipe web app: creates recipe (evidence: `README.md`)
- Kitchen staff → Prep tracker app: plans preparation (evidence: `README.md`)
- Recipe web app → Recipe builder: routes to (evidence: `recipe-upscaler/calculator/src/App.js`)
- Recipe web app → Recipe scaler: routes to (evidence: `recipe-upscaler/calculator/src/App.js`)
- Recipe web app → Recipe preview: routes to (evidence: `recipe-upscaler/calculator/src/App.js`)
- Recipe web app → Recipe backend: uses recipe API
- Recipe mobile app → Recipe backend: uses recipe API
- Recipe web app → Kitchen staff: exports recipes
- Recipe mobile app → Kitchen staff: shares recipes
- Recipe web app → Prep tracker app: supplies recipes (evidence: `README.md`)
- Prep tracker app → Prep state: manages prep state
- Prep tracker app → Tray organizer: organizes trays (evidence: `README.md`)
- Tray organizer → Tray API client: requests tray data
- Tray API client → Tray API: calls tray API (evidence: `prep-tracker/app/services/gastronormService.ts`)
- Kitchen staff → Android app: scans labels (evidence: `README.md`)
- Prep tracker app → API application: submits prepared items (evidence: `README.md`)
- API application → Label endpoints: registers routes (evidence: `kitchen-manager/backend/app/main.py`)
- API application → Label processor: registers routes (evidence: `kitchen-manager/backend/app/main.py`)
- API application → Prep tracking API: registers routes (evidence: `kitchen-manager/backend/app/main.py`)
- API application → Tray API: registers routes (evidence: `kitchen-manager/backend/app/main.py`)
- API application → Recipe API: registers routes (evidence: `kitchen-manager/backend/app/main.py`)
- Label endpoints → Print service: uses print service (evidence: `kitchen-manager/backend/app/api/labels.py`)
- Label endpoints → Database client: uses database (evidence: `kitchen-manager/backend/app/api/labels.py`)
- Label processor → Label storage: stores labels (evidence: `kitchen-manager/backend/app/api/label_processor.py`)
- Label processor → Database client: uses database (evidence: `kitchen-manager/backend/app/api/label_processor.py`)
- Label processor → Print service: requests printing (evidence: `kitchen-manager/backend/app/api/label_processor.py`)
- Android app → Label API client: requests labels (evidence: `ftt-frontend/fft-android/app/src/main/java/com/fft/kitchen/LabelManagerActivity.kt`)
- Label API client → API application: calls label API (evidence: `ftt-frontend/fft-android/app/src/main/java/com/fft/kitchen/data/ApiService.kt`)
- Label API client → Label data: returns label data (evidence: `ftt-frontend/fft-android/app/src/main/java/com/fft/kitchen/data/ApiService.kt`)
- Android app → Label printer: prints saved label (evidence: `ftt-frontend/fft-android/app/src/main/java/com/fft/kitchen/LabelManagerActivity.kt`)
- Print queue → Label printer: dispatches labels (evidence: `ftt-frontend/fft-android/app/src/main/java/com/fft/kitchen/services/LabelPrintingService.kt`)
- Label printer → Printer interface: uses printer interface (evidence: `ftt-frontend/fft-android/app/src/main/java/com/fft/kitchen/printer/LabelPrinterHelper.java`)
- API application → Android app: provides tracking labels (evidence: `README.md`)
- Android app → Kitchen staff: prints labels (evidence: `README.md`)
