Skip to content

Repository files navigation

QuantumIDE

A modern, offline-first, multi-language IDE for Windows — built with Electron, React, Monaco Editor, and a local Express backend. Write, compile, and run C++, Python, Java, and JavaScript locally with Firebase cloud sync, code history, conflict resolution, and Gemini-powered AI assistance.

Version Electron React Monaco License


What is QuantumIDE?

QuantumIDE is a VS Code-style development environment that runs as a native Windows application. It ships with a full-stack architecture in a single .exe — a local Express backend handles compilation and storage, while the React frontend provides a polished editing experience. All code runs on your machine. Firebase is optional, used only for authentication and cross-device workspace sync.


Features

Editor

  • Monaco Editor — the same code editor that powers VS Code
  • Syntax highlighting for C++, Python, Java, and JavaScript
  • Offline-first: the editor works with no internet connection
  • Persistent workspace: files survive restarts and page refreshes

Multi-Language Execution

Language Compiler / Runtime
C++ g++ (bundled or system)
Python python3 (system)
Java javac + java (system JDK)
JavaScript Node.js (system)
  • Custom stdin support
  • stdout / stderr display
  • Execution timeout enforcement
  • Real-time output display

Workspace & Storage

  • Offline-first local workspace — all files saved to %APPDATA%\QuantumIDE\workspace\
  • SQLite database — code history and metadata stored locally
  • Cloud sync — workspace files synced to Firebase Firestore when online
  • File operations: new file, rename, delete, multi-file workspace

Authentication

  • Firebase Authentication (Google, Email/Password)
  • Persistent login state across restarts
  • Guest mode for offline use without an account

History & Versioning

  • Complete execution history per file
  • Browse past runs with code, input, output, and timestamp
  • History stored locally and synced to cloud

Conflict Resolution

  • Detects conflicts between local edits and cloud version
  • Visual diff-based conflict resolution modal
  • Choose local, cloud, or merge manually

AI Assistance (Gemini)

  • Debug: Analyze errors and suggest fixes
  • Explain: Plain-language explanation of selected code
  • Fix: Auto-generate corrected code
  • Powered by Google Gemini API (requires GEMINI_API_KEY)

Desktop Application (Windows)

  • Native Windows application (.exe)
  • NSIS installer with Start Menu and Desktop shortcuts
  • Portable single-file executable (no installation required)
  • Automatic backend lifecycle management
  • Native file dialogs
  • Window state persistence (size, position, maximized)

Architecture

┌──────────────────────────────────────────────────────────────┐
│                   QuantumIDE Desktop                          │
│                    (Electron Shell)                           │
│                                                              │
│  ┌───────────────────────┐   ┌─────────────────────────┐    │
│  │   React + Monaco      │   │   Local Express Backend │    │
│  │                       │◄──►                         │    │
│  │  • Editor             │   │  • C++ / Python / Java  │    │
│  │  • Workspace sidebar  │   │  • JavaScript / Node    │    │
│  │  • Console            │   │  • SQLite (history)     │    │
│  │  • AI panel           │   │  • Workspace files      │    │
│  │  • History viewer     │   │  • Gemini AI API        │    │
│  │  • Conflict UI        │   │  • Firebase Admin       │    │
│  └───────────────────────┘   └─────────────────────────┘    │
│                                                              │
└──────────────────────────────────┬───────────────────────────┘
                                   │ (when online)
                          ┌────────▼────────┐
                          │    Firebase     │
                          │  • Auth         │
                          │  • Firestore    │
                          └─────────────────┘

See docs/architecture.md for the full technical breakdown.


Project Structure

quantum/
├── frontend/               React + Vite frontend
│   ├── src/
│   │   ├── components/     UI components (Editor, Sidebar, Console, AI, etc.)
│   │   ├── utils/          Workspace store, API config
│   │   ├── App.jsx         Root application component
│   │   └── firebase.js     Firebase client config (gitignored — see setup)
│   ├── public/
│   │   └── monaco/         Bundled Monaco editor assets (offline)
│   └── package.json
│
├── backend/                Express backend
│   ├── server.js           All API routes, compilers, AI, workspace, history
│   ├── firebaseAdmin.js    Firebase Admin SDK setup
│   ├── Dockerfile          Docker support for cloud hosting
│   └── package.json
│
├── electron/               Electron desktop shell
│   ├── main.js             App lifecycle, window, backend spawning
│   ├── preload.js          Secure context bridge
│   ├── menu.js             Native application menu
│   └── dataManager.js      %APPDATA% management, migration, logging
│
├── scripts/                Utility scripts
│   ├── start.bat           Windows launcher
│   ├── start.sh            Linux/macOS launcher
│   ├── setup.sh            Dependency installer
│   └── migration/
│       └── migrateToFirebase.js
│
├── tests/                  Integration & functional tests
│   ├── test_ai_endpoints.js
│   ├── test_fresh_compiles.js
│   ├── test_offline_engine.js
│   └── test_reliability_audit.js
│
├── docs/                   Documentation
│   ├── architecture.md
│   └── deployment.md
│
├── assets/                 Application icons
├── quantum-launch.js       Unified full-stack dev launcher
├── package.json            Root — Electron + scripts orchestrator
├── .env.example            Environment variable template
├── README.md
├── CONTRIBUTING.md
├── SECURITY.md
└── LICENSE

Getting Started

Prerequisites

Tool Required for
Node.js 18+ Backend + build
g++ C++ compilation
Python 3 Python execution
JDK 11+ Java compilation

1. Clone the repository

git clone https://github.com/ravindran-dev/quantum.git
cd quantum

2. Install dependencies

# Install root, backend, and frontend dependencies
npm run install-all

3. Configure environment

# Copy the example and add your API keys
cp .env.example backend/.env

Edit backend/.env:

GEMINI_API_KEY=your_gemini_api_key_here

4. Configure Firebase (for auth and cloud sync)

Create frontend/src/firebase.js with your Firebase project config:

import { initializeApp } from "firebase/app";
import { getAuth, setPersistence, browserLocalPersistence } from "firebase/auth";
import { getFirestore } from "firebase/firestore";
import { getStorage } from "firebase/storage";

const firebaseConfig = {
  apiKey: "YOUR_FIREBASE_API_KEY",
  authDomain: "YOUR_PROJECT.firebaseapp.com",
  projectId: "YOUR_PROJECT_ID",
  storageBucket: "YOUR_PROJECT.firebasestorage.app",
  messagingSenderId: "YOUR_SENDER_ID",
  appId: "YOUR_APP_ID"
};

const app = initializeApp(firebaseConfig);
export const auth = getAuth(app);
if (typeof window !== 'undefined') {
  setPersistence(auth, browserLocalPersistence).catch(console.warn);
}
export const db = getFirestore(app);
export const storage = getStorage(app);

Place serviceAccountKey.json (downloaded from Firebase Console → Project Settings → Service Accounts) at backend/serviceAccountKey.json.

5. Start development

# Start both backend and frontend in one command
npm run dev

For the Electron desktop window during development:

npm run dev:desktop

Building the Windows Application

Quick build (unpacked)

npm run package:win
# Output: dist-electron/win-unpacked/QuantumIDE.exe

Full release (installer + portable)

npm run dist:win
# Output:
#   dist-electron/QuantumIDE Setup 2.1.0.exe   ← Installer
#   dist-electron/QuantumIDE-Portable.exe       ← Portable single-file

Individual targets

npm run dist:nsis       # Installer only
npm run dist:portable   # Portable only

Note: The compiled installer and portable .exe files are not committed to this repository. Download them from the GitHub Releases page.


Environment Variables

All environment variables go in backend/.env (never commit this file).

Variable Required Description
GEMINI_API_KEY For AI features Google Gemini API key — get one here
FIREBASE_SERVICE_ACCOUNT_PATH For cloud sync Path to Firebase service account JSON
PORT No Backend port (default: 5000)

Offline Mode

QuantumIDE works completely offline:

  • All code files are stored locally in %APPDATA%\QuantumIDE\workspace\
  • History is stored in a local SQLite database
  • The Monaco editor assets are bundled locally (no CDN)
  • Cloud sync and AI features require an internet connection

Compiler Requirements

QuantumIDE uses system-installed compilers. The backend checks availability at startup (/api/compilers):

Language Command checked
C++ g++ or clang++
Python python3 or python
Java javac + java
JavaScript node

Install compilers for your platform and make sure they are on PATH.


Running Tests

Start the backend first, then run the test scripts:

cd backend && npm start   # In one terminal

# In another terminal:
node tests/test_fresh_compiles.js
node tests/test_ai_endpoints.js
node tests/test_offline_engine.js
node tests/test_reliability_audit.js

Contributing

See CONTRIBUTING.md for development setup, branch strategy, and pull request guidelines.


Security

See SECURITY.md for the security policy, secret management rules, and vulnerability reporting.


License

MIT — see LICENSE


Author

ravindran-dev — github.com/ravindran-dev

About

A modern, full-stack web-based code compiler that supports C++, Python, and Java. Write, compile, and execute code directly in your browser.

Topics

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages