CodeBrim - Compiler on the Go! π
CodeBrim lets developers run, edit, and share code projects online with full Git integration, multi-file support, and Docker-secure execution β no GitHub required.
CodeBrim is a deployed robust code execution platform supporting Python, JavaScript, Java, C++, C, and Go using Docker containerization on AWS EC2, ensuring complete runtime isolation security. Engineered with distinctive collaboration capabilities including Git integration, real-time multi-file support, and persistent code sharing via unique URLs - features unavailable in other competing platforms.
- C/C++ - Full compilation with GCC support
- Java - Complete Java environment with JDK
- Python - Latest Python runtime environment
- JavaScript - Node.js execution engine
- Go - Go compiler with full standard library
- Text Files - Documentation and configuration file support
- Persistent Code Sharing - Share multiple files through a single unique URL
- Access Control - Grant either editable or read-only access to shared projects
- Real-time Multi-file Support - Collaborate on entire project structures with complete file and folder structure
- Cross-platform Compatibility - Access from any device with a browser
- Direct Repository Management - Pull public repositories directly on the website
- Live Code Editing - Make changes and run code in real-time
- Push to Remote - Push changes back to remote repositories
- Full Git Workflow - Complete version control through web interface
- Branch Management - Switch and manage branches seamlessly
- Docker Containerization - Complete runtime isolation on AWS EC2
- 99.9% Uptime - Reliable infrastructure with high availability on ec2
- Scalable Architecture - Message queue system for concurrent execution in the backend
- AWS EC2 Deployment - Professional cloud infrastructure
- Next.js 14 - React framework for production
- Tailwind CSS - Utility-first CSS framework
- Zustand - State management
- TypeScript - Type-safe development
- Express.js - Fast Node.js web framework
- TypeScript - End-to-end type safety
- WebSockets - Real-time communication
- Message Queues - Scalable task processing
- Docker - Containerized code execution
- Prisma - Modern database toolkit
- PostgreSQL - Primary relational database
- Redis - Caching and session management
- AWS EC2 - Backend hosting with 99.9% uptime
- Docker Engine - Container orchestration
- Linux - Server environment
- Vercel - Frontend deployment
- Node.js 24
- Docker (Docker Desktop on Windows/macOS) with Docker Compose
Postgres and Redis run in Docker, and so does every code execution.
- Clone the repository
git clone https://github.com/jinendra3/codebrim.git
cd codebrim- Install dependencies
npm install
cd Backend && npm install && cd ..
cd Frontend && npm install && cd ..- Start Postgres and Redis
docker compose up -d- Environment setup
cp Backend/.env.sample Backend/.env
cp Frontend/.env.local.sample Frontend/.env.localThe samples already point at the services from docker-compose.yml and at the local backend:
| Variable | File | Purpose |
|---|---|---|
DATABASE_URL |
Backend/.env |
Postgres connection string |
DOCKER_SUDO |
Backend/.env |
true if docker only works via sudo |
NEXT_PUBLIC_BACKEND |
Frontend/.env.local |
Backend URL, e.g. http://localhost:5000 |
- Create the database tables
cd Backend && npx prisma migrate deploy && cd ..- Prepare the code execution images (one time, downloads ~6 GB; on Windows run it from Git Bash)
bash Backend/dock/prepare-images.sh- Start the development servers
npm run devThe application will be available at:
- Frontend: http://localhost:3000
- Backend: http://localhost:5000
bun startOne-time setup, from Backend/, with Docker and Redis installed on the server:
# Postgres in Docker, bound to 127.0.0.1, data in /var/lib/codebrim/postgres
POSTGRES_PASSWORD=$(openssl rand -hex 24) bash db/start-postgres.sh # keep the password
# Backend/.env (or the service's EnvironmentFile)
# DATABASE_URL="postgresql://codebrim:<password>@127.0.0.1:5432/codebrim"
# DOCKER_SUDO="true" # if the app user is not in the docker group
npx prisma migrate deploy
DOCKER_SUDO=true bash dock/prepare-images.shOn every deploy, .github/workflows/deploy.yml pulls the code, applies migrations, prepares the images and restarts the service.
-
bun dev- Start both frontend and backend in development mode -
bun dev:frontend- Start only frontend development server -
bun dev:backend- Start only backend development server -
bun start- Build and start production servers -
bun start:frontend- Build and start production frontend -
bun start:backend- Start production backend -
bun install- Install all dependencies -
bun format- Format code with Prettier
CodeBrim has evolved through multiple versions:
- v1.0: MVP with basic compilation features
- v2.0: Major refactoring and design improvements
- v3.0: Enhanced functionality with:
- File and folder support
- Fixed Git integrations
- Improved workspace locking
- Overall code refactoring
- Performance optimizations
We welcome contributions from the community! Here's how you can help:
- Fork the repository on GitHub
- Clone the forked repository to your local machine
- Follow the installation steps above
- Open an issue and get it assigned
- Create a feature branch (
git checkout -b feature/amazing-feature) - Open a Pull Request
Found a bug or have a feature request?
- Create a new issue with detailed description
- Wait for approval from maintainers
- Submit your Pull Request after approval
- π Bug fixes
- β¨ New features
- π Documentation improvements
- π¨ UI/UX enhancements
- β‘ Performance optimizations
- π§ͺ Test coverage
- π§ DevOps improvements
This project is licensed under the GNU Affero General Public License v3.0 - see the LICENSE file for details.
Benevolent Dictator for Life: Jinendra Jain