An online code editor and compiler supporting multiple languages with real-time compilation capabilities. CompileX provides a seamless coding experience right in your browser, offering a fully interactive terminal and file tree. Perfect for demos, workshops, or just hacking around!
-
Multiple Language Support
Write and compile code in multiple languages (e.g., C, C++, Java, Python, etc.). -
Real-Time Compilation
Watch your code’s output update as you type. No manual refresh needed. -
Integrated Terminal
A terminal embedded in the browser, powered by Socket.IO and node-pty. Execute commands in real time. -
File Tree
Create, edit, and navigate project files in a folder-like structure on the client. -
Full-Stack Setup
- Backend: Node.js + Express + Socket.IO + node-pty
- Frontend: React + Socket.IO client
- Node.js (Recommended LTS version or later)
- npm (bundled with Node.js)
- A modern browser (Chrome, Firefox, Edge, Safari, etc.)
(Optional) If you plan to run inside Docker, ensure you have Docker installed.
Below are the steps for a typical local installation and usage.
git clone https://github.com/shihabshahrier/CompileX.git
cd CompileX
cd server
npm install
npm run dev
Note: Keep this terminal open to continue running the server in the background.
Open a new terminal window (so the server remains running in the old one):
cd ../client
npm install
npm run dev
Open your browser and go to:
http://localhost:5173/
You should now see the CompileX interface.
- Create or select a file from the file tree on the left side of the screen.
- Write or paste your code in the built-in editor.
- Watch the real-time output in the integrated terminal. You can also type commands in this terminal if needed.
- File changes automatically sync with the server, so you can collaborate or work in multiple tabs without losing your edits.
CompileX
├─ client/ # Frontend (React + Socket.IO client)
│ ├─ public/ # Public static assets
│ ├─ src/
│ │ ├─ components/ # React components (Terminal, FileTree, Editor, etc.)
│ │ ├─ App.jsx # Main app component
│ │ └─ ...
│ ├─ package.json
│ └─ ...
├─ server/ # Backend (Node.js + Express + Socket.IO + node-pty)
│ ├─ user/ # Folder for user code/files
│ ├─ index.js # Main server script
│ ├─ package.json
│ └─ ...
└─ README.md # This file
- Fork this repository.
- Clone your fork locally.
- Create a new branch for your feature/fix:
git checkout -b feature/my-awesome-feature
- Commit your changes:
git commit -m "Add my awesome feature"
- Push to your branch:
git push origin feature/my-awesome-feature
- Open a Pull Request on GitHub.
We welcome all contributions—bug fixes, new features, or documentation improvements!
- Author: @shihabshahrier
- Project Repository: https://github.com/shihabshahrier/CompileX