# tomas478/oro architecture

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

- Interactive diagram: https://gitdiagram.com/tomas478/oro
- Repository: https://github.com/tomas478/oro

## Overview

This is a single-file shopping assistant: it represents a customer’s request, evaluates catalog products against requirements and budget, and can add a selected product to a cart. The excerpts show order, catalog, matching, filtering, judging, and cart-decision responsibilities, but omit the program entry point and much of their wiring. Edges therefore include only calls visible in the excerpts; the store API is represented as an external service.

Main entry points: [`agent.py`](https://github.com/tomas478/oro/blob/main/agent.py) (Cart Decision)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_request["Request Modeling"]
  node_order["Order<br/>[agent.py]"]
end

subgraph group_evaluation["Product Evaluation"]
  node_catalog["Product Catalog<br/>[agent.py]"]
  node_text["Text Matching<br/>[agent.py]"]
  node_matcher["Requirement Matcher<br/>[agent.py]"]
  node_sieve["Candidate Sieve<br/>[agent.py]"]
  node_judge["Product Judge<br/>[agent.py]"]
end

subgraph group_commerce["Cart Operations"]
  node_cart_decision["Cart Decision<br/>[agent.py]"]
  node_session["Store Session<br/>[agent.py]"]
end

node_customer(("Customer"))
node_store["Store API"]

node_customer -.->|"provides request"| node_order
node_cart_decision -->|"settles ranking"| node_judge
node_cart_decision -->|"filters candidates"| node_sieve
node_cart_decision -->|"checks cart"| node_catalog
node_cart_decision -->|"checks session"| node_session
node_cart_decision -->|"adds product"| node_store

click node_order "https://github.com/tomas478/oro/blob/main/agent.py"
click node_catalog "https://github.com/tomas478/oro/blob/main/agent.py"
click node_text "https://github.com/tomas478/oro/blob/main/agent.py"
click node_matcher "https://github.com/tomas478/oro/blob/main/agent.py"
click node_sieve "https://github.com/tomas478/oro/blob/main/agent.py"
click node_judge "https://github.com/tomas478/oro/blob/main/agent.py"
click node_cart_decision "https://github.com/tomas478/oro/blob/main/agent.py"
click node_session "https://github.com/tomas478/oro/blob/main/agent.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_order toneBlue
class node_catalog,node_text,node_matcher,node_sieve,node_judge toneAmber
class node_cart_decision,node_session,node_store toneMint
class node_customer toneIndigo
```

## Components

### Request Modeling

- [Order](https://github.com/tomas478/oro/blob/main/agent.py): `agent.py`

### Product Evaluation

- [Product Catalog](https://github.com/tomas478/oro/blob/main/agent.py): `agent.py`
- [Text Matching](https://github.com/tomas478/oro/blob/main/agent.py): `agent.py`
- [Requirement Matcher](https://github.com/tomas478/oro/blob/main/agent.py): `agent.py`
- [Candidate Sieve](https://github.com/tomas478/oro/blob/main/agent.py): `agent.py`
- [Product Judge](https://github.com/tomas478/oro/blob/main/agent.py): `agent.py`

### Cart Operations

- [Cart Decision](https://github.com/tomas478/oro/blob/main/agent.py): `agent.py`
- [Store Session](https://github.com/tomas478/oro/blob/main/agent.py): `agent.py`

### Other components

- **Customer**
- **Store API**

## Connections

- Customer → Order: provides request
- Cart Decision → Product Judge: settles ranking (evidence: `agent.py`)
- Cart Decision → Candidate Sieve: filters candidates (evidence: `agent.py`)
- Cart Decision → Product Catalog: checks cart (evidence: `agent.py`)
- Cart Decision → Store Session: checks session (evidence: `agent.py`)
- Cart Decision → Store API: adds product (evidence: `agent.py`)
