# youshum1tsy/skyblock_crafter_flipper architecture

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

- Interactive diagram: https://gitdiagram.com/youshum1tsy/skyblock_crafter_flipper
- Repository: https://github.com/youshum1tsy/skyblock_crafter_flipper

## Overview

This is a Hypixel SkyBlock crafting-profit analyzer. Its main workflow loads item recipes, expands a target craft into ingredient costs, retrieves cached or live market and item-registry data, then estimates cost, revenue, profit, and ROI. The source shows recipe-cycle handling, Bazaar and auction pricing, tax and safety adjustments, and filtering non-auctionable items. The map follows calls visible in the excerpts; unsampled modules and undocumented relationships are omitted.

Main entry points: [`main.py`](https://github.com/youshum1tsy/skyblock_crafter_flipper/blob/main/main.py) (Workflow runner), [`src/api.py`](https://github.com/youshum1tsy/skyblock_crafter_flipper/blob/main/src/api.py) (Recipe fetch), [`src/data_manager.py`](https://github.com/youshum1tsy/skyblock_crafter_flipper/blob/main/src/data_manager.py) (ETag cache), [`src/calculator.py`](https://github.com/youshum1tsy/skyblock_crafter_flipper/blob/main/src/calculator.py) (Cycle detection)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Craft workflow"]
  node_runner["Workflow runner<br/>[main.py]"]
  node_craft_graph["Cycle detection<br/>[calculator.py]"]
  node_craft_cost["Cost expansion<br/>[calculator.py]"]
end

subgraph group_recipes["Recipe data"]
  node_recipe_api["Recipe fetch<br/>[api.py]"]
  node_recipe_store[("Recipe files<br/>[data_manager.py]")]
  node_etag[("ETag cache<br/>[data_manager.py]")]
end

subgraph group_markets["Market data"]
  node_market_client["Hypixel client<br/>[api.py]"]
  node_ah_fetch["Auction fetch<br/>[api.py]"]
  node_market_cache[("Price cache<br/>[data_manager.py]")]
  node_registry["Item registry<br/>[data_manager.py]"]
end

subgraph group_analysis["Profit analysis"]
  node_valuation["Profit evaluator<br/>[main.py]"]
  node_report["Console result<br/>[main.py]"]
end

node_user(("Analyst"))
node_github["NEU repository"]
node_hypixel["Hypixel API"]
node_cofl["Coflnet prices"]

node_user -->|"runs"| node_runner
node_runner -->|"fetches recipes"| node_recipe_api
node_runner -->|"reads ETag"| node_etag
node_recipe_api -->|"downloads archive"| node_github
node_runner -->|"unpacks or loads"| node_recipe_store
node_recipe_api -->|"returns archive"| node_runner
node_runner -->|"writes ETag"| node_etag
node_runner -->|"finds cycles"| node_craft_graph
node_runner -->|"calculates ingredients"| node_craft_cost
node_runner -->|"fetches auction prices"| node_ah_fetch
node_ah_fetch -->|"requests prices"| node_cofl
node_runner -->|"creates client"| node_market_client
node_market_client -->|"requests market data"| node_hypixel
node_runner -->|"loads or saves prices"| node_market_cache
node_runner -->|"loads and filters items"| node_registry
node_runner -->|"provides costs and prices"| node_valuation
node_valuation -->|"prints results"| node_report

click node_runner "https://github.com/youshum1tsy/skyblock_crafter_flipper/blob/main/main.py"
click node_recipe_api "https://github.com/youshum1tsy/skyblock_crafter_flipper/blob/main/src/api.py"
click node_recipe_store "https://github.com/youshum1tsy/skyblock_crafter_flipper/blob/main/src/data_manager.py"
click node_etag "https://github.com/youshum1tsy/skyblock_crafter_flipper/blob/main/src/data_manager.py"
click node_craft_graph "https://github.com/youshum1tsy/skyblock_crafter_flipper/blob/main/src/calculator.py"
click node_craft_cost "https://github.com/youshum1tsy/skyblock_crafter_flipper/blob/main/src/calculator.py"
click node_market_client "https://github.com/youshum1tsy/skyblock_crafter_flipper/blob/main/src/api.py"
click node_ah_fetch "https://github.com/youshum1tsy/skyblock_crafter_flipper/blob/main/src/api.py"
click node_market_cache "https://github.com/youshum1tsy/skyblock_crafter_flipper/blob/main/src/data_manager.py"
click node_registry "https://github.com/youshum1tsy/skyblock_crafter_flipper/blob/main/src/data_manager.py"
click node_valuation "https://github.com/youshum1tsy/skyblock_crafter_flipper/blob/main/main.py"
click node_report "https://github.com/youshum1tsy/skyblock_crafter_flipper/blob/main/main.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_runner,node_craft_graph,node_craft_cost toneBlue
class node_recipe_api,node_recipe_store,node_etag toneAmber
class node_market_client,node_ah_fetch,node_market_cache,node_registry,node_hypixel toneMint
class node_valuation,node_report toneRose
class node_user,node_github,node_cofl toneIndigo
```

## Components

### Craft workflow

- [Workflow runner](https://github.com/youshum1tsy/skyblock_crafter_flipper/blob/main/main.py): `main.py`
- [Cycle detection](https://github.com/youshum1tsy/skyblock_crafter_flipper/blob/main/src/calculator.py): `src/calculator.py`
- [Cost expansion](https://github.com/youshum1tsy/skyblock_crafter_flipper/blob/main/src/calculator.py): `src/calculator.py`

### Recipe data

- [Recipe fetch](https://github.com/youshum1tsy/skyblock_crafter_flipper/blob/main/src/api.py): `src/api.py`
- [Recipe files](https://github.com/youshum1tsy/skyblock_crafter_flipper/blob/main/src/data_manager.py): `src/data_manager.py`
- [ETag cache](https://github.com/youshum1tsy/skyblock_crafter_flipper/blob/main/src/data_manager.py): `src/data_manager.py`

### Market data

- [Hypixel client](https://github.com/youshum1tsy/skyblock_crafter_flipper/blob/main/src/api.py): `src/api.py`
- [Auction fetch](https://github.com/youshum1tsy/skyblock_crafter_flipper/blob/main/src/api.py): `src/api.py`
- [Price cache](https://github.com/youshum1tsy/skyblock_crafter_flipper/blob/main/src/data_manager.py): `src/data_manager.py`
- [Item registry](https://github.com/youshum1tsy/skyblock_crafter_flipper/blob/main/src/data_manager.py): `src/data_manager.py`

### Profit analysis

- [Profit evaluator](https://github.com/youshum1tsy/skyblock_crafter_flipper/blob/main/main.py): `main.py`
- [Console result](https://github.com/youshum1tsy/skyblock_crafter_flipper/blob/main/main.py): `main.py`

### Other components

- **Analyst**
- **NEU repository**
- **Hypixel API**
- **Coflnet prices**

## Connections

- Analyst → Workflow runner: runs
- Workflow runner → Recipe fetch: fetches recipes (evidence: `main.py`)
- Workflow runner → ETag cache: reads ETag (evidence: `main.py`)
- Recipe fetch → NEU repository: downloads archive (evidence: `src/api.py`)
- Workflow runner → Recipe files: unpacks or loads (evidence: `main.py`)
- Recipe fetch → Workflow runner: returns archive (evidence: `main.py`)
- Workflow runner → ETag cache: writes ETag (evidence: `main.py`)
- Workflow runner → Cycle detection: finds cycles (evidence: `main.py`)
- Workflow runner → Cost expansion: calculates ingredients (evidence: `main.py`)
- Workflow runner → Auction fetch: fetches auction prices (evidence: `main.py`)
- Auction fetch → Coflnet prices: requests prices (evidence: `src/api.py`)
- Workflow runner → Hypixel client: creates client (evidence: `main.py`)
- Hypixel client → Hypixel API: requests market data (evidence: `src/api.py`)
- Workflow runner → Price cache: loads or saves prices (evidence: `main.py`)
- Workflow runner → Item registry: loads and filters items (evidence: `main.py`)
- Workflow runner → Profit evaluator: provides costs and prices (evidence: `main.py`)
- Profit evaluator → Console result: prints results (evidence: `main.py`)
