OJ Evaluate Cloud is an open-source online judge backend built with Java, Spring Boot, Spring Cloud Alibaba, Nacos, RabbitMQ, Redis, MySQL, and Docker Compose.
The project is designed for students and developers who want to learn how an online judge system works in practice: problem management, code submission, asynchronous judging, code sandbox execution, result evaluation, and service-to-service collaboration.
中文说明:这是一个开源 OJ 判题评测云后端项目,用于学习和实践在线评测系统、代码沙箱、异步判题、微服务拆分和后端工程化。
- Microservice architecture: user service, question service, judge service, gateway, API client, shared model, and code sandbox service.
- Online judge workflow: problem creation, code submission, queue-based judging, sandbox execution, and judge result persistence.
- Code sandbox integration: isolates code execution behind a dedicated sandbox service interface.
- Async judge pipeline: RabbitMQ-based message flow for judge task dispatch and acknowledgement.
- Cloud-native local setup: MySQL, Redis, Nacos, and RabbitMQ can be started with Docker Compose.
- Learning-friendly design: architecture diagrams and module boundaries are kept explicit for developers studying OJ systems.
.
├── evaluate-api-client # Feign/API client shared by services
├── evaluate-code-sandbox-service # Code sandbox execution service
├── evaluate-common # Shared common utilities
├── evaluate-gateway # Spring Cloud Gateway entry point
├── evaluate-judge-service # Judge orchestration service
├── evaluate-model # Shared domain models and DTOs
├── evaluate-question-service # Problem and submission service
├── evaluate-user-service # User service
├── mysql-init # Database initialization scripts
├── docker-compose.env.yml # MySQL / Redis / Nacos / RabbitMQ
└── docker-compose.service.yml # Application services
| Area | Technology |
|---|---|
| Language | Java 8 |
| Framework | Spring Boot 2.6.13 |
| Microservices | Spring Cloud, Spring Cloud Alibaba, Nacos, OpenFeign |
| Gateway | Spring Cloud Gateway |
| Database | MySQL, MyBatis-Plus |
| Cache / session | Redis, Spring Session |
| Messaging | RabbitMQ |
| Deployment | Docker Compose |
| API docs | Knife4j / Swagger |
- JDK 8
- Maven 3.6+
- Docker
- Docker Compose V2
git clone https://github.com/overFloweee/OJ-evaluate-cloud.git
cd OJ-evaluate-cloudmvn -DskipTests packageIf Maven dependency download is slow, configure a nearby Maven mirror in your local settings.xml.
docker compose -f docker-compose.env.yml up -dThis starts the required local infrastructure, including MySQL, Redis, Nacos, and RabbitMQ.
docker compose -f docker-compose.service.yml up -ddocker statsIf a service fails to start, you can run it in the foreground to inspect logs. For example:
docker compose -f docker-compose.service.yml up evaluate-gateway| Service | Port | Context path |
|---|---|---|
| Gateway | 8101 | / |
| User service | 8102 | /api/user |
| Question service | 8103 | /api/question |
| Judge service | 8104 | /api/judge |
| Code sandbox service | 8105 | /api/codesanbox |
- Frontend: https://github.com/overFloweee/OJ-evaluate-cloud-frontend
- Single-service version: https://github.com/overFloweee/OJ-evaluate-cloud-single
This project is an early-stage open-source learning and infrastructure project. The next maintenance focus is to improve documentation, add automated tests, harden the code sandbox boundary, and make the deployment process easier for new contributors.
See ROADMAP.md for the planned work.
Contributions are welcome. You can help by improving documentation, fixing bugs, adding tests, simplifying deployment, or improving the judge and sandbox workflow.
Please read CONTRIBUTING.md before opening an issue or pull request.
Code execution is a sensitive area. If you find a security issue related to sandboxing, command execution, authentication, or data isolation, please follow SECURITY.md.
This project is licensed under the MIT License.




