Skip to content

A modern web-based IDE supporting Python, JavaScript, Java, C++, C, and Bash with real-time code execution, beautiful UI, and cloud deployment ready.

KrishJani/Scalable-Multi-Language-IDE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Multi-Language IDE

A modern, scalable web-based IDE that supports multiple programming languages with a beautiful, responsive interface.

✨ Features

  • Multi-Language Support: Python, JavaScript, Java, C++, C, and Bash
  • Modern UI: Beautiful, responsive HTML interface
  • Real-time Execution: Execute code and see results instantly
  • Language Switching: Easy switching between programming languages
  • Error Handling: Comprehensive error reporting and validation
  • Cloud Deployment: Ready for Railway, Render, and other platforms
  • Security: Input validation and execution timeouts

πŸ› οΈ Tech Stack

Backend

  • Java 17 with Spring Boot 3.2.0
  • RESTful API with proper error handling
  • Multi-threaded execution with timeout protection
  • Docker containerization

Frontend

  • Pure HTML/CSS/JavaScript for maximum compatibility
  • Responsive design for mobile and desktop
  • Modern UI with professional styling

πŸš€ Quick Start

Prerequisites

  • Docker (for containerized deployment)
  • Java 17+ (for local development)
  • Maven (for local development)

Local Development

  1. Clone the repository

    git clone https://github.com/KrishJani/Scalable-Multi-Language-IDE.git
    cd Scalable-Multi-Language-IDE
  2. Build and run the backend

    cd backend
    ./mvnw clean package
    java -jar target/ide-java-1.0.0.jar
  3. Access the application

Docker Deployment

  1. Build and run with Docker

    docker build -t multi-language-ide .
    docker run -p 8080:8080 -p 3000:3000 multi-language-ide
  2. Access the application

🌐 Cloud Deployment

Railway (Recommended - FREE)

  1. Push to GitHub (already done)
  2. Go to Railway.app
  3. Sign up with GitHub
  4. Click "New Project" β†’ "Deploy from GitHub repo"
  5. Select your repository
  6. Railway will automatically deploy!

Your IDE will be live at: https://your-app-name.railway.app

πŸ“š API Documentation

Endpoints

Execute Code

POST /api/execute
Content-Type: application/json

{
  "code": "print('Hello World!')",
  "language": "python"
}

Response:

{
  "output": "Hello World!",
  "error": ""
}

Get Supported Languages

GET /api/languages

Response:

{
  "python": "Python 3",
  "javascript": "JavaScript (Node.js)",
  "java": "Java",
  "cpp": "C++",
  "c": "C",
  "bash": "Bash Shell"
}

πŸ”§ Configuration

Environment Variables

  • SPRING_PROFILES_ACTIVE: Spring profile (default: docker)
  • REACT_APP_API_URL: Backend API URL (default: http://localhost:8080)

Supported Languages

Language Extension Compiler/Interpreter
Python .py python3
JavaScript .js node
Java .java javac + java
C++ .cpp g++
C .c gcc
Bash .sh bash

πŸ›‘οΈ Security Features

  • Input Validation: Code length limits and language validation
  • Execution Timeout: 10-second timeout to prevent infinite loops
  • Sandboxed Execution: Temporary files are cleaned up automatically
  • Error Isolation: Proper error handling and reporting

🎨 UI Features

  • Monaco Editor: Professional code editor with syntax highlighting
  • Language Selection: Easy switching between programming languages
  • Theme Toggle: Dark and light theme support
  • File Operations: Upload and download code files
  • Responsive Design: Works on desktop and mobile devices
  • Real-time Feedback: Loading states and error messages

🐳 Docker Configuration

The application uses multi-stage Docker builds for optimal performance:

  • Backend: Java 17 with all necessary compilers
  • Frontend: Node.js 18 with optimized build
  • Health Checks: Automatic service health monitoring
  • Networking: Isolated Docker network for security

πŸ“ Development

Project Structure

β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ src/main/java/com/replitclone/
β”‚   β”‚   β”œβ”€β”€ controller/     # REST controllers
β”‚   β”‚   β”œβ”€β”€ model/         # Data models
β”‚   β”‚   β”œβ”€β”€ service/       # Business logic
β”‚   β”‚   └── ReplitCloneApplication.java
β”‚   └── Dockerfile
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ App.js         # Main React component
β”‚   β”‚   └── App.css        # Styling
β”‚   └── Dockerfile
└── docker-compose.yml

Adding New Languages

  1. Update CodeExecutor.java with new language support
  2. Add language to SUPPORTED_LANGUAGES map
  3. Update frontend language dropdown
  4. Add default code template

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

πŸ“„ License

This project is licensed under the MIT License.

πŸ†˜ Troubleshooting

Common Issues

  1. Backend not starting: Check if Java 17+ is installed
  2. Frontend build fails: Ensure Node.js 18+ is installed
  3. Docker build fails: Check Docker daemon is running
  4. Code execution fails: Verify compilers are installed in Docker container

Logs

# View all logs
docker-compose logs

# View specific service logs
docker-compose logs backend
docker-compose logs frontend

Happy Coding! πŸŽ‰

About

A modern web-based IDE supporting Python, JavaScript, Java, C++, C, and Bash with real-time code execution, beautiful UI, and cloud deployment ready.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published