# gorgiko/orders-extract architecture

> Architecture diagram of the GitHub repository gorgiko/orders-extract, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/gorgiko/orders-extract
- Repository: https://github.com/gorgiko/orders-extract

## Overview

Orders Extractor is a Streamlit app for asking questions about invoice images. A user uploads an image and enters a prompt; on submission, the app packages the image and sends it with the invoice-specific instructions and prompt to Gemini, then displays Gemini’s response. The workflow is implemented in one file, so the components share a source path. The graph reflects only the sampled app code; the README provides no additional capability details.

Main entry points: [`app.py`](https://github.com/gorgiko/orders-extract/blob/main/app.py) (Streamlit interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("Invoice user"))
node_interface["Streamlit interface<br/>[app.py]"]
node_image_prep["Image preparation<br/>[app.py]"]
node_gemini["Gemini model"]
node_answer["Answer display<br/>[app.py]"]

node_user -->|"uploads and prompts"| node_interface
node_interface -->|"packages image"| node_image_prep
node_interface -->|"sends query"| node_gemini
node_gemini -->|"returns response"| node_answer

click node_interface "https://github.com/gorgiko/orders-extract/blob/main/app.py"
click node_image_prep "https://github.com/gorgiko/orders-extract/blob/main/app.py"
click node_answer "https://github.com/gorgiko/orders-extract/blob/main/app.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_user toneBlue
class node_interface,node_image_prep,node_answer toneTeal
class node_gemini toneIndigo
```

## Components

### Other components

- **Invoice user**
- [Streamlit interface](https://github.com/gorgiko/orders-extract/blob/main/app.py): `app.py`
- [Image preparation](https://github.com/gorgiko/orders-extract/blob/main/app.py): `app.py`
- **Gemini model**
- [Answer display](https://github.com/gorgiko/orders-extract/blob/main/app.py): `app.py`

## Connections

- Invoice user → Streamlit interface: uploads and prompts (evidence: `app.py`)
- Streamlit interface → Image preparation: packages image (evidence: `app.py`)
- Streamlit interface → Gemini model: sends query (evidence: `app.py`)
- Gemini model → Answer display: returns response (evidence: `app.py`)
