# zimn09/codeforge architecture

> Architecture diagram of the GitHub repository zimn09/codeforge, 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/zimn09/codeforge
- Repository: https://github.com/zimn09/codeforge

## Overview

CodeForge is a desktop, multi-language coding environment. Its main workflow is to open or create a project, edit source with language-aware assistance, then run or build it and inspect output. The tree and source index also identify project browsing, shell access, command search, plugins, themes, and live-server support. Main-window excerpts show editor highlighting and runner-status coordination; other UI wiring is supported by the source index’s references, but unsampled implementation details are not asserted.

Main entry points: [`main_window.py`](https://github.com/zimn09/codeforge/blob/main/main_window.py) (Main window), [`languages.py`](https://github.com/zimn09/codeforge/blob/main/languages.py) (Language registry), [`editor.py`](https://github.com/zimn09/codeforge/blob/main/editor.py) (Code editor), [`app.py`](https://github.com/zimn09/codeforge/blob/main/app.py) (Application bootstrap)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_startup["Application shell"]
  node_app["Application bootstrap<br/>[app.py]"]
  node_window["Main window<br/>[main_window.py]"]
end

subgraph group_authoring["Code authoring"]
  node_editor["Code editor<br/>[editor.py]"]
  node_language["Language registry<br/>[languages.py]"]
  node_highlight["Syntax highlighting<br/>[highlighter.py]"]
  node_completion["Library completion<br/>[libraries.py]"]
  node_find["Find bar<br/>[findbar.py]"]
end

subgraph group_execution["Execution tools"]
  node_runner["Build and run<br/>[runner.py]"]
  node_output["Output console<br/>[console.py]"]
  node_terminal["Shell terminal<br/>[terminal.py]"]
end

subgraph group_workspace["Workspace features"]
  node_explorer["Project explorer<br/>[explorer.py]"]
  node_welcome["Welcome and recent files<br/>[welcome.py]"]
  node_git["Git integration<br/>[git.py]"]
  node_liveserver["Live server<br/>[liveserver.py]"]
  node_palette["Command palette<br/>[palette.py]"]
end

subgraph group_customization["Customization"]
  node_plugins["Plugin manager<br/>[plugins.py]"]
  node_settings["Settings dialog<br/>[settings_dialog.py]"]
  node_theme["Themes<br/>[theme.py]"]
  node_icons["Icon resources<br/>[icons.py]"]
end

node_user(("Developer"))

node_user -->|"launches"| node_app
node_app -->|"creates"| node_window
node_window -->|"coordinates"| node_editor
node_window -->|"coordinates"| node_explorer
node_window -->|"coordinates"| node_welcome
node_window -->|"coordinates"| node_runner
node_window -->|"updates status"| node_output
node_window -->|"coordinates"| node_terminal
node_window -->|"coordinates"| node_find
node_window -->|"coordinates"| node_liveserver
node_window -->|"coordinates"| node_palette
node_window -->|"updates states"| node_plugins
node_window -->|"coordinates"| node_settings
node_window -->|"activates theme"| node_theme
node_window -->|"refreshes status"| node_git
node_window -->|"uses icons"| node_icons
node_editor -->|"uses metadata"| node_language
node_editor -->|"creates highlighter"| node_highlight
node_editor -->|"uses completion data"| node_completion
node_highlight -->|"reads language rules"| node_language
node_explorer -->|"classifies files"| node_language
node_welcome -->|"lists languages"| node_language
node_runner -->|"reads run metadata"| node_language
node_terminal -.->|"shares console tools"| node_output

click node_app "https://github.com/zimn09/codeforge/blob/main/app.py"
click node_window "https://github.com/zimn09/codeforge/blob/main/main_window.py"
click node_editor "https://github.com/zimn09/codeforge/blob/main/editor.py"
click node_language "https://github.com/zimn09/codeforge/blob/main/languages.py"
click node_highlight "https://github.com/zimn09/codeforge/blob/main/highlighter.py"
click node_completion "https://github.com/zimn09/codeforge/blob/main/libraries.py"
click node_find "https://github.com/zimn09/codeforge/blob/main/findbar.py"
click node_runner "https://github.com/zimn09/codeforge/blob/main/runner.py"
click node_output "https://github.com/zimn09/codeforge/blob/main/console.py"
click node_terminal "https://github.com/zimn09/codeforge/blob/main/terminal.py"
click node_explorer "https://github.com/zimn09/codeforge/blob/main/explorer.py"
click node_welcome "https://github.com/zimn09/codeforge/blob/main/welcome.py"
click node_git "https://github.com/zimn09/codeforge/blob/main/git.py"
click node_liveserver "https://github.com/zimn09/codeforge/blob/main/liveserver.py"
click node_palette "https://github.com/zimn09/codeforge/blob/main/palette.py"
click node_plugins "https://github.com/zimn09/codeforge/blob/main/plugins.py"
click node_settings "https://github.com/zimn09/codeforge/blob/main/settings_dialog.py"
click node_theme "https://github.com/zimn09/codeforge/blob/main/theme.py"
click node_icons "https://github.com/zimn09/codeforge/blob/main/icons.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_window toneBlue
class node_editor,node_language,node_highlight,node_completion,node_find toneAmber
class node_runner,node_output,node_terminal toneMint
class node_explorer,node_welcome,node_git,node_liveserver,node_palette toneRose
class node_plugins,node_settings,node_theme,node_icons,node_user toneIndigo
```

## Components

### Application shell

- [Application bootstrap](https://github.com/zimn09/codeforge/blob/main/app.py): `app.py`
- [Main window](https://github.com/zimn09/codeforge/blob/main/main_window.py): `main_window.py`

### Code authoring

- [Code editor](https://github.com/zimn09/codeforge/blob/main/editor.py): `editor.py`
- [Language registry](https://github.com/zimn09/codeforge/blob/main/languages.py): `languages.py`
- [Syntax highlighting](https://github.com/zimn09/codeforge/blob/main/highlighter.py): `highlighter.py`
- [Library completion](https://github.com/zimn09/codeforge/blob/main/libraries.py): `libraries.py`
- [Find bar](https://github.com/zimn09/codeforge/blob/main/findbar.py): `findbar.py`

### Execution tools

- [Build and run](https://github.com/zimn09/codeforge/blob/main/runner.py): `runner.py`
- [Output console](https://github.com/zimn09/codeforge/blob/main/console.py): `console.py`
- [Shell terminal](https://github.com/zimn09/codeforge/blob/main/terminal.py): `terminal.py`

### Workspace features

- [Project explorer](https://github.com/zimn09/codeforge/blob/main/explorer.py): `explorer.py`
- [Welcome and recent files](https://github.com/zimn09/codeforge/blob/main/welcome.py): `welcome.py`
- [Git integration](https://github.com/zimn09/codeforge/blob/main/git.py): `git.py`
- [Live server](https://github.com/zimn09/codeforge/blob/main/liveserver.py): `liveserver.py`
- [Command palette](https://github.com/zimn09/codeforge/blob/main/palette.py): `palette.py`

### Customization

- [Plugin manager](https://github.com/zimn09/codeforge/blob/main/plugins.py): `plugins.py`
- [Settings dialog](https://github.com/zimn09/codeforge/blob/main/settings_dialog.py): `settings_dialog.py`
- [Themes](https://github.com/zimn09/codeforge/blob/main/theme.py): `theme.py`
- [Icon resources](https://github.com/zimn09/codeforge/blob/main/icons.py): `icons.py`

### Other components

- **Developer**

## Connections

- Developer → Application bootstrap: launches (evidence: `app.py`)
- Application bootstrap → Main window: creates (evidence: `app.py`)
- Main window → Code editor: coordinates (evidence: `main_window.py`)
- Main window → Project explorer: coordinates (evidence: `main_window.py`)
- Main window → Welcome and recent files: coordinates (evidence: `main_window.py`)
- Main window → Build and run: coordinates (evidence: `main_window.py`)
- Main window → Output console: updates status (evidence: `main_window.py`)
- Main window → Shell terminal: coordinates (evidence: `main_window.py`)
- Main window → Find bar: coordinates (evidence: `main_window.py`)
- Main window → Live server: coordinates (evidence: `main_window.py`)
- Main window → Command palette: coordinates (evidence: `main_window.py`)
- Main window → Plugin manager: updates states (evidence: `main_window.py`)
- Main window → Settings dialog: coordinates (evidence: `main_window.py`)
- Main window → Themes: activates theme
- Main window → Git integration: refreshes status (evidence: `main_window.py`)
- Main window → Icon resources: uses icons (evidence: `main_window.py`)
- Code editor → Language registry: uses metadata (evidence: `editor.py`)
- Code editor → Syntax highlighting: creates highlighter (evidence: `main_window.py`)
- Code editor → Library completion: uses completion data (evidence: `editor.py`)
- Syntax highlighting → Language registry: reads language rules (evidence: `highlighter.py`)
- Project explorer → Language registry: classifies files (evidence: `explorer.py`)
- Welcome and recent files → Language registry: lists languages (evidence: `welcome.py`)
- Build and run → Language registry: reads run metadata (evidence: `runner.py`)
- Shell terminal → Output console: shares console tools (evidence: `terminal.py`)
