# mprcompanygithub/offline-recipe-generator architecture

> Architecture diagram of the GitHub repository mprcompanygithub/offline-recipe-generator, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mprcompanygithub/offline-recipe-generator
- Repository: https://github.com/mprcompanygithub/offline-recipe-generator

## Overview

This is a small recipe-generation application: a user supplies ingredients, the backend asks a local Ollama-compatible model for a recipe, and the backend returns the generated text. The sampled backend shows the model request and response handling. The tree also contains a website file, but its contents were not sampled, so its connection to the API is shown as unverified. The text file’s role is unclear and is not mapped as a runtime component.

Main entry points: [`Task1Backend.py`](https://github.com/mprcompanygithub/offline-recipe-generator/blob/main/Task1Backend.py) (Recipe API), [`website.html`](https://github.com/mprcompanygithub/offline-recipe-generator/blob/main/website.html) (Website)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User interface"]
  node_website["Website<br/>[website.html]"]
end

subgraph group_generation["Recipe generation"]
  node_api["Recipe API<br/>[Task1Backend.py]"]
  node_recipe["Recipe response<br/>[Task1Backend.py]"]
end

subgraph group_external["Local model"]
  node_model["Ollama model"]
end

node_user(("User"))

node_user -.->|"enters ingredients"| node_website
node_website -.->|"submits request"| node_api
node_api -->|"requests generation"| node_model
node_model -->|"streams response"| node_api
node_api -->|"returns recipe"| node_recipe
node_recipe -.->|"delivers result"| node_user

click node_website "https://github.com/mprcompanygithub/offline-recipe-generator/blob/main/website.html"
click node_api "https://github.com/mprcompanygithub/offline-recipe-generator/blob/main/Task1Backend.py"
click node_recipe "https://github.com/mprcompanygithub/offline-recipe-generator/blob/main/Task1Backend.py"

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_website,node_user toneBlue
class node_api,node_recipe toneAmber
class node_model toneMint
```

## Components

### User interface

- [Website](https://github.com/mprcompanygithub/offline-recipe-generator/blob/main/website.html): `website.html`

### Recipe generation

- [Recipe API](https://github.com/mprcompanygithub/offline-recipe-generator/blob/main/Task1Backend.py): `Task1Backend.py`
- [Recipe response](https://github.com/mprcompanygithub/offline-recipe-generator/blob/main/Task1Backend.py): `Task1Backend.py`

### Local model

- **Ollama model**

### Other components

- **User**

## Connections

- User → Website: enters ingredients
- Website → Recipe API: submits request
- Recipe API → Ollama model: requests generation (evidence: `Task1Backend.py`)
- Ollama model → Recipe API: streams response (evidence: `Task1Backend.py`)
- Recipe API → Recipe response: returns recipe (evidence: `Task1Backend.py`)
- Recipe response → User: delivers result
