https://github.com/ghoshsurya/rapidcompiler
Professional online code editor & compiler with 14+ language support. Monaco Editor, real-time execution, project sharing. Open source alternative to Replit.
https://github.com/ghoshsurya/rapidcompiler
code-editor-online golang ide javascript monaco-editor multi-language online-compiler python react replit-alternative-open-source rust
Last synced: 3 months ago
JSON representation
Professional online code editor & compiler with 14+ language support. Monaco Editor, real-time execution, project sharing. Open source alternative to Replit.
- Host: GitHub
- URL: https://github.com/ghoshsurya/rapidcompiler
- Owner: ghoshsurya
- License: mit
- Created: 2025-09-18T20:48:27.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-10-31T03:54:57.000Z (8 months ago)
- Last Synced: 2025-10-31T05:36:55.208Z (8 months ago)
- Topics: code-editor-online, golang, ide, javascript, monaco-editor, multi-language, online-compiler, python, react, replit-alternative-open-source, rust
- Language: JavaScript
- Homepage: https://rapidcompiler.netlify.app
- Size: 383 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# ๐ RapidCompiler - Professional Online Code Editor & Compiler
[](https://rapidcompiler.netlify.app)
[](https://github.com/ghoshsurya/rapidcompiler)
[](LICENSE)
A production-ready, enterprise-grade online code editor and compiler platform with advanced features, security, and multi-language support. Built with modern technologies and optimized for performance.
## โจ Key Features
### ๐จ **Advanced Code Editor**
- **Monaco Editor** (VS Code engine) with syntax highlighting
- **Intelligent IntelliSense** for all supported languages
- **Custom code snippets** and autocomplete
- **Resizable panels** with drag-and-drop functionality
- **Dark/Light theme** with persistent preferences
### ๐ป **Multi-Language Support**
- **Python** 3.9+ with full library support
- **JavaScript** (Node.js 16) with ES6+ features
- **C/C++** with GCC compiler
- **Java** with OpenJDK 11
- **C#** with .NET runtime
- **PHP** with latest interpreter
- **SQL** with query execution
- **HTML/CSS/JS** with live preview
### ๐ **Enterprise Security**
- **Docker containerization** for isolated execution
- **Resource limits**: 128MB RAM, CPU quotas
- **Network isolation** and timeout protection (10s)
- **JWT authentication** with secure token management
- **Input sanitization** and XSS protection
### ๐ฅ **User Management**
- **Supabase authentication** integration
- **User profiles** with project history
- **Admin dashboard** for platform management
- **Project sharing** with unique URLs
- **Real-time collaboration** ready
### ๐ฆ **NPM Package Available**
- **React Component**: `npm install https://github.com/ghoshsurya/rapidcompiler/raw/main/ghoshsurya-rapidcompiler-react-1.0.0.tgz`
- **Easy Integration**: Drop-in Monaco Editor component
- **TypeScript Support**: Full type definitions included
- **GitHub Releases**: Available at [releases page](https://github.com/ghoshsurya/rapidcompiler/releases)
### ๐ **Production Features**
- **SEO optimized** with meta tags and structured data
- **PWA ready** with offline capabilities
- **Responsive design** for all devices
- **Performance optimized** with code splitting
- **Error tracking** and logging
## ๐๏ธ Architecture
### **Frontend Stack**
```
React 18 + TypeScript
โโโ Monaco Editor (VS Code)
โโโ Tailwind CSS + PostCSS
โโโ React Router v6
โโโ Axios for API calls
โโโ Lucide React icons
โโโ Supabase client
```
### **Backend Stack**
```
Python Flask + PostgreSQL
โโโ Flask-JWT-Extended
โโโ Flask-SQLAlchemy
โโโ Docker Python SDK
โโโ bcrypt encryption
โโโ CORS middleware
โโโ Gunicorn WSGI
```
### **Infrastructure**
```
Docker + Docker Compose
โโโ PostgreSQL 15 database
โโโ Nginx reverse proxy
โโโ Multi-stage builds
โโโ Health checks
โโโ Volume persistence
```
## ๐ Quick Start
### Prerequisites
- **Docker** & **Docker Compose**
- **Node.js** 16+ and **npm**
- **Python** 3.9+ and **pip**
- **Git** for version control
### 1. Clone Repository
```bash
git clone https://github.com/ghoshsurya/rapidcompiler.git
cd rapidcompiler
```
### 2. Environment Setup
```bash
# Backend environment
cp backend/.env.example backend/.env
# Frontend environment
cp frontend/.env.example frontend/.env
```
### 3. Docker Deployment (Recommended)
```bash
# Start all services
docker-compose up --build
# Run in background
docker-compose up -d --build
```
### 4. Manual Development Setup
```bash
# Backend setup
cd backend
pip install -r requirements.txt
python app.py
# Frontend setup (new terminal)
cd frontend
npm install
npm start
```
### 5. Access Application
- **Frontend**: http://localhost:3000
- **Backend API**: http://localhost:5000
- **Database**: PostgreSQL on port 5432
## ๐ Project Structure
```
rapidcompiler/
โโโ ๐ frontend/ # React application
โ โโโ ๐ public/ # Static assets
โ โโโ ๐ src/
โ โ โโโ ๐ components/ # React components
โ โ โโโ ๐ pages/ # Route pages
โ โ โโโ ๐ hooks/ # Custom hooks
โ โ โโโ ๐ lib/ # Utilities
โ โ โโโ ๐ utils/ # Helper functions
โ โโโ ๐ package.json
โ โโโ ๐ tailwind.config.js
โโโ ๐ backend/ # Flask API server
โ โโโ ๐ app.py # Main application
โ โโโ ๐ requirements.txt # Python dependencies
โ โโโ ๐ Dockerfile # Backend container
โโโ ๐ database/ # Database schemas
โ โโโ ๐ schema.sql # PostgreSQL schema
โโโ ๐ docker/ # Docker configurations
โ โโโ ๐ nginx.conf # Nginx config
โโโ ๐ netlify/ # Serverless functions
โ โโโ ๐ functions/ # API functions
โโโ ๐ docker-compose.yml # Multi-container setup
โโโ ๐ netlify.toml # Netlify deployment
โโโ ๐ README.md # Documentation
```
## ๐ API Documentation
### Authentication Endpoints
```http
POST /api/auth/register # User registration
POST /api/auth/login # User login
GET /api/auth/profile # Get user profile
```
### Code Execution
```http
POST /api/run # Execute code
{
"language": "python",
"code": "print('Hello World')",
"input": "optional input"
}
```
### Project Management
```http
GET /api/projects # List user projects
POST /api/projects # Create new project
GET /api/projects/:id # Get project details
PUT /api/projects/:id # Update project
DELETE /api/projects/:id # Delete project
POST /api/projects/:id/share # Share project
```
### Public Endpoints
```http
GET /api/share/:shareId # Get shared project
GET /api/health # Health check
```
## ๐ก๏ธ Security Implementation
### Code Execution Security
- **Docker isolation** with restricted containers
- **Resource limits**: Memory (128MB), CPU quotas
- **Network disabled** during execution
- **Timeout protection** (10 seconds max)
- **Temporary file cleanup**
### Authentication Security
- **JWT tokens** with expiration
- **bcrypt password hashing**
- **CORS protection**
- **Input validation** and sanitization
- **SQL injection prevention**
### Infrastructure Security
- **Environment variables** for secrets
- **Database connection pooling**
- **Rate limiting** ready
- **HTTPS enforcement** in production
## ๐ SEO & Performance
### SEO Features
- **Meta tags** (Open Graph, Twitter Cards)
- **Structured data** (JSON-LD)
- **XML sitemap** generation
- **Robots.txt** optimization
- **Canonical URLs**
- **Semantic HTML5** structure
### Performance Optimizations
- **Code splitting** and lazy loading
- **Bundle optimization** with Webpack
- **Image optimization** and compression
- **CDN ready** for static assets
- **Caching strategies** implemented
## ๐ Deployment Options
### 1. Netlify (Frontend) + Railway (Backend)
```bash
# Frontend deployment
npm run build
netlify deploy --prod --dir=build
# Backend deployment
git push railway main
```
### 2. Docker Production
```bash
# Production build
docker-compose -f docker-compose.prod.yml up -d
```
### 3. AWS/GCP/Azure
- **Container deployment** with ECS/Cloud Run
- **Database**: RDS/Cloud SQL
- **Storage**: S3/Cloud Storage
- **CDN**: CloudFront/Cloud CDN
## ๐งช Testing
```bash
# Frontend tests
cd frontend
npm test
# Backend tests
cd backend
python -m pytest
# Integration tests
python test-api.py
python test-compilers.py
```
## ๐ Monitoring & Analytics
- **Error tracking** with Sentry integration ready
- **Performance monitoring** with Web Vitals
- **User analytics** with Google Analytics
- **API monitoring** with health checks
- **Database monitoring** with connection pooling
## ๐ค Contributing
1. **Fork** the repository
2. **Create** feature branch (`git checkout -b feature/amazing-feature`)
3. **Commit** changes (`git commit -m 'Add amazing feature'`)
4. **Push** to branch (`git push origin feature/amazing-feature`)
5. **Open** Pull Request
## ๐ License
This project is licensed under the **MIT License** - see the [LICENSE](LICENSE) file for details.
## ๐จ๐ป Author
**Suryakanta Ghosh** - [@ghoshsurya](https://github.com/ghoshsurya)
## ๐ฐ Support the Project
**RapidCompiler is free and open source!** Support development:
- โญ **Star** this repository
- ๐ **Sponsor** on [GitHub Sponsors](https://github.com/sponsors/ghoshsurya)
- โ๏ธ **Use** [RapidCompiler Cloud](https://rapidcompiler.com) (coming soon)
- ๐ **Report** bugs and suggest features
- ๐ค **Contribute** code and documentation
## ๐ RapidCompiler Cloud (SaaS)
**Coming Soon**: Hosted version with premium features:
- Real-time collaboration
- Private projects
- Advanced analytics
- Priority support
- Team workspaces
[Join Waitlist](https://rapidcompiler.com/waitlist) for early access!
## ๐ Acknowledgments
- **Monaco Editor** team for the excellent code editor
- **Docker** for containerization technology
- **React** and **Flask** communities
- **Open source** contributors
---
โญ Star this repository โข ๐ Sponsor the project โข โ๏ธ Try RapidCompiler Cloud