# neme77/centauri-carbon-2-community architecture

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

- Interactive diagram: https://gitdiagram.com/neme77/centauri-carbon-2-community
- Repository: https://github.com/neme77/centauri-carbon-2-community

## Overview

This repository combines community firmware for the Centauri Carbon 2 with CC2 Control, a local browser-based printer interface and managed update capabilities. The principal user workflow is to operate the printer through the web UI: the app polls printer state, presents task-specific pages and dialogs, and exposes print preparation, bed levelling, filament, and update features. Firmware assembly and native-component delivery are separate supporting workflows. The sampled source shows selected startup, UI, and preview relationships; other README capabilities are retained without assuming unshown call paths.

Main entry points: [`cc2-control/installer/package.py`](https://github.com/neme77/centauri-carbon-2-community/blob/develop/cc2-control/installer/package.py) (Control installer), [`cc2-control/web-src/src/App.tsx`](https://github.com/neme77/centauri-carbon-2-community/blob/develop/cc2-control/web-src/src/App.tsx) (App shell), [`cc2-control/installer/native_delivery.py`](https://github.com/neme77/centauri-carbon-2-community/blob/develop/cc2-control/installer/native_delivery.py) (Native delivery), [`cc2-control/web-src/src/main.tsx`](https://github.com/neme77/centauri-carbon-2-community/blob/develop/cc2-control/web-src/src/main.tsx) (Web app entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Browser control"]
  node_browser_entry["Web app entry<br/>[main.tsx]"]
  node_app_shell["App shell<br/>[App.tsx]"]
  node_printer_pages["Printer pages"]
  node_print_dialog["Print dialog<br/>[print-dialog.tsx]"]
  node_frontend_api["UI state and API<br/>[state.ts]"]
  node_preview_ui["Object preview UI<br/>[object-preview.ts]"]
end

subgraph group_runtime["Printer runtime"]
  node_control_runtime["Control service<br/>[main.c]"]
  node_layer_paths["Layer paths<br/>[gcode_layer_path.h]"]
  node_object_preview["G-code object previews"]
  node_queue["Print queue<br/>[queue.h]"]
  node_plates["Bed plates<br/>[plates.h]"]
  node_nozzle["Nozzle expansion<br/>[nozzle_expansion.h]"]
  node_spools["Spool management<br/>[spools.h]"]
  node_spoolman["Spoolman integration<br/>[spoolman.h]"]
  node_cavity_protocol["Cavity protocol"]
end

subgraph group_updates["Firmware and updates"]
  node_firmware_builder["Firmware assembly"]
  node_startup["Printer startup staging<br/>[startup_stock13.py]"]
  node_camera_component["Camera component"]
  node_installer_package["Control installer<br/>[package.py]"]
  node_native_delivery["Native delivery<br/>[native_delivery.py]"]
  node_app_binding["App binding"]
  node_network_component["Network component"]
end

subgraph group_rfid["RFID lifecycle"]
  node_rfid_component["RFID component<br/>[rfid_component.py]"]
  node_canvas_transfer["Canvas transfer<br/>[app_transfer.h]"]
end

node_operator(("Printer operator"))

node_operator -->|"uses"| node_browser_entry
node_browser_entry -->|"renders"| node_app_shell
node_browser_entry -->|"polls state"| node_frontend_api
node_app_shell -->|"shows page"| node_printer_pages
node_app_shell -->|"renders"| node_print_dialog
node_app_shell -->|"uses"| node_preview_ui
node_control_runtime -->|"includes"| node_layer_paths
node_control_runtime -->|"includes handler"| node_object_preview
node_object_preview -->|"shares worker"| node_layer_paths
node_preview_ui -->|"requests preview"| node_object_preview
node_firmware_builder -->|"references"| node_camera_component
node_startup -->|"stages"| node_camera_component
node_installer_package -->|"uses"| node_native_delivery
node_installer_package -->|"uses"| node_app_binding
node_installer_package -->|"uses"| node_network_component
node_installer_package -->|"uses"| node_rfid_component
node_native_delivery -->|"uses"| node_app_binding
node_native_delivery -->|"uses"| node_network_component
node_native_delivery -->|"uses"| node_rfid_component
node_canvas_transfer -->|"uses protocol"| node_cavity_protocol

click node_browser_entry "https://github.com/neme77/centauri-carbon-2-community/blob/develop/cc2-control/web-src/src/main.tsx"
click node_app_shell "https://github.com/neme77/centauri-carbon-2-community/blob/develop/cc2-control/web-src/src/App.tsx"
click node_printer_pages "https://github.com/neme77/centauri-carbon-2-community/tree/develop/cc2-control/web-src/src/pages"
click node_print_dialog "https://github.com/neme77/centauri-carbon-2-community/blob/develop/cc2-control/web-src/src/pages/print-dialog.tsx"
click node_frontend_api "https://github.com/neme77/centauri-carbon-2-community/blob/develop/cc2-control/web-src/src/lib/state.ts"
click node_preview_ui "https://github.com/neme77/centauri-carbon-2-community/blob/develop/cc2-control/web-src/src/lib/object-preview.ts"
click node_control_runtime "https://github.com/neme77/centauri-carbon-2-community/blob/develop/cc2-control/src/main.c"
click node_layer_paths "https://github.com/neme77/centauri-carbon-2-community/blob/develop/cc2-control/src/gcode_layer_path.h"
click node_object_preview "https://github.com/neme77/centauri-carbon-2-community/blob/develop/cc2-control/src/gcode_object_preview.h"
click node_queue "https://github.com/neme77/centauri-carbon-2-community/blob/develop/cc2-control/src/queue.h"
click node_plates "https://github.com/neme77/centauri-carbon-2-community/blob/develop/cc2-control/src/plates.h"
click node_nozzle "https://github.com/neme77/centauri-carbon-2-community/blob/develop/cc2-control/src/nozzle_expansion.h"
click node_spools "https://github.com/neme77/centauri-carbon-2-community/blob/develop/cc2-control/src/spools.h"
click node_spoolman "https://github.com/neme77/centauri-carbon-2-community/blob/develop/cc2-control/src/spoolman.h"
click node_cavity_protocol "https://github.com/neme77/centauri-carbon-2-community/blob/develop/cc2-control/src/cavity_floor_protocol.h"
click node_firmware_builder "https://github.com/neme77/centauri-carbon-2-community/blob/develop/builder/current/core/firmware_builder.py"
click node_startup "https://github.com/neme77/centauri-carbon-2-community/blob/develop/builder/current/core/startup_stock13.py"
click node_camera_component "https://github.com/neme77/centauri-carbon-2-community/blob/develop/builder/current/core/camera_component.py"
click node_installer_package "https://github.com/neme77/centauri-carbon-2-community/blob/develop/cc2-control/installer/package.py"
click node_native_delivery "https://github.com/neme77/centauri-carbon-2-community/blob/develop/cc2-control/installer/native_delivery.py"
click node_app_binding "https://github.com/neme77/centauri-carbon-2-community/blob/develop/cc2-control/installer/app_binding_component.py"
click node_network_component "https://github.com/neme77/centauri-carbon-2-community/blob/develop/cc2-control/installer/network_component.py"
click node_rfid_component "https://github.com/neme77/centauri-carbon-2-community/blob/develop/cc2-control/installer/rfid_component.py"
click node_canvas_transfer "https://github.com/neme77/centauri-carbon-2-community/blob/develop/experimental/canvas-rfid/transfer/app_transfer.h"

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_browser_entry,node_app_shell,node_printer_pages,node_print_dialog,node_frontend_api,node_preview_ui toneBlue
class node_control_runtime,node_layer_paths,node_object_preview,node_queue,node_plates,node_nozzle,node_spools,node_spoolman,node_cavity_protocol toneAmber
class node_firmware_builder,node_startup,node_camera_component,node_installer_package,node_native_delivery,node_app_binding,node_network_component toneMint
class node_rfid_component,node_canvas_transfer toneRose
class node_operator toneIndigo
```

## Components

### Browser control

- [Web app entry](https://github.com/neme77/centauri-carbon-2-community/blob/develop/cc2-control/web-src/src/main.tsx): `cc2-control/web-src/src/main.tsx`
- [App shell](https://github.com/neme77/centauri-carbon-2-community/blob/develop/cc2-control/web-src/src/App.tsx): `cc2-control/web-src/src/App.tsx`
- [Printer pages](https://github.com/neme77/centauri-carbon-2-community/tree/develop/cc2-control/web-src/src/pages): `cc2-control/web-src/src/pages`
- [Print dialog](https://github.com/neme77/centauri-carbon-2-community/blob/develop/cc2-control/web-src/src/pages/print-dialog.tsx): `cc2-control/web-src/src/pages/print-dialog.tsx`
- [UI state and API](https://github.com/neme77/centauri-carbon-2-community/blob/develop/cc2-control/web-src/src/lib/state.ts): `cc2-control/web-src/src/lib/state.ts`
- [Object preview UI](https://github.com/neme77/centauri-carbon-2-community/blob/develop/cc2-control/web-src/src/lib/object-preview.ts): `cc2-control/web-src/src/lib/object-preview.ts`

### Printer runtime

- [Control service](https://github.com/neme77/centauri-carbon-2-community/blob/develop/cc2-control/src/main.c): `cc2-control/src/main.c`
- [Layer paths](https://github.com/neme77/centauri-carbon-2-community/blob/develop/cc2-control/src/gcode_layer_path.h): `cc2-control/src/gcode_layer_path.h`
- [G-code object previews](https://github.com/neme77/centauri-carbon-2-community/blob/develop/cc2-control/src/gcode_object_preview.h): `cc2-control/src/gcode_object_preview.h`
- [Print queue](https://github.com/neme77/centauri-carbon-2-community/blob/develop/cc2-control/src/queue.h): `cc2-control/src/queue.h`
- [Bed plates](https://github.com/neme77/centauri-carbon-2-community/blob/develop/cc2-control/src/plates.h): `cc2-control/src/plates.h`
- [Nozzle expansion](https://github.com/neme77/centauri-carbon-2-community/blob/develop/cc2-control/src/nozzle_expansion.h): `cc2-control/src/nozzle_expansion.h`
- [Spool management](https://github.com/neme77/centauri-carbon-2-community/blob/develop/cc2-control/src/spools.h): `cc2-control/src/spools.h`
- [Spoolman integration](https://github.com/neme77/centauri-carbon-2-community/blob/develop/cc2-control/src/spoolman.h): `cc2-control/src/spoolman.h`
- [Cavity protocol](https://github.com/neme77/centauri-carbon-2-community/blob/develop/cc2-control/src/cavity_floor_protocol.h): `cc2-control/src/cavity_floor_protocol.h`

### Firmware and updates

- [Firmware assembly](https://github.com/neme77/centauri-carbon-2-community/blob/develop/builder/current/core/firmware_builder.py): `builder/current/core/firmware_builder.py`
- [Printer startup staging](https://github.com/neme77/centauri-carbon-2-community/blob/develop/builder/current/core/startup_stock13.py): `builder/current/core/startup_stock13.py`
- [Camera component](https://github.com/neme77/centauri-carbon-2-community/blob/develop/builder/current/core/camera_component.py): `builder/current/core/camera_component.py`
- [Control installer](https://github.com/neme77/centauri-carbon-2-community/blob/develop/cc2-control/installer/package.py): `cc2-control/installer/package.py`
- [Native delivery](https://github.com/neme77/centauri-carbon-2-community/blob/develop/cc2-control/installer/native_delivery.py): `cc2-control/installer/native_delivery.py`
- [App binding](https://github.com/neme77/centauri-carbon-2-community/blob/develop/cc2-control/installer/app_binding_component.py): `cc2-control/installer/app_binding_component.py`
- [Network component](https://github.com/neme77/centauri-carbon-2-community/blob/develop/cc2-control/installer/network_component.py): `cc2-control/installer/network_component.py`

### RFID lifecycle

- [RFID component](https://github.com/neme77/centauri-carbon-2-community/blob/develop/cc2-control/installer/rfid_component.py): `cc2-control/installer/rfid_component.py`
- [Canvas transfer](https://github.com/neme77/centauri-carbon-2-community/blob/develop/experimental/canvas-rfid/transfer/app_transfer.h): `experimental/canvas-rfid/transfer/app_transfer.h`

### Other components

- **Printer operator**

## Connections

- Printer operator → Web app entry: uses (evidence: `README.md`)
- Web app entry → App shell: renders (evidence: `cc2-control/web-src/src/main.tsx`)
- Web app entry → UI state and API: polls state (evidence: `cc2-control/web-src/src/main.tsx`)
- App shell → Printer pages: shows page (evidence: `cc2-control/web-src/src/App.tsx`)
- App shell → Print dialog: renders (evidence: `cc2-control/web-src/src/App.tsx`)
- App shell → Object preview UI: uses (evidence: `cc2-control/web-src/src/App.tsx`)
- Control service → Layer paths: includes (evidence: `cc2-control/src/main.c`)
- Control service → G-code object previews: includes handler (evidence: `cc2-control/src/main.c`)
- G-code object previews → Layer paths: shares worker (evidence: `cc2-control/src/gcode_object_preview.h`)
- Object preview UI → G-code object previews: requests preview
- Firmware assembly → Camera component: references (evidence: `builder/current/core/firmware_builder.py`)
- Printer startup staging → Camera component: stages (evidence: `builder/current/core/startup_stock13.py`)
- Control installer → Native delivery: uses (evidence: `cc2-control/installer/package.py`)
- Control installer → App binding: uses (evidence: `cc2-control/installer/package.py`)
- Control installer → Network component: uses (evidence: `cc2-control/installer/package.py`)
- Control installer → RFID component: uses (evidence: `cc2-control/installer/package.py`)
- Native delivery → App binding: uses (evidence: `cc2-control/installer/native_delivery.py`)
- Native delivery → Network component: uses (evidence: `cc2-control/installer/native_delivery.py`)
- Native delivery → RFID component: uses (evidence: `cc2-control/installer/native_delivery.py`)
- Canvas transfer → Cavity protocol: uses protocol (evidence: `experimental/canvas-rfid/lifecycle/stage_worker.c`)
