# res-studio/res-studio architecture

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

- Interactive diagram: https://gitdiagram.com/res-studio/res-studio
- Repository: https://github.com/res-studio/res-studio

## Overview

RES Studio is a local-first website asset inspector: a user submits a target, the API captures assets through bounded HTTP or optional browser capture, then supports deeper discovery, analysis, and export. The repository also contains a distinct Java-mod-to-Bedrock conversion capability. Edges reflect shown calls, indexed references, or README statements; some analysis and export internals are not shown in the excerpts.

Main entry points: [`server.py`](https://github.com/res-studio/res-studio/blob/main/server.py) (API and static scan), [`bedrock_converter.py`](https://github.com/res-studio/res-studio/blob/main/bedrock_converter.py) (Static pack conversion), [`deep_scan.py`](https://github.com/res-studio/res-studio/blob/main/deep_scan.py) (Recursive discovery), [`playwright_scan.py`](https://github.com/res-studio/res-studio/blob/main/playwright_scan.py) (Playwright capture)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_capture["Web capture"]
  node_api["API and static scan<br/>[server.py]"]
  node_http["Pinned HTTP transport<br/>[server.py]"]
  node_curl["curl fallback<br/>[curl_transport.py]"]
  node_deep["Recursive discovery<br/>[deep_scan.py]"]
  node_jobs[("Background scan jobs<br/>[deep_jobs.py]")]
  node_browser["Playwright capture<br/>[playwright_scan.py]"]
  node_isolated["Isolated browser broker"]
  node_worker["Chromium worker<br/>[chromium_worker.py]"]
end

subgraph group_analysis["Inspection and export"]
  node_assets["Captured assets<br/>[server.py]"]
  node_js["JavaScript analysis<br/>[engine.mjs]"]
  node_exports["ZIP and JSON export<br/>[server.py]"]
end

subgraph group_integration["Local integrations"]
  node_mcp["MCP adapter<br/>[mcp_server.py]"]
end

subgraph group_conversion["Bedrock conversion"]
  node_java["Mod archive inspection"]
  node_converter["Static pack conversion"]
  node_recipes["Recipe mapping<br/>[bedrock_recipes.py]"]
  node_items["Item mapping<br/>[bedrock_items.py]"]
  node_blocks["Block mapping<br/>[bedrock_blocks.py]"]
end

node_user(("Local user"))

node_user -->|"submits target"| node_api
node_api -->|"fetches assets"| node_http
node_api -->|"falls back"| node_curl
node_api -->|"starts discovery"| node_deep
node_jobs -->|"runs discovery"| node_deep
node_api -->|"manages jobs"| node_jobs
node_browser -->|"fetches resources"| node_http
node_api -->|"starts capture"| node_isolated
node_isolated -->|"launches worker"| node_worker
node_http -->|"returns content"| node_assets
node_deep -->|"collects files"| node_assets
node_browser -->|"returns capture"| node_assets
node_assets -.->|"analyzed by"| node_js
node_api -.->|"exports findings"| node_exports
node_mcp -.->|"uses API"| node_api
node_user -.->|"provides JAR"| node_converter
node_converter -->|"inspects archive"| node_java
node_converter -->|"maps recipes"| node_recipes
node_converter -->|"maps items"| node_items
node_converter -->|"maps blocks"| node_blocks

click node_api "https://github.com/res-studio/res-studio/blob/main/server.py"
click node_http "https://github.com/res-studio/res-studio/blob/main/server.py"
click node_curl "https://github.com/res-studio/res-studio/blob/main/curl_transport.py"
click node_deep "https://github.com/res-studio/res-studio/blob/main/deep_scan.py"
click node_jobs "https://github.com/res-studio/res-studio/blob/main/deep_jobs.py"
click node_browser "https://github.com/res-studio/res-studio/blob/main/playwright_scan.py"
click node_isolated "https://github.com/res-studio/res-studio/blob/main/isolated_chromium.py"
click node_worker "https://github.com/res-studio/res-studio/blob/main/chromium_worker.py"
click node_assets "https://github.com/res-studio/res-studio/blob/main/server.py"
click node_js "https://github.com/res-studio/res-studio/blob/main/engine.mjs"
click node_exports "https://github.com/res-studio/res-studio/blob/main/server.py"
click node_mcp "https://github.com/res-studio/res-studio/blob/main/mcp_server.py"
click node_java "https://github.com/res-studio/res-studio/blob/main/java_mod_analyzer.py"
click node_converter "https://github.com/res-studio/res-studio/blob/main/bedrock_converter.py"
click node_recipes "https://github.com/res-studio/res-studio/blob/main/bedrock_recipes.py"
click node_items "https://github.com/res-studio/res-studio/blob/main/bedrock_items.py"
click node_blocks "https://github.com/res-studio/res-studio/blob/main/bedrock_blocks.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_api,node_http,node_curl,node_deep,node_jobs,node_browser,node_isolated,node_worker,node_user toneBlue
class node_assets,node_js,node_exports toneAmber
class node_mcp toneMint
class node_java,node_converter,node_recipes,node_items,node_blocks toneRose
```

## Components

### Web capture

- [API and static scan](https://github.com/res-studio/res-studio/blob/main/server.py): `server.py`
- [Pinned HTTP transport](https://github.com/res-studio/res-studio/blob/main/server.py): `server.py`
- [curl fallback](https://github.com/res-studio/res-studio/blob/main/curl_transport.py): `curl_transport.py`
- [Recursive discovery](https://github.com/res-studio/res-studio/blob/main/deep_scan.py): `deep_scan.py`
- [Background scan jobs](https://github.com/res-studio/res-studio/blob/main/deep_jobs.py): `deep_jobs.py`
- [Playwright capture](https://github.com/res-studio/res-studio/blob/main/playwright_scan.py): `playwright_scan.py`
- [Isolated browser broker](https://github.com/res-studio/res-studio/blob/main/isolated_chromium.py): `isolated_chromium.py`
- [Chromium worker](https://github.com/res-studio/res-studio/blob/main/chromium_worker.py): `chromium_worker.py`

### Inspection and export

- [Captured assets](https://github.com/res-studio/res-studio/blob/main/server.py): `server.py`
- [JavaScript analysis](https://github.com/res-studio/res-studio/blob/main/engine.mjs): `engine.mjs`
- [ZIP and JSON export](https://github.com/res-studio/res-studio/blob/main/server.py): `server.py`

### Local integrations

- [MCP adapter](https://github.com/res-studio/res-studio/blob/main/mcp_server.py): `mcp_server.py`

### Bedrock conversion

- [Mod archive inspection](https://github.com/res-studio/res-studio/blob/main/java_mod_analyzer.py): `java_mod_analyzer.py`
- [Static pack conversion](https://github.com/res-studio/res-studio/blob/main/bedrock_converter.py): `bedrock_converter.py`
- [Recipe mapping](https://github.com/res-studio/res-studio/blob/main/bedrock_recipes.py): `bedrock_recipes.py`
- [Item mapping](https://github.com/res-studio/res-studio/blob/main/bedrock_items.py): `bedrock_items.py`
- [Block mapping](https://github.com/res-studio/res-studio/blob/main/bedrock_blocks.py): `bedrock_blocks.py`

### Other components

- **Local user**

## Connections

- Local user → API and static scan: submits target (evidence: `README.md`)
- API and static scan → Pinned HTTP transport: fetches assets (evidence: `server.py`)
- API and static scan → curl fallback: falls back (evidence: `server.py`)
- API and static scan → Recursive discovery: starts discovery (evidence: `server.py`)
- Background scan jobs → Recursive discovery: runs discovery (evidence: `deep_jobs.py`)
- API and static scan → Background scan jobs: manages jobs (evidence: `server.py`)
- Playwright capture → Pinned HTTP transport: fetches resources (evidence: `playwright_scan.py`)
- API and static scan → Isolated browser broker: starts capture (evidence: `README.md`)
- Isolated browser broker → Chromium worker: launches worker (evidence: `README.md`)
- Pinned HTTP transport → Captured assets: returns content (evidence: `server.py`)
- Recursive discovery → Captured assets: collects files (evidence: `deep_scan.py`)
- Playwright capture → Captured assets: returns capture (evidence: `playwright_scan.py`)
- Captured assets → JavaScript analysis: analyzed by (evidence: `README.md`)
- API and static scan → ZIP and JSON export: exports findings (evidence: `README.md`)
- MCP adapter → API and static scan: uses API (evidence: `README.md`)
- Local user → Static pack conversion: provides JAR (evidence: `README.md`)
- Static pack conversion → Mod archive inspection: inspects archive (evidence: `bedrock_converter.py`)
- Static pack conversion → Recipe mapping: maps recipes (evidence: `bedrock_converter.py`)
- Static pack conversion → Item mapping: maps items (evidence: `bedrock_converter.py`)
- Static pack conversion → Block mapping: maps blocks (evidence: `bedrock_converter.py`)
