An online code compiler & coding platform powered by a custom-built Node.js backend.
- 🔥 Real-time code execution for JavaScript, Python, Java, and C++
- ✨ Code editor with Monaco Editor (VS Code UI)
- ✅ Run test cases and custom input
- 📚 Question database powered by MongoDB
- 🧠 LeetCode-style question screen with constraints, examples, difficulty tags
- 🛠️ Built from scratch: custom compiler backend using child process
| Frontend | Backend | Database | Code Execution |
|---|---|---|---|
| React.js | Node.js + Express | MongoDB (Mongoose) | Native Compiler (child_process) |
git clone https://github.com/your-username/SupremeCoding.git
cd SupremeCodingcd server
npm install
node index.jsNOTE: Ensure compilers (g++, javac, python, node) are installed on your system.
cd client
npm install
npm run devPOST /api/compile
{
code: "...",
language: "cpp" | "python" | "java" | "javascript",
input: "user input"
}
✅ Returns output or error based on compilationSUPREME_CODING/
├── public/ # Static assets (if any)
│
├── server/ # Backend (Node.js + Compiler)
│ ├── compiler/ # Custom compiler logic
│ │ ├── temp/
│ │ └── index.js
│ ├── data/
│ │ └── questions.js # Array of questions (acts like DB)
│ ├── routes/
│ │ ├── compiler.js # /api/compile route
│ │ └── questions.js
│ ├── index.js #Express server
│ ├── package.json
│ └── package-lock.json
│
├── src/ # Frontend
│ ├── assets/
│ ├── components/
│ ├── screens/ # Pages like SolutionScreen.jsx
│ ├── App.jsx
│ ├── App.css
│ ├── main.jsx # ReactDOM root
│ ├── index.css # Tailwind or global styles
│
├── .env # Environment variables
├── .gitignore
├── index.html
├── package.json # React app config
├── package-lock.json
└── README.md
Frontend ➜ POST /api/compile ➜<br>
Backend (child_process)<br>
➜ Saves code + input<br>
➜ Compiles (if needed)<br>
➜ Runs & captures output<br>
➜ Deletes temp folder<br>
- ✅ Compare output with expected
- 💥 Show Pass/Fail with color indicators using "react-hot-toast"
- 🕐 Execution time is recorded
- 🔐 Add Auth (JWT)
- 📈 Leaderboard
- 🧠 Save Submissions
- 📊 Code Metrics + Time
git checkout -b feature/your-feature
git commit -m "Add: new feature"
git push origin feature/your-feature💻 Author: Utkarsh
📧 Email: [email protected]
🐙 GitHub: https://github.com/UKbhatt
Built in Dark Theme because Light Attracts Bugs 🐞
