# asda168/code-forge architecture

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

- Interactive diagram: https://gitdiagram.com/asda168/code-forge
- Repository: https://github.com/asda168/code-forge

## Overview

CodeCambo is a local-first desktop IDE backed by a Django service for accounts, synchronized metadata, extension listings, and release information. The user opens a workspace, edits files, runs commands, and works with Git through the Electron main process; the renderer accesses local capabilities through the preload bridge. The backend also serves account/workspace APIs and a public download/update surface. Renderer modules and the backend WebSocket consumer are represented from the index or documentation, but their unsampled internal call paths are not inferred.

Main entry points: [`desktop/src/renderer/core.js`](https://github.com/asda168/code-forge/blob/main/desktop/src/renderer/core.js) (IDE coordination), [`desktop/src/main.js`](https://github.com/asda168/code-forge/blob/main/desktop/src/main.js) (Electron main process), [`backend/core/views.py`](https://github.com/asda168/code-forge/blob/main/backend/core/views.py) (Release and extension endpoints), [`desktop/src/renderer/boot.js`](https://github.com/asda168/code-forge/blob/main/desktop/src/renderer/boot.js) (Renderer startup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop_ui["IDE interface"]
  node_renderer_boot["Renderer startup<br/>[boot.js]"]
  node_renderer_core["IDE coordination<br/>[core.js]"]
  node_editor["Editor<br/>[ide.js]"]
  node_explorer["File explorer<br/>[explorer.js]"]
  node_git_ui["Git interface<br/>[git.js]"]
  node_gitlens["Git history<br/>[gitlens.js]"]
  node_terminal_ui["Terminal interface<br/>[terminal.js]"]
  node_themes["Themes and icons<br/>[themes.js]"]
  node_ui["Workbench UI<br/>[ui.js]"]
end

subgraph group_desktop_runtime["Local runtime"]
  node_preload["Context bridge<br/>[preload.js]"]
  node_main["Electron main process<br/>[main.js]"]
  node_security["Safety policies<br/>[security.js]"]
  node_local_files["Workspace files"]
  node_local_processes["Shell and Git processes"]
end

subgraph group_backend_api["Accounts and sync"]
  node_backend_views["Account and workspace API<br/>[views.py]"]
  node_serializers["API serialization<br/>[serializers.py]"]
  node_models[("User and project data<br/>[models.py]")]
  node_api_routes["HTTP API routes<br/>[api_urls.py]"]
  node_ws_routes["WebSocket routing<br/>[routing.py]"]
  node_updates["Update notices<br/>[consumers.py]"]
end

subgraph group_backend_release["Extensions and releases"]
  node_release_api["Release and extension endpoints<br/>[views.py]"]
  node_release_data[("Release metadata<br/>[models.py]")]
  node_static_site["Download catalog<br/>[site.py]"]
end

node_user(("Developer"))
node_desktop_client["Desktop client"]

node_user -->|"starts IDE"| node_renderer_boot
node_renderer_boot -.->|"initializes"| node_renderer_core
node_renderer_core -.->|"coordinates"| node_editor
node_renderer_core -.->|"coordinates"| node_explorer
node_renderer_core -.->|"coordinates"| node_git_ui
node_renderer_core -.->|"coordinates"| node_terminal_ui
node_renderer_core -.->|"coordinates"| node_ui
node_renderer_core -.->|"coordinates"| node_themes
node_git_ui -.->|"uses history"| node_gitlens
node_renderer_core -.->|"uses bridge"| node_preload
node_preload -.->|"dispatches IPC"| node_main
node_main -->|"validates access"| node_security
node_main -->|"reads and writes"| node_local_files
node_main -->|"runs commands"| node_local_processes
node_main -.->|"requests service data"| node_desktop_client
node_api_routes -->|"routes requests"| node_backend_views
node_backend_views -->|"serializes responses"| node_serializers
node_backend_views -->|"queries records"| node_models
node_ws_routes -->|"routes updates"| node_updates
node_desktop_client -.->|"connects for notices"| node_updates
node_release_api -->|"reads releases"| node_release_data
node_release_api -->|"serializes releases"| node_serializers
node_release_api -->|"uses fallback data"| node_static_site
node_desktop_client -.->|"checks updates"| node_release_api

click node_renderer_boot "https://github.com/asda168/code-forge/blob/main/desktop/src/renderer/boot.js"
click node_renderer_core "https://github.com/asda168/code-forge/blob/main/desktop/src/renderer/core.js"
click node_editor "https://github.com/asda168/code-forge/blob/main/desktop/src/renderer/ide.js"
click node_explorer "https://github.com/asda168/code-forge/blob/main/desktop/src/renderer/explorer.js"
click node_git_ui "https://github.com/asda168/code-forge/blob/main/desktop/src/renderer/git.js"
click node_gitlens "https://github.com/asda168/code-forge/blob/main/desktop/src/renderer/gitlens.js"
click node_terminal_ui "https://github.com/asda168/code-forge/blob/main/desktop/src/renderer/terminal.js"
click node_themes "https://github.com/asda168/code-forge/blob/main/desktop/src/renderer/themes.js"
click node_ui "https://github.com/asda168/code-forge/blob/main/desktop/src/renderer/ui.js"
click node_preload "https://github.com/asda168/code-forge/blob/main/desktop/src/preload.js"
click node_main "https://github.com/asda168/code-forge/blob/main/desktop/src/main.js"
click node_security "https://github.com/asda168/code-forge/blob/main/desktop/src/security.js"
click node_backend_views "https://github.com/asda168/code-forge/blob/main/backend/core/views.py"
click node_serializers "https://github.com/asda168/code-forge/blob/main/backend/core/serializers.py"
click node_models "https://github.com/asda168/code-forge/blob/main/backend/core/models.py"
click node_api_routes "https://github.com/asda168/code-forge/blob/main/backend/core/api_urls.py"
click node_ws_routes "https://github.com/asda168/code-forge/blob/main/backend/core/routing.py"
click node_updates "https://github.com/asda168/code-forge/blob/main/backend/core/consumers.py"
click node_release_api "https://github.com/asda168/code-forge/blob/main/backend/core/views.py"
click node_release_data "https://github.com/asda168/code-forge/blob/main/backend/core/models.py"
click node_static_site "https://github.com/asda168/code-forge/blob/main/backend/core/site.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_renderer_boot,node_renderer_core,node_editor,node_explorer,node_git_ui,node_gitlens,node_terminal_ui,node_themes,node_ui,node_desktop_client toneBlue
class node_preload,node_main,node_security,node_local_files,node_local_processes toneAmber
class node_backend_views,node_serializers,node_models,node_api_routes,node_ws_routes,node_updates toneMint
class node_release_api,node_release_data,node_static_site toneRose
class node_user toneIndigo
```

## Components

### IDE interface

- [Renderer startup](https://github.com/asda168/code-forge/blob/main/desktop/src/renderer/boot.js): `desktop/src/renderer/boot.js`
- [IDE coordination](https://github.com/asda168/code-forge/blob/main/desktop/src/renderer/core.js): `desktop/src/renderer/core.js`
- [Editor](https://github.com/asda168/code-forge/blob/main/desktop/src/renderer/ide.js): `desktop/src/renderer/ide.js`
- [File explorer](https://github.com/asda168/code-forge/blob/main/desktop/src/renderer/explorer.js): `desktop/src/renderer/explorer.js`
- [Git interface](https://github.com/asda168/code-forge/blob/main/desktop/src/renderer/git.js): `desktop/src/renderer/git.js`
- [Git history](https://github.com/asda168/code-forge/blob/main/desktop/src/renderer/gitlens.js): `desktop/src/renderer/gitlens.js`
- [Terminal interface](https://github.com/asda168/code-forge/blob/main/desktop/src/renderer/terminal.js): `desktop/src/renderer/terminal.js`
- [Themes and icons](https://github.com/asda168/code-forge/blob/main/desktop/src/renderer/themes.js): `desktop/src/renderer/themes.js`
- [Workbench UI](https://github.com/asda168/code-forge/blob/main/desktop/src/renderer/ui.js): `desktop/src/renderer/ui.js`

### Local runtime

- [Context bridge](https://github.com/asda168/code-forge/blob/main/desktop/src/preload.js): `desktop/src/preload.js`
- [Electron main process](https://github.com/asda168/code-forge/blob/main/desktop/src/main.js): `desktop/src/main.js`
- [Safety policies](https://github.com/asda168/code-forge/blob/main/desktop/src/security.js): `desktop/src/security.js`
- **Workspace files**
- **Shell and Git processes**

### Accounts and sync

- [Account and workspace API](https://github.com/asda168/code-forge/blob/main/backend/core/views.py): `backend/core/views.py`
- [API serialization](https://github.com/asda168/code-forge/blob/main/backend/core/serializers.py): `backend/core/serializers.py`
- [User and project data](https://github.com/asda168/code-forge/blob/main/backend/core/models.py): `backend/core/models.py`
- [HTTP API routes](https://github.com/asda168/code-forge/blob/main/backend/core/api_urls.py): `backend/core/api_urls.py`
- [WebSocket routing](https://github.com/asda168/code-forge/blob/main/backend/core/routing.py): `backend/core/routing.py`
- [Update notices](https://github.com/asda168/code-forge/blob/main/backend/core/consumers.py): `backend/core/consumers.py`

### Extensions and releases

- [Release and extension endpoints](https://github.com/asda168/code-forge/blob/main/backend/core/views.py): `backend/core/views.py`
- [Release metadata](https://github.com/asda168/code-forge/blob/main/backend/core/models.py): `backend/core/models.py`
- [Download catalog](https://github.com/asda168/code-forge/blob/main/backend/core/site.py): `backend/core/site.py`

### Other components

- **Developer**
- **Desktop client**

## Connections

- Developer → Renderer startup: starts IDE
- Renderer startup → IDE coordination: initializes
- IDE coordination → Editor: coordinates
- IDE coordination → File explorer: coordinates
- IDE coordination → Git interface: coordinates
- IDE coordination → Terminal interface: coordinates
- IDE coordination → Workbench UI: coordinates
- IDE coordination → Themes and icons: coordinates
- Git interface → Git history: uses history
- IDE coordination → Context bridge: uses bridge
- Context bridge → Electron main process: dispatches IPC
- Electron main process → Safety policies: validates access (evidence: `desktop/src/main.js`)
- Electron main process → Workspace files: reads and writes (evidence: `desktop/src/main.js`)
- Electron main process → Shell and Git processes: runs commands (evidence: `desktop/src/main.js`)
- Electron main process → Desktop client: requests service data
- HTTP API routes → Account and workspace API: routes requests (evidence: `backend/core/api_urls.py`)
- Account and workspace API → API serialization: serializes responses (evidence: `backend/core/views.py`)
- Account and workspace API → User and project data: queries records (evidence: `backend/core/views.py`)
- WebSocket routing → Update notices: routes updates (evidence: `backend/core/routing.py`)
- Desktop client → Update notices: connects for notices
- Release and extension endpoints → Release metadata: reads releases (evidence: `backend/core/views.py`)
- Release and extension endpoints → API serialization: serializes releases (evidence: `backend/core/views.py`)
- Release and extension endpoints → Download catalog: uses fallback data (evidence: `backend/core/views.py`)
- Desktop client → Release and extension endpoints: checks updates
