A lightweight, offline IDE for C, C++, Java, and Python
Developed by Rabail Ali Bhatti
CarbonCode is a modern, cross-platform offline IDE for C, C++, Java, and Python built with Electron, React, and Monaco Editor. Compile and run your code locally using your system's installed tools or the bundled C++ compiler โ 100% offline, zero internet required.
- ๐ Full Student File Handling Support - Practice file handling in C, C++, Java, and Python with relative paths (e.g.
data.txt,output.csv) running directly in your workspace directory - ๐ Text & Data File Management - Create, view, and edit
.txt,.csv,.dat,.in,.out,.log, and.jsonfiles right from the File Explorer with distinct badges and inline creation - ๐ก Rich File Handling IntelliSense - Autocomplete and prebuilt snippets for
<fstream>,<filesystem>, JavaFile/Files/Path/Scanner/PrintWriter, Pythonopen/pathlib, and C<stdio.h> - ๐ Auto-Refreshing Workspace - Program output files (e.g.
output.txt) immediately show up in the File Explorer upon execution - ๐ Full Python Support - Native Python 3 runner with unbuffered execution, 60+ built-ins, 35+ stdlib completions, and PEP 8 formatting
- ๐ฅ๏ธ Monaco Code Editor - VS Code-grade editor with dark navy theme, high-contrast syntax highlighting, bracket matching, and indentation guides
- ๐ Go to Definition & Navigation - F12 to jump to symbol definitions, Shift+F12 for references across C, C++, Java, and Python
- ๐ Built-in Code Formatter - Shift+Alt+F and Format-on-Save supporting PEP 8, Java, C++, and C
- ๐ป Interactive Blinking Cursor Terminal - Real-time inline terminal with full standard input (
cin,Scanner,input()) support - ๐ Clickable Error Diagnostics - Automatic traceback and compilation error parsing with instant click-to-jump to line/column
- ๐ ๏ธ Integrated Debugger - GDB-powered line-by-line debugging with variable inspection and breakpoint support for C and C++
- ๐ง Bundled Compiler Setup - Comes ready out-of-the-box with bundled MinGW64 for C and C++
- ๐ File Explorer & Global Search - Integrated tree view and Ctrl+Shift+F project search/replace across files
- ๐ Multi-Tab Interface - Work on multiple files simultaneously with dirty-state tracking and unsaved change protection
- โ Java JDK Support - Automatic JDK and
javacdetection with standard library IntelliSense - ๐พ 100% Offline First - Bundled offline Monaco Editor and local compiler runtime with zero network dependencies
For the "Full" version: None! It comes with a bundled C++ compiler (MinGW).
For the "Lite" version: You must have a C++ compiler installed on your system:
-
Option 1: MinGW-w64 (Recommended)
- Download from MinGW-w64
- Add the
binfolder to your system PATH - Verify:
g++ --version
-
Option 2: Visual Studio Build Tools
- Download Visual Studio Build Tools
- Install "Desktop development with C++"
- Open the "Developer Command Prompt" to compile
# Install Xcode Command Line Tools
xcode-select --install
# Verify installation
clang++ --version# Install g++
sudo apt update
sudo apt install build-essential
# Verify installation
g++ --versionsudo dnf install gcc-c++sudo pacman -S gccTo compile and run Java programs, you need the Java Development Kit (JDK):
Windows:
- Download Eclipse Temurin JDK or Oracle JDK
- Install and ensure
javacis on your PATH - Verify:
javac -version
macOS:
# Install via Homebrew
brew install openjdk
# Verify
javac -versionLinux (Ubuntu/Debian):
sudo apt update
sudo apt install default-jdk
javac -version- Clone the repository:
git clone https://github.com/rabailalibhatti/carboncode.git
cd carboncode- Install dependencies:
npm install- Run in development mode:
npm run devYou can build two versions of the installer:
1. Lite Version (Smaller size, requires system compiler)
npm run build:lite
# Output: release/lite/CarbonCode-Lite-x.x.x.exe2. Full Version (Includes MinGW compiler, works out of the box)
npm run build:full
# Output: release/full/CarbonCode-Full-x.x.x.exe| Action | Shortcut |
|---|---|
| New File | Ctrl+N |
| Open File | Ctrl+O |
| Save | Ctrl+S |
| Save As | Ctrl+Shift+S |
| Find / Replace | Ctrl+F |
| Toggle Explorer | Ctrl+B |
| Compile & Run | F5 |
| Quit | Ctrl+Q |
Use the dropdown in the toolbar to select your desired C++ standard:
- C++11
- C++14
- C++17 (default)
- C++20
- C++23
carboncode/
โโโ electron/ # Electron main process
โ โโโ main.ts # Main window & IPC handlers
โ โโโ preload.ts # Secure IPC bridge
โ โโโ compiler.ts # Compilation logic
โ โโโ debugger.ts # GDB Debugger integration
โโโ src/ # React renderer process
โ โโโ components/ # UI components (Editor, DebugPanel, Analytics, etc.)
โ โโโ hooks/ # Custom React hooks (useFileManager, useSettings)
โ โโโ App.tsx # Main application orchestrator
โ โโโ main.tsx # React entry point
โ โโโ index.css # Global styles & themes
โโโ public/ # Static assets (icons, etc.)
โโโ vendor/ # Bundled tools (MinGW-w64)
โโโ package.json # Dependencies & build scripts
โโโ vite.config.ts # Build configuration
โโโ tailwind.config.js # Styling configuration
- Electron - Cross-platform desktop framework
- React 18 - UI library with hooks
- TypeScript - Type-safe JavaScript
- Vite - Fast build tool
- Monaco Editor - VS Code's editor component
- TailwindCSS - Utility-first CSS framework
- Java/JDK - Java compilation and execution support
CarbonCode follows Electron security best practices:
- Context isolation is enabled
- Node integration is disabled in the renderer
- All IPC communication goes through a secure preload script
- Temporary files are cleaned up after compilation
- Ensure you have g++, clang++, or cl.exe installed
- Verify the compiler is in your system PATH
- Restart the application after installing
Your code may have an infinite loop. The execution timeout is 10 seconds.
Check the "Errors" tab in the output panel for detailed error messages from the compiler.
CarbonCode V4 is actively being planned. Here's what's coming next:
- ๐ค AI-Powered Code Suggestions โ Context-aware autocomplete beyond IntelliSense
- ๐จ Custom Themes & Extensions โ User-created themes and plugin support
- ๐ Code Snippets Library โ Reusable snippet manager with cloud sync
- ๐ Live Collaboration โ Real-time pair programming with shared cursors
- โ๏ธ Cloud Sync โ Sync projects and settings across devices
- ๐ซ Classroom Mode โ Teacher dashboard with student progress tracking
- ๐ Memory Profiler โ Visual memory leak detection and heap analysis
- ๐งช Integrated Testing โ Built-in unit testing framework with coverage reports
- ๐ Git Integration โ Visual Git management (commit, branch, merge) inside the IDE
- ๐ง Linux & macOS Installers โ Native builds for all major platforms
- ๐ฑ Web Version โ Browser-based CarbonCode powered by WebAssembly
- ๐ Multi-Language Support โ Extend to Python, Java, and Rust compilation
๐ก Have a feature idea? Open an issue and let us know!
MIT License - see LICENSE file for details.
CarbonCode - Made with โค๏ธ by Rabail Ali Bhatti