# ravindran-dev/quantum architecture

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

- Interactive diagram: https://gitdiagram.com/ravindran-dev/quantum
- Repository: https://github.com/ravindran-dev/quantum

## Overview

QuantumIDE is a Windows desktop IDE whose main workflow is editing a local workspace, running code, and viewing execution output; users can also sign in, sync files, inspect history, resolve conflicts, and request AI help. Electron starts and monitors the local backend, while the React app presents the editor and supporting UI. The README describes the major backend capabilities, but the sampled server excerpt does not show all their route implementations; those relationships are therefore cited to the README rather than inferred from unsampled code.

Main entry points: [`frontend/src/App.jsx`](https://github.com/ravindran-dev/quantum/blob/main/frontend/src/App.jsx) (IDE workspace), [`backend/server.js`](https://github.com/ravindran-dev/quantum/blob/main/backend/server.js) (Express API), [`electron/main.js`](https://github.com/ravindran-dev/quantum/blob/main/electron/main.js) (Electron shell), [`frontend/src/components/AuthPage.jsx`](https://github.com/ravindran-dev/quantum/blob/main/frontend/src/components/AuthPage.jsx) (Authentication UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop runtime"]
  node_electron["Electron shell<br/>[main.js]"]
  node_data["Desktop data<br/>[dataManager.js]"]
end

subgraph group_frontend["IDE interface"]
  node_app["IDE workspace<br/>[App.jsx]"]
  node_monaco["Monaco editor<br/>[index.jsx]"]
  node_sidebar["Workspace sidebar<br/>[Sidebar.jsx]"]
  node_console["Run console<br/>[Console.jsx]"]
  node_topbar["Editor controls<br/>[TopBar.jsx]"]
  node_localstore[("Offline workspace<br/>[workspaceStore.js]")]
  node_authui["Authentication UI<br/>[AuthPage.jsx]"]
  node_historyui["History viewer<br/>[History.jsx]"]
  node_conflicts["Conflict resolution"]
  node_aipanel["AI assistant UI<br/>[AIPanel.jsx]"]
  node_api["API configuration<br/>[apiConfig.js]"]
end

subgraph group_backend["Local services"]
  node_server["Express API<br/>[server.js]"]
  node_execution["Code execution<br/>[server.js]"]
  node_workspaceapi["Workspace service<br/>[server.js]"]
  node_historyapi["History service<br/>[server.js]"]
  node_aiapi["AI service<br/>[server.js]"]
  node_cloudsync["Cloud sync<br/>[server.js]"]
end

subgraph group_cloud["Cloud integrations"]
  node_firebaseadmin["Firebase Admin<br/>[firebaseAdmin.js]"]
  node_firebase[("Firebase services")]
  node_gemini{{"Gemini API"}}
end

node_developer(("Developer"))
node_runtime{{"Local language runtimes"}}

node_developer -->|"opens IDE"| node_electron
node_electron -->|"loads state"| node_data
node_electron -->|"starts backend"| node_server
node_electron -->|"opens workspace"| node_app
node_developer -->|"edits code"| node_app
node_app -->|"hosts editor"| node_monaco
node_app -->|"renders"| node_sidebar
node_app -->|"renders"| node_console
node_app -->|"renders"| node_topbar
node_app -->|"reads and saves"| node_localstore
node_app -->|"resolves backend"| node_api
node_app -->|"saves workspace"| node_server
node_app -->|"runs code"| node_execution
node_execution -->|"invokes compiler"| node_runtime
node_execution -->|"returns output"| node_console
node_server -->|"routes files"| node_workspaceapi
node_server -->|"routes history"| node_historyapi
node_server -->|"routes AI requests"| node_aiapi
node_server -->|"syncs workspace"| node_cloudsync
node_app -->|"shows sign-in"| node_authui
node_authui -->|"authenticates user"| node_firebase
node_authui -->|"updates profile"| node_server
node_app -->|"shows run history"| node_historyui
node_historyui -->|"loads history"| node_server
node_app -->|"presents conflict"| node_conflicts
node_conflicts -->|"resolves versions"| node_server
node_app -->|"renders assistant"| node_aipanel
node_aipanel -->|"resolves backend"| node_api
node_aipanel -->|"requests analysis"| node_aiapi
node_aiapi -.->|"requests assistance"| node_gemini
node_cloudsync -->|"uses admin SDK"| node_firebaseadmin
node_firebaseadmin -->|"accesses Firestore"| node_firebase
node_cloudsync -->|"syncs files"| node_firebase

click node_electron "https://github.com/ravindran-dev/quantum/blob/main/electron/main.js"
click node_data "https://github.com/ravindran-dev/quantum/blob/main/electron/dataManager.js"
click node_app "https://github.com/ravindran-dev/quantum/blob/main/frontend/src/App.jsx"
click node_monaco "https://github.com/ravindran-dev/quantum/blob/main/frontend/src/index.jsx"
click node_sidebar "https://github.com/ravindran-dev/quantum/blob/main/frontend/src/components/Sidebar.jsx"
click node_console "https://github.com/ravindran-dev/quantum/blob/main/frontend/src/components/Console.jsx"
click node_topbar "https://github.com/ravindran-dev/quantum/blob/main/frontend/src/components/TopBar.jsx"
click node_localstore "https://github.com/ravindran-dev/quantum/blob/main/frontend/src/utils/workspaceStore.js"
click node_authui "https://github.com/ravindran-dev/quantum/blob/main/frontend/src/components/AuthPage.jsx"
click node_historyui "https://github.com/ravindran-dev/quantum/blob/main/frontend/src/components/History.jsx"
click node_conflicts "https://github.com/ravindran-dev/quantum/blob/main/frontend/src/components/ConflictResolutionModal.jsx"
click node_aipanel "https://github.com/ravindran-dev/quantum/blob/main/frontend/src/components/AIPanel.jsx"
click node_api "https://github.com/ravindran-dev/quantum/blob/main/frontend/src/utils/apiConfig.js"
click node_server "https://github.com/ravindran-dev/quantum/blob/main/backend/server.js"
click node_execution "https://github.com/ravindran-dev/quantum/blob/main/backend/server.js"
click node_workspaceapi "https://github.com/ravindran-dev/quantum/blob/main/backend/server.js"
click node_historyapi "https://github.com/ravindran-dev/quantum/blob/main/backend/server.js"
click node_aiapi "https://github.com/ravindran-dev/quantum/blob/main/backend/server.js"
click node_cloudsync "https://github.com/ravindran-dev/quantum/blob/main/backend/server.js"
click node_firebaseadmin "https://github.com/ravindran-dev/quantum/blob/main/backend/firebaseAdmin.js"

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_electron,node_data toneBlue
class node_app,node_monaco,node_sidebar,node_console,node_topbar,node_localstore,node_authui,node_historyui,node_conflicts,node_aipanel,node_api toneAmber
class node_server,node_execution,node_workspaceapi,node_historyapi,node_aiapi,node_cloudsync toneMint
class node_firebaseadmin,node_firebase,node_gemini toneRose
class node_developer,node_runtime toneIndigo
```

## Components

### Desktop runtime

- [Electron shell](https://github.com/ravindran-dev/quantum/blob/main/electron/main.js): `electron/main.js`
- [Desktop data](https://github.com/ravindran-dev/quantum/blob/main/electron/dataManager.js): `electron/dataManager.js`

### IDE interface

- [IDE workspace](https://github.com/ravindran-dev/quantum/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Monaco editor](https://github.com/ravindran-dev/quantum/blob/main/frontend/src/index.jsx): `frontend/src/index.jsx`
- [Workspace sidebar](https://github.com/ravindran-dev/quantum/blob/main/frontend/src/components/Sidebar.jsx): `frontend/src/components/Sidebar.jsx`
- [Run console](https://github.com/ravindran-dev/quantum/blob/main/frontend/src/components/Console.jsx): `frontend/src/components/Console.jsx`
- [Editor controls](https://github.com/ravindran-dev/quantum/blob/main/frontend/src/components/TopBar.jsx): `frontend/src/components/TopBar.jsx`
- [Offline workspace](https://github.com/ravindran-dev/quantum/blob/main/frontend/src/utils/workspaceStore.js): `frontend/src/utils/workspaceStore.js`
- [Authentication UI](https://github.com/ravindran-dev/quantum/blob/main/frontend/src/components/AuthPage.jsx): `frontend/src/components/AuthPage.jsx`
- [History viewer](https://github.com/ravindran-dev/quantum/blob/main/frontend/src/components/History.jsx): `frontend/src/components/History.jsx`
- [Conflict resolution](https://github.com/ravindran-dev/quantum/blob/main/frontend/src/components/ConflictResolutionModal.jsx): `frontend/src/components/ConflictResolutionModal.jsx`
- [AI assistant UI](https://github.com/ravindran-dev/quantum/blob/main/frontend/src/components/AIPanel.jsx): `frontend/src/components/AIPanel.jsx`
- [API configuration](https://github.com/ravindran-dev/quantum/blob/main/frontend/src/utils/apiConfig.js): `frontend/src/utils/apiConfig.js`

### Local services

- [Express API](https://github.com/ravindran-dev/quantum/blob/main/backend/server.js): `backend/server.js`
- [Code execution](https://github.com/ravindran-dev/quantum/blob/main/backend/server.js): `backend/server.js`
- [Workspace service](https://github.com/ravindran-dev/quantum/blob/main/backend/server.js): `backend/server.js`
- [History service](https://github.com/ravindran-dev/quantum/blob/main/backend/server.js): `backend/server.js`
- [AI service](https://github.com/ravindran-dev/quantum/blob/main/backend/server.js): `backend/server.js`
- [Cloud sync](https://github.com/ravindran-dev/quantum/blob/main/backend/server.js): `backend/server.js`

### Cloud integrations

- [Firebase Admin](https://github.com/ravindran-dev/quantum/blob/main/backend/firebaseAdmin.js): `backend/firebaseAdmin.js`
- **Firebase services**
- **Gemini API**

### Other components

- **Developer**
- **Local language runtimes**

## Connections

- Developer → Electron shell: opens IDE (evidence: `README.md`)
- Electron shell → Desktop data: loads state (evidence: `electron/main.js`)
- Electron shell → Express API: starts backend (evidence: `electron/main.js`)
- Electron shell → IDE workspace: opens workspace (evidence: `README.md`)
- Developer → IDE workspace: edits code (evidence: `README.md`)
- IDE workspace → Monaco editor: hosts editor (evidence: `README.md`)
- IDE workspace → Workspace sidebar: renders (evidence: `frontend/src/App.jsx`)
- IDE workspace → Run console: renders (evidence: `frontend/src/App.jsx`)
- IDE workspace → Editor controls: renders (evidence: `frontend/src/App.jsx`)
- IDE workspace → Offline workspace: reads and saves (evidence: `frontend/src/App.jsx`)
- IDE workspace → API configuration: resolves backend (evidence: `frontend/src/utils/apiConfig.js`)
- IDE workspace → Express API: saves workspace (evidence: `frontend/src/App.jsx`)
- IDE workspace → Code execution: runs code (evidence: `README.md`)
- Code execution → Local language runtimes: invokes compiler (evidence: `README.md`)
- Code execution → Run console: returns output (evidence: `README.md`)
- Express API → Workspace service: routes files (evidence: `README.md`)
- Express API → History service: routes history (evidence: `README.md`)
- Express API → AI service: routes AI requests (evidence: `README.md`)
- Express API → Cloud sync: syncs workspace (evidence: `README.md`)
- IDE workspace → Authentication UI: shows sign-in (evidence: `README.md`)
- Authentication UI → Firebase services: authenticates user (evidence: `README.md`)
- Authentication UI → Express API: updates profile (evidence: `frontend/src/components/AuthPage.jsx`)
- IDE workspace → History viewer: shows run history (evidence: `README.md`)
- History viewer → Express API: loads history (evidence: `README.md`)
- IDE workspace → Conflict resolution: presents conflict (evidence: `README.md`)
- Conflict resolution → Express API: resolves versions (evidence: `README.md`)
- IDE workspace → AI assistant UI: renders assistant (evidence: `frontend/src/App.jsx`)
- AI assistant UI → API configuration: resolves backend (evidence: `frontend/src/components/AIPanel.jsx`)
- AI assistant UI → AI service: requests analysis (evidence: `frontend/src/components/AIPanel.jsx`)
- AI service → Gemini API: requests assistance (evidence: `README.md`)
- Cloud sync → Firebase Admin: uses admin SDK (evidence: `backend/server.js`)
- Firebase Admin → Firebase services: accesses Firestore (evidence: `README.md`)
- Cloud sync → Firebase services: syncs files (evidence: `README.md`)
