# traker/hytaleassetstudio architecture

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

- Interactive diagram: https://gitdiagram.com/traker/hytaleassetstudio
- Repository: https://github.com/traker/hytaleassetstudio

## Overview

Hytale Asset Studio is a local visual editor for asset packs. Users open a workspace, select or create a project, inspect layered assets in graph views, edit assets or interaction trees, and save project-only overrides; project packs can also be imported and exported. The graph preserves those documented product areas while showing the sampled API, indexing, and graph-building layers. Some UI and route implementations were not sampled, so their detailed call relationships are omitted rather than inferred.

Main entry points: [`frontend/src/App.tsx`](https://github.com/traker/hytaleassetstudio/blob/main/frontend/src/App.tsx) (App shell), [`backend/app/main.py`](https://github.com/traker/hytaleassetstudio/blob/main/backend/app/main.py) (FastAPI application), [`backend/routes/projects.py`](https://github.com/traker/hytaleassetstudio/blob/main/backend/routes/projects.py) (Project routes), [`backend/core/index_service.py`](https://github.com/traker/hytaleassetstudio/blob/main/backend/core/index_service.py) (Asset index)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Studio UI"]
  node_app["App shell<br/>[App.tsx]"]
  node_workspace_ui["Workspace screens<br/>[HomePage.tsx]"]
  node_project_config_ui["Project configuration"]
  node_modified_graph_ui["Modified asset graph"]
  node_item_graph_ui["Item graph view"]
  node_interaction_ui["Interaction tree view"]
  node_asset_editor["Asset editor panel<br/>[AssetSidePanel.tsx]"]
  node_interaction_editor["Interaction editors"]
end

subgraph group_api["API boundary"]
  node_api_client["Frontend API<br/>[hasApi.ts]"]
  node_backend_api["FastAPI application<br/>[main.py]"]
  node_workspace_routes["Workspace routes<br/>[workspace.py]"]
  node_project_routes["Project routes<br/>[projects.py]"]
  node_asset_routes["Asset routes<br/>[assets.py]"]
  node_graph_routes["Graph routes<br/>[graph.py]"]
  node_interaction_routes["Interaction routes<br/>[interactions.py]"]
end

subgraph group_workspace["Workspace and packs"]
  node_workspace_service["Workspace and project service"]
  node_project_service["Project configuration<br/>[project_service.py]"]
  node_project_creation["Project creation"]
  node_pack_import["Pack import<br/>[import_service.py]"]
  node_pack_export["Pack export<br/>[export_service.py]"]
end

subgraph group_assets["Asset exploration"]
  node_virtual_fs["Layered virtual filesystem<br/>[vfs.py]"]
  node_asset_index["Asset index<br/>[index_service.py]"]
  node_graph_service["Dependency graph builder<br/>[graph_service.py]"]
  node_asset_service["Asset read and resolve<br/>[asset_service.py]"]
  node_interaction_service["Interaction tree service"]
end

subgraph group_editing["Editing and exchange"]
  node_modification_service["Project modifications"]
  node_asset_store[("Local asset files")]
end

node_user(("Studio user"))

node_user -->|"uses"| node_app
node_app -->|"renders"| node_workspace_ui
node_app -->|"renders"| node_project_config_ui
node_app -->|"renders"| node_item_graph_ui
node_app -->|"renders"| node_modified_graph_ui
node_app -->|"routes to"| node_interaction_ui
node_modified_graph_ui -->|"renders"| node_asset_editor
node_workspace_ui -->|"requests workspace"| node_api_client
node_api_client -->|"calls local API"| node_backend_api
node_backend_api -->|"registers"| node_workspace_routes
node_backend_api -->|"registers"| node_project_routes
node_backend_api -->|"registers"| node_asset_routes
node_backend_api -->|"registers"| node_graph_routes
node_backend_api -->|"registers"| node_interaction_routes
node_workspace_routes -->|"handles workspace"| node_workspace_service
node_project_routes -->|"uses workspace"| node_workspace_service
node_project_routes -->|"loads projects"| node_project_service
node_project_routes -->|"creates projects"| node_project_creation
node_project_routes -->|"imports packs"| node_pack_import
node_project_routes -->|"exports packs"| node_pack_export
node_graph_routes -->|"builds graphs"| node_graph_service
node_graph_routes -->|"ensures index"| node_asset_index
node_asset_routes -->|"reads assets"| node_asset_service
node_asset_routes -->|"records edits"| node_modification_service
node_interaction_routes -->|"serves trees"| node_interaction_service
node_graph_service -->|"ensures index"| node_asset_index
node_graph_service -->|"collects changes"| node_modification_service
node_graph_service -->|"reads layered assets"| node_virtual_fs
node_asset_service -->|"resolves paths"| node_asset_index
node_asset_service -->|"reads mounts"| node_virtual_fs
node_interaction_service -->|"reads assets"| node_asset_service
node_interaction_service -->|"uses index"| node_asset_index
node_workspace_service -->|"loads config"| node_project_service
node_project_creation -->|"uses project config"| node_project_service
node_pack_import -->|"creates target project"| node_project_creation
node_pack_import -->|"updates index"| node_asset_index
node_asset_service -->|"reads and writes"| node_asset_store
node_modification_service -->|"updates index"| node_asset_index
node_modification_service -.->|"tracks project edits"| node_asset_store
node_asset_editor -.->|"loads and saves"| node_api_client
node_interaction_editor -.->|"loads and saves"| node_api_client

click node_app "https://github.com/traker/hytaleassetstudio/blob/main/frontend/src/App.tsx"
click node_workspace_ui "https://github.com/traker/hytaleassetstudio/blob/main/frontend/src/views/HomePage.tsx"
click node_project_config_ui "https://github.com/traker/hytaleassetstudio/blob/main/frontend/src/views/ProjectConfigView.tsx"
click node_modified_graph_ui "https://github.com/traker/hytaleassetstudio/blob/main/frontend/src/views/project/ProjectModifiedGraphView.tsx"
click node_item_graph_ui "https://github.com/traker/hytaleassetstudio/blob/main/frontend/src/views/project/ProjectGraphItemsView.tsx"
click node_interaction_ui "https://github.com/traker/hytaleassetstudio/blob/main/frontend/src/views/project/ProjectGraphInteractionsView.tsx"
click node_asset_editor "https://github.com/traker/hytaleassetstudio/blob/main/frontend/src/components/editor/AssetSidePanel.tsx"
click node_interaction_editor "https://github.com/traker/hytaleassetstudio/blob/main/frontend/src/components/editor/InteractionFormPanel.tsx"
click node_api_client "https://github.com/traker/hytaleassetstudio/blob/main/frontend/src/api/hasApi.ts"
click node_backend_api "https://github.com/traker/hytaleassetstudio/blob/main/backend/app/main.py"
click node_workspace_routes "https://github.com/traker/hytaleassetstudio/blob/main/backend/routes/workspace.py"
click node_project_routes "https://github.com/traker/hytaleassetstudio/blob/main/backend/routes/projects.py"
click node_asset_routes "https://github.com/traker/hytaleassetstudio/blob/main/backend/routes/assets.py"
click node_graph_routes "https://github.com/traker/hytaleassetstudio/blob/main/backend/routes/graph.py"
click node_interaction_routes "https://github.com/traker/hytaleassetstudio/blob/main/backend/routes/interactions.py"
click node_workspace_service "https://github.com/traker/hytaleassetstudio/blob/main/backend/core/workspace_service.py"
click node_project_service "https://github.com/traker/hytaleassetstudio/blob/main/backend/core/project_service.py"
click node_project_creation "https://github.com/traker/hytaleassetstudio/blob/main/backend/core/project_create_service.py"
click node_pack_import "https://github.com/traker/hytaleassetstudio/blob/main/backend/core/import_service.py"
click node_pack_export "https://github.com/traker/hytaleassetstudio/blob/main/backend/core/export_service.py"
click node_virtual_fs "https://github.com/traker/hytaleassetstudio/blob/main/backend/core/vfs.py"
click node_asset_index "https://github.com/traker/hytaleassetstudio/blob/main/backend/core/index_service.py"
click node_graph_service "https://github.com/traker/hytaleassetstudio/blob/main/backend/core/graph_service.py"
click node_asset_service "https://github.com/traker/hytaleassetstudio/blob/main/backend/core/asset_service.py"
click node_interaction_service "https://github.com/traker/hytaleassetstudio/blob/main/backend/core/interaction_tree_service.py"
click node_modification_service "https://github.com/traker/hytaleassetstudio/blob/main/backend/core/modification_service.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_app,node_workspace_ui,node_project_config_ui,node_modified_graph_ui,node_item_graph_ui,node_interaction_ui,node_asset_editor,node_interaction_editor,node_user toneBlue
class node_api_client,node_backend_api,node_workspace_routes,node_project_routes,node_asset_routes,node_graph_routes,node_interaction_routes toneAmber
class node_workspace_service,node_project_service,node_project_creation,node_pack_import,node_pack_export toneMint
class node_virtual_fs,node_asset_index,node_graph_service,node_asset_service,node_interaction_service toneRose
class node_modification_service,node_asset_store toneIndigo
```

## Components

### Studio UI

- [App shell](https://github.com/traker/hytaleassetstudio/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Workspace screens](https://github.com/traker/hytaleassetstudio/blob/main/frontend/src/views/HomePage.tsx): `frontend/src/views/HomePage.tsx`
- [Project configuration](https://github.com/traker/hytaleassetstudio/blob/main/frontend/src/views/ProjectConfigView.tsx): `frontend/src/views/ProjectConfigView.tsx`
- [Modified asset graph](https://github.com/traker/hytaleassetstudio/blob/main/frontend/src/views/project/ProjectModifiedGraphView.tsx): `frontend/src/views/project/ProjectModifiedGraphView.tsx`
- [Item graph view](https://github.com/traker/hytaleassetstudio/blob/main/frontend/src/views/project/ProjectGraphItemsView.tsx): `frontend/src/views/project/ProjectGraphItemsView.tsx`
- [Interaction tree view](https://github.com/traker/hytaleassetstudio/blob/main/frontend/src/views/project/ProjectGraphInteractionsView.tsx): `frontend/src/views/project/ProjectGraphInteractionsView.tsx`
- [Asset editor panel](https://github.com/traker/hytaleassetstudio/blob/main/frontend/src/components/editor/AssetSidePanel.tsx): `frontend/src/components/editor/AssetSidePanel.tsx`
- [Interaction editors](https://github.com/traker/hytaleassetstudio/blob/main/frontend/src/components/editor/InteractionFormPanel.tsx): `frontend/src/components/editor/InteractionFormPanel.tsx`

### API boundary

- [Frontend API](https://github.com/traker/hytaleassetstudio/blob/main/frontend/src/api/hasApi.ts): `frontend/src/api/hasApi.ts`
- [FastAPI application](https://github.com/traker/hytaleassetstudio/blob/main/backend/app/main.py): `backend/app/main.py`
- [Workspace routes](https://github.com/traker/hytaleassetstudio/blob/main/backend/routes/workspace.py): `backend/routes/workspace.py`
- [Project routes](https://github.com/traker/hytaleassetstudio/blob/main/backend/routes/projects.py): `backend/routes/projects.py`
- [Asset routes](https://github.com/traker/hytaleassetstudio/blob/main/backend/routes/assets.py): `backend/routes/assets.py`
- [Graph routes](https://github.com/traker/hytaleassetstudio/blob/main/backend/routes/graph.py): `backend/routes/graph.py`
- [Interaction routes](https://github.com/traker/hytaleassetstudio/blob/main/backend/routes/interactions.py): `backend/routes/interactions.py`

### Workspace and packs

- [Workspace and project service](https://github.com/traker/hytaleassetstudio/blob/main/backend/core/workspace_service.py): `backend/core/workspace_service.py`
- [Project configuration](https://github.com/traker/hytaleassetstudio/blob/main/backend/core/project_service.py): `backend/core/project_service.py`
- [Project creation](https://github.com/traker/hytaleassetstudio/blob/main/backend/core/project_create_service.py): `backend/core/project_create_service.py`
- [Pack import](https://github.com/traker/hytaleassetstudio/blob/main/backend/core/import_service.py): `backend/core/import_service.py`
- [Pack export](https://github.com/traker/hytaleassetstudio/blob/main/backend/core/export_service.py): `backend/core/export_service.py`

### Asset exploration

- [Layered virtual filesystem](https://github.com/traker/hytaleassetstudio/blob/main/backend/core/vfs.py): `backend/core/vfs.py`
- [Asset index](https://github.com/traker/hytaleassetstudio/blob/main/backend/core/index_service.py): `backend/core/index_service.py`
- [Dependency graph builder](https://github.com/traker/hytaleassetstudio/blob/main/backend/core/graph_service.py): `backend/core/graph_service.py`
- [Asset read and resolve](https://github.com/traker/hytaleassetstudio/blob/main/backend/core/asset_service.py): `backend/core/asset_service.py`
- [Interaction tree service](https://github.com/traker/hytaleassetstudio/blob/main/backend/core/interaction_tree_service.py): `backend/core/interaction_tree_service.py`

### Editing and exchange

- [Project modifications](https://github.com/traker/hytaleassetstudio/blob/main/backend/core/modification_service.py): `backend/core/modification_service.py`
- **Local asset files**

### Other components

- **Studio user**

## Connections

- Studio user → App shell: uses (evidence: `README.md`)
- App shell → Workspace screens: renders (evidence: `frontend/src/App.tsx`)
- App shell → Project configuration: renders (evidence: `frontend/src/App.tsx`)
- App shell → Item graph view: renders (evidence: `frontend/src/App.tsx`)
- App shell → Modified asset graph: renders (evidence: `frontend/src/App.tsx`)
- App shell → Interaction tree view: routes to (evidence: `frontend/src/App.tsx`)
- Modified asset graph → Asset editor panel: renders (evidence: `frontend/src/views/project/ProjectModifiedGraphView.tsx`)
- Workspace screens → Frontend API: requests workspace (evidence: `frontend/src/views/HomePage.tsx`)
- Frontend API → FastAPI application: calls local API (evidence: `README.md`)
- FastAPI application → Workspace routes: registers (evidence: `backend/app/main.py`)
- FastAPI application → Project routes: registers (evidence: `backend/app/main.py`)
- FastAPI application → Asset routes: registers (evidence: `backend/app/main.py`)
- FastAPI application → Graph routes: registers (evidence: `backend/app/main.py`)
- FastAPI application → Interaction routes: registers (evidence: `backend/app/main.py`)
- Workspace routes → Workspace and project service: handles workspace
- Project routes → Workspace and project service: uses workspace (evidence: `backend/routes/projects.py`)
- Project routes → Project configuration: loads projects (evidence: `backend/routes/projects.py`)
- Project routes → Project creation: creates projects (evidence: `backend/routes/projects.py`)
- Project routes → Pack import: imports packs (evidence: `backend/routes/projects.py`)
- Project routes → Pack export: exports packs (evidence: `backend/routes/projects.py`)
- Graph routes → Dependency graph builder: builds graphs (evidence: `backend/routes/graph.py`)
- Graph routes → Asset index: ensures index (evidence: `backend/routes/graph.py`)
- Asset routes → Asset read and resolve: reads assets (evidence: `backend/routes/assets.py`)
- Asset routes → Project modifications: records edits (evidence: `backend/routes/assets.py`)
- Interaction routes → Interaction tree service: serves trees
- Dependency graph builder → Asset index: ensures index (evidence: `backend/core/graph_service.py`)
- Dependency graph builder → Project modifications: collects changes (evidence: `backend/core/graph_service.py`)
- Dependency graph builder → Layered virtual filesystem: reads layered assets (evidence: `backend/core/graph_service.py`)
- Asset read and resolve → Asset index: resolves paths (evidence: `backend/core/asset_service.py`)
- Asset read and resolve → Layered virtual filesystem: reads mounts (evidence: `backend/core/asset_service.py`)
- Interaction tree service → Asset read and resolve: reads assets (evidence: `backend/core/interaction_tree_service.py`)
- Interaction tree service → Asset index: uses index (evidence: `backend/core/interaction_tree_service.py`)
- Workspace and project service → Project configuration: loads config (evidence: `backend/core/workspace_service.py`)
- Project creation → Project configuration: uses project config (evidence: `backend/core/project_create_service.py`)
- Pack import → Project creation: creates target project (evidence: `backend/core/import_service.py`)
- Pack import → Asset index: updates index (evidence: `backend/core/import_service.py`)
- Asset read and resolve → Local asset files: reads and writes (evidence: `backend/core/asset_service.py`)
- Project modifications → Asset index: updates index (evidence: `backend/core/modification_service.py`)
- Project modifications → Local asset files: tracks project edits
- Asset editor panel → Frontend API: loads and saves
- Interaction editors → Frontend API: loads and saves
