Skip to content

About

A modern, fast, and offline C++ IDE built with Electron, React, and Monaco Editor. Features native compilation using g++/clang++/MSVC, IntelliSense support, and a premium Dark UI for a seamless coding experience.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

ย 

History

37 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

CarbonCode Logo

CarbonCode

A lightweight, offline IDE for C, C++, Java, and Python
Developed by Rabail Ali Bhatti

Version License Platform Electron


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.

โœจ Features

  • ๐Ÿ“‚ 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 .json files right from the File Explorer with distinct badges and inline creation
  • ๐Ÿ’ก Rich File Handling IntelliSense - Autocomplete and prebuilt snippets for <fstream>, <filesystem>, Java File/Files/Path/Scanner/PrintWriter, Python open/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 javac detection with standard library IntelliSense
  • ๐Ÿ’พ 100% Offline First - Bundled offline Monaco Editor and local compiler runtime with zero network dependencies

๐Ÿ“‹ Prerequisites

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:

Windows (Lite Version)

  • Option 1: MinGW-w64 (Recommended)

    1. Download from MinGW-w64
    2. Add the bin folder to your system PATH
    3. Verify: g++ --version
  • Option 2: Visual Studio Build Tools

    1. Download Visual Studio Build Tools
    2. Install "Desktop development with C++"
    3. Open the "Developer Command Prompt" to compile

macOS

# Install Xcode Command Line Tools
xcode-select --install

# Verify installation
clang++ --version

Linux (Ubuntu/Debian)

# Install g++
sudo apt update
sudo apt install build-essential

# Verify installation
g++ --version

Linux (Fedora)

sudo dnf install gcc-c++

Linux (Arch)

sudo pacman -S gcc

Java JDK (Required for Java support)

To compile and run Java programs, you need the Java Development Kit (JDK):

Windows:

  1. Download Eclipse Temurin JDK or Oracle JDK
  2. Install and ensure javac is on your PATH
  3. Verify: javac -version

macOS:

# Install via Homebrew
brew install openjdk

# Verify
javac -version

Linux (Ubuntu/Debian):

sudo apt update
sudo apt install default-jdk
javac -version

๐Ÿš€ Installation

From Source

  1. Clone the repository:
git clone https://github.com/rabailalibhatti/carboncode.git
cd carboncode
  1. Install dependencies:
npm install
  1. Run in development mode:
npm run dev

Building for Distribution

You 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.exe

2. Full Version (Includes MinGW compiler, works out of the box)

npm run build:full
# Output: release/full/CarbonCode-Full-x.x.x.exe

โŒจ๏ธ Keyboard Shortcuts

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

๐Ÿ”ง Selecting C++ Standard

Use the dropdown in the toolbar to select your desired C++ standard:

  • C++11
  • C++14
  • C++17 (default)
  • C++20
  • C++23

๐Ÿ“ Project Structure

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

๐Ÿ› ๏ธ Technical Stack

  • 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

๐Ÿ”’ Security

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

๐Ÿ› Troubleshooting

"No compiler detected"

  1. Ensure you have g++, clang++, or cl.exe installed
  2. Verify the compiler is in your system PATH
  3. Restart the application after installing

Compilation times out

Your code may have an infinite loop. The execution timeout is 10 seconds.

Compilation errors

Check the "Errors" tab in the output panel for detailed error messages from the compiler.

๐Ÿ”ฎ Future Enhancements โ€” V4 Roadmap

CarbonCode V4 is actively being planned. Here's what's coming next:

Phase 1: Smart Editor

  • ๐Ÿค– 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

Phase 2: Collaboration & Cloud

  • ๐ŸŒ 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

Phase 3: Advanced Tooling

  • ๐Ÿ“Š 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

Phase 4: Cross-Platform & Beyond

  • ๐Ÿง 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!

๐Ÿ“„ License

MIT License - see LICENSE file for details.


CarbonCode - Made with โค๏ธ by Rabail Ali Bhatti

About

A modern, fast, and offline C++ IDE built with Electron, React, and Monaco Editor. Features native compilation using g++/clang++/MSVC, IntelliSense support, and a premium Dark UI for a seamless coding experience.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages