# bayaola/axispy architecture

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

- Interactive diagram: https://gitdiagram.com/bayaola/axispy
- Repository: https://github.com/bayaola/axispy

## Overview

AxisPy is a Python 2D game engine with a Qt editor. A typical workflow is to open or create a project, edit scenes and assets, then run the game through the engine’s entity-component runtime and rendering systems. The repository also includes AI-assisted authoring, persistence, multiplayer, and project export. The graph combines relationships visible in excerpts or the source index with README-documented capabilities; unsampled subsystem links are omitted where their callers cannot be established.

Main entry points: [`core/ai/chat_manager.py`](https://github.com/bayaola/axispy/blob/main/core/ai/chat_manager.py) (Chat orchestration), [`core/ecs.py`](https://github.com/bayaola/axispy/blob/main/core/ecs.py) (Entity-component world), [`main.py`](https://github.com/bayaola/axispy/blob/main/main.py) (Editor application), [`editor/ui/asset_manager.py`](https://github.com/bayaola/axispy/blob/main/editor/ui/asset_manager.py) (Asset manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_authoring["Project authoring"]
  node_application["Editor application<br/>[main.py]"]
  node_editor["Editor workbench<br/>[main_window.py]"]
  node_project_settings["Project settings"]
  node_assets["Asset manager<br/>[asset_manager.py]"]
  node_preview["Asset preview<br/>[preview_panel.py]"]
  node_ai_dock["AI chat dock<br/>[chat_dock.py]"]
end

subgraph group_runtime["Game runtime"]
  node_ecs["Entity-component world<br/>[ecs.py]"]
  node_scene["Scene model<br/>[scene.py]"]
  node_components["Game components"]
  node_render["Rendering system<br/>[render_system.py]"]
  node_physics["Physics system<br/>[physics_system.py]"]
  node_resources["Resource manager<br/>[resources.py]"]
  node_input["Input handling<br/>[input.py]"]
  node_runtime_launch["Runtime launch<br/>[runtime_launch.py]"]
end

subgraph group_ai["AI assistance"]
  node_ai_chat["Chat orchestration<br/>[chat_manager.py]"]
  node_ai_context["Engine context<br/>[context_builder.py]"]
  node_ai_tools["AI tool executor<br/>[tools.py]"]
  node_ai_providers["Model providers"]
  node_ai_sessions[("Chat sessions<br/>[session_manager.py]")]
end

subgraph group_delivery["Persistence and delivery"]
  node_serializer["Scene serialization<br/>[serializer.py]"]
  node_saves[("Save slots<br/>[save_manager.py]")]
  node_multiplayer["Multiplayer component<br/>[multiplayer.py]"]
  node_network["Network protocol<br/>[protocol.py]"]
  node_export["Project exporter<br/>[builder.py]"]
  node_plugins["Distribution plugins<br/>[__init__.py]"]
end

node_developer(("Developer"))

node_developer -->|"opens"| node_application
node_application -->|"launches"| node_editor
node_application -->|"loads"| node_project_settings
node_application -->|"loads"| node_resources
node_editor -.->|"provides"| node_assets
node_assets -->|"embeds"| node_preview
node_assets -->|"uses"| node_serializer
node_assets -.->|"uses"| node_resources
node_editor -.->|"provides"| node_ai_dock
node_ai_dock -.->|"requests"| node_ai_chat
node_ai_chat -->|"builds context"| node_ai_context
node_ai_chat -->|"executes tools"| node_ai_tools
node_ai_chat -->|"manages sessions"| node_ai_sessions
node_ai_chat -.->|"queries models"| node_ai_providers
node_scene -->|"owns world"| node_ecs
node_ecs -->|"stores"| node_components
node_render -->|"queries entities"| node_ecs
node_render -->|"reads"| node_components
node_physics -->|"queries entities"| node_ecs
node_physics -->|"reads"| node_components
node_render -.->|"uses assets"| node_resources
node_runtime_launch -.->|"runs scenes"| node_scene
node_input -.->|"dispatches input"| node_ecs
node_saves -->|"serializes scenes"| node_serializer
node_serializer -->|"reconstructs"| node_scene
node_serializer -->|"uses codecs"| node_resources
node_multiplayer -->|"encodes messages"| node_network
node_multiplayer -->|"uses websocket"| node_components
node_plugins -->|"uses builder"| node_export
node_project_settings -.->|"configures export"| node_export

click node_application "https://github.com/bayaola/axispy/blob/main/main.py"
click node_editor "https://github.com/bayaola/axispy/blob/main/editor/ui/main_window.py"
click node_project_settings "https://github.com/bayaola/axispy/blob/main/editor/ui/project_settings.py"
click node_assets "https://github.com/bayaola/axispy/blob/main/editor/ui/asset_manager.py"
click node_preview "https://github.com/bayaola/axispy/blob/main/editor/ui/preview_panel.py"
click node_ai_dock "https://github.com/bayaola/axispy/blob/main/editor/ui/chat_dock.py"
click node_ecs "https://github.com/bayaola/axispy/blob/main/core/ecs.py"
click node_scene "https://github.com/bayaola/axispy/blob/main/core/scene.py"
click node_components "https://github.com/bayaola/axispy/tree/main/core/components"
click node_render "https://github.com/bayaola/axispy/blob/main/core/systems/render_system.py"
click node_physics "https://github.com/bayaola/axispy/blob/main/core/systems/physics_system.py"
click node_resources "https://github.com/bayaola/axispy/blob/main/core/resources.py"
click node_input "https://github.com/bayaola/axispy/blob/main/core/input.py"
click node_runtime_launch "https://github.com/bayaola/axispy/blob/main/core/runtime_launch.py"
click node_ai_chat "https://github.com/bayaola/axispy/blob/main/core/ai/chat_manager.py"
click node_ai_context "https://github.com/bayaola/axispy/blob/main/core/ai/context_builder.py"
click node_ai_tools "https://github.com/bayaola/axispy/blob/main/core/ai/tools.py"
click node_ai_providers "https://github.com/bayaola/axispy/tree/main/core/ai/providers"
click node_ai_sessions "https://github.com/bayaola/axispy/blob/main/core/ai/session_manager.py"
click node_serializer "https://github.com/bayaola/axispy/blob/main/core/serializer.py"
click node_saves "https://github.com/bayaola/axispy/blob/main/core/save_manager.py"
click node_multiplayer "https://github.com/bayaola/axispy/blob/main/core/components/multiplayer.py"
click node_network "https://github.com/bayaola/axispy/blob/main/core/multiplayer/protocol.py"
click node_export "https://github.com/bayaola/axispy/blob/main/export/builder.py"
click node_plugins "https://github.com/bayaola/axispy/blob/main/plugins/game_distribution/__init__.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_application,node_editor,node_project_settings,node_assets,node_preview,node_ai_dock toneBlue
class node_ecs,node_scene,node_components,node_render,node_physics,node_resources,node_input,node_runtime_launch toneAmber
class node_ai_chat,node_ai_context,node_ai_tools,node_ai_providers,node_ai_sessions toneMint
class node_serializer,node_saves,node_multiplayer,node_network,node_export,node_plugins toneRose
class node_developer toneIndigo
```

## Components

### Project authoring

- [Editor application](https://github.com/bayaola/axispy/blob/main/main.py): `main.py`
- [Editor workbench](https://github.com/bayaola/axispy/blob/main/editor/ui/main_window.py): `editor/ui/main_window.py`
- [Project settings](https://github.com/bayaola/axispy/blob/main/editor/ui/project_settings.py): `editor/ui/project_settings.py`
- [Asset manager](https://github.com/bayaola/axispy/blob/main/editor/ui/asset_manager.py): `editor/ui/asset_manager.py`
- [Asset preview](https://github.com/bayaola/axispy/blob/main/editor/ui/preview_panel.py): `editor/ui/preview_panel.py`
- [AI chat dock](https://github.com/bayaola/axispy/blob/main/editor/ui/chat_dock.py): `editor/ui/chat_dock.py`

### Game runtime

- [Entity-component world](https://github.com/bayaola/axispy/blob/main/core/ecs.py): `core/ecs.py`
- [Scene model](https://github.com/bayaola/axispy/blob/main/core/scene.py): `core/scene.py`
- [Game components](https://github.com/bayaola/axispy/tree/main/core/components): `core/components`
- [Rendering system](https://github.com/bayaola/axispy/blob/main/core/systems/render_system.py): `core/systems/render_system.py`
- [Physics system](https://github.com/bayaola/axispy/blob/main/core/systems/physics_system.py): `core/systems/physics_system.py`
- [Resource manager](https://github.com/bayaola/axispy/blob/main/core/resources.py): `core/resources.py`
- [Input handling](https://github.com/bayaola/axispy/blob/main/core/input.py): `core/input.py`
- [Runtime launch](https://github.com/bayaola/axispy/blob/main/core/runtime_launch.py): `core/runtime_launch.py`

### AI assistance

- [Chat orchestration](https://github.com/bayaola/axispy/blob/main/core/ai/chat_manager.py): `core/ai/chat_manager.py`
- [Engine context](https://github.com/bayaola/axispy/blob/main/core/ai/context_builder.py): `core/ai/context_builder.py`
- [AI tool executor](https://github.com/bayaola/axispy/blob/main/core/ai/tools.py): `core/ai/tools.py`
- [Model providers](https://github.com/bayaola/axispy/tree/main/core/ai/providers): `core/ai/providers`
- [Chat sessions](https://github.com/bayaola/axispy/blob/main/core/ai/session_manager.py): `core/ai/session_manager.py`

### Persistence and delivery

- [Scene serialization](https://github.com/bayaola/axispy/blob/main/core/serializer.py): `core/serializer.py`
- [Save slots](https://github.com/bayaola/axispy/blob/main/core/save_manager.py): `core/save_manager.py`
- [Multiplayer component](https://github.com/bayaola/axispy/blob/main/core/components/multiplayer.py): `core/components/multiplayer.py`
- [Network protocol](https://github.com/bayaola/axispy/blob/main/core/multiplayer/protocol.py): `core/multiplayer/protocol.py`
- [Project exporter](https://github.com/bayaola/axispy/blob/main/export/builder.py): `export/builder.py`
- [Distribution plugins](https://github.com/bayaola/axispy/blob/main/plugins/game_distribution/__init__.py): `plugins/game_distribution/__init__.py`

### Other components

- **Developer**

## Connections

- Developer → Editor application: opens
- Editor application → Editor workbench: launches (evidence: `main.py`)
- Editor application → Project settings: loads (evidence: `main.py`)
- Editor application → Resource manager: loads (evidence: `main.py`)
- Editor workbench → Asset manager: provides
- Asset manager → Asset preview: embeds (evidence: `editor/ui/asset_manager.py`)
- Asset manager → Scene serialization: uses (evidence: `editor/ui/asset_manager.py`)
- Asset manager → Resource manager: uses
- Editor workbench → AI chat dock: provides
- AI chat dock → Chat orchestration: requests
- Chat orchestration → Engine context: builds context (evidence: `core/ai/chat_manager.py`)
- Chat orchestration → AI tool executor: executes tools (evidence: `core/ai/chat_manager.py`)
- Chat orchestration → Chat sessions: manages sessions (evidence: `core/ai/chat_manager.py`)
- Chat orchestration → Model providers: queries models (evidence: `core/ai/chat_manager.py`)
- Scene model → Entity-component world: owns world (evidence: `core/scene.py`)
- Entity-component world → Game components: stores (evidence: `core/ecs.py`)
- Rendering system → Entity-component world: queries entities (evidence: `core/systems/render_system.py`)
- Rendering system → Game components: reads (evidence: `core/systems/render_system.py`)
- Physics system → Entity-component world: queries entities (evidence: `core/systems/physics_system.py`)
- Physics system → Game components: reads (evidence: `core/systems/physics_system.py`)
- Rendering system → Resource manager: uses assets
- Runtime launch → Scene model: runs scenes
- Input handling → Entity-component world: dispatches input
- Save slots → Scene serialization: serializes scenes (evidence: `core/save_manager.py`)
- Scene serialization → Scene model: reconstructs (evidence: `core/serializer.py`)
- Scene serialization → Resource manager: uses codecs (evidence: `core/serializer.py`)
- Multiplayer component → Network protocol: encodes messages (evidence: `core/components/multiplayer.py`)
- Multiplayer component → Game components: uses websocket (evidence: `core/components/multiplayer.py`)
- Distribution plugins → Project exporter: uses builder (evidence: `plugins/game_distribution/__init__.py`)
- Project settings → Project exporter: configures export
