
A full-stack Online Judge (OJ) platform where users can participate in contests and submit code securely inside a sandboxed environment.
- Frontend: Next.js (React-based UI framework)
- Backend: Go (Echo framework)
- Worker: Go (Worker pool for code execution)
- Code Execution: isolate (Secure sandboxing of untrusted code)
- Message Broker: RabbitMQ (Message broker for worker pool)
- User registration and authentication using JWT
- Contest and problem management
- Secure code execution via isolated worker pool
- RESTful API design with Echo
- PostgreSQL (optional) support via GORM ORM
- Go
v1.23+
– Install Go - Node.js
v20+
– for frontend - Docker (optional) – for local containerized setup
- isolate – installed on the host (Linux only)
Make sure all dependencies are installed.
Clone the repo:
git clone https://github.com/lugnitdgp/Online-Judge-2.0.git
- Use node v20+ (you can use nvm to change node version)
nvm use 20
-
Set environment variables (refer to
.env.example
) -
Get inside frontend directory, install dependencies and run frontend
cd frontend
npm install
npm run dev
-
Use Go v1.23+
-
Set environment variables (refer to
.env.example
) -
Get inside backend directory, run backend
cd backend
go mod tidy
go run server.go
-
Install Isolate locally (Linux machine)
-
Remove
sudo
temporarily by adding this line to yourvisudo
<username> ALL=(ALL) NOPASSWD: ALL
- Get inside worker directory and run worker
cd worker
go mod tidy
go run worker.go
Always use atomic commit messages (monorepo best-practice) create PR against the main branch.
- e.g. [Area]: [Component/file]: Context in one line
© GNU/Linux User's Group, NIT Durgapur