![]() |
CodeLearning helps users learn to code through video lessons and hands-on exercises, practice data structures and algorithms in languages such as C++, Java, Python, and JavaScript with an Online Judge that automatically runs submitted code against test cases and provides feedback on correctness, execution time, and memory usage, and take part in programming contests that follow ICPC rules, with time limits, penalty scoring, and live rankings.
| Feature | Description |
|---|---|
| Courses & E-Learning | Learn through video lessons, quizzes, and coding exercises organized into chapters, with progress tracking. |
| Online Judge | Write and submit code in C++, Java, Python, or JavaScript, with automatic testcase grading, verdicts, and live submission updates. |
| Automated Testcase Generator | Generate test inputs and expected outputs using a data generator and a reference solution. |
| Competitive Contests | Organize ICPC-style contests with time limits, penalty scoring, live rankings, and scoreboard freezing. |
| Cart, Wallet & Payments | Purchase courses through a shopping cart, apply vouchers, top up a wallet, and pay through PayOS or wallet balance. |
| Authentication RBAC | Sign in with email/password or Google, with role-based access for learners, instructors, and administrators. |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Ensure the following tools are installed on your environment:
- Docker and Docker Compose (Required for containerized runtime)
- JDK 21 (Required for local backend development)
- Node.js 20+ and
npm(Required for local frontend development)
Create a .env file in the backend/ directory:
# POSTGRES DATABASE
DB_HOST=localhost
DB_PORT=5432
DB_NAME=codelearning
DB_USERNAME=postgres
DB_PASSWORD=your_secure_password
# REDIS CACHE
REDIS_HOST=localhost
REDIS_PORT=6379
# RABBITMQ
RABBITMQ_HOST=localhost
RABBITMQ_PORT=5672
RABBITMQ_USERNAME=guest
RABBITMQ_PASSWORD=guest
# SECURITY & JWT
JWT_SIGNER_KEY=your_super_secret_32_characters_key_here
# CLOUDINARY CONFIGURATION
CLOUDINARY_CLOUD_NAME=your_cloudinary_name
CLOUDINARY_API_KEY=your_cloudinary_key
CLOUDINARY_API_SECRET=your_cloudinary_secret
#PAYOS CONFIGURATION
PAYOS_CLIENT_ID=your_payos_client_id
PAYOS_API_KEY=your_payos_api_key
PAYOS_CHECKSUM_KEY=your_payos_checksum_key
# JUDGE0 SANDBOX (OJ)
JUDGE0_API_URL=http://localhost:2358
JUDGE0_WEBHOOK_URL=http://domain:8080/codelearning/online-judge/webhooks/submissions
# SENDGRID CONFIGURATION
SENDGRID_API_KEY=your_sendgrid_api_key
SENDGRID_WEBHOOK_PUBLIC_KEY=your_sendgrid_webhook_public_key
SENDGRID_FROM_EMAIL=your_sendgrid_from_email
SENDGRID_FROM_NAME=your_sendgrid_from_nameCreate a .env file in the frontend/ directory:
VITE_API_BASE_URL=http://localhost:8080/codelearning
VITE_GOOGLE_CLIENT_ID=your_google_oauth_client_idTo run the application manually for development or debugging:
docker compose -f docker-compose.dev.yml up -d db redis rabbitmq judge0-server judge0-workers judge0-db judge0-redisNote: Judge0 1.13.1 requires cgroup v1.
- Ubuntu: Use Ubuntu 22.04 (x86-64) with cgroup v1 enabled.
- Windows: Use Docker Desktop 4.28.0 + WSL 2 as a compatibility reference and verify that Docker is using cgroup v1.
- macOS (Intel / Apple Silicon): Run Judge0 in an Ubuntu 22.04 (x86-64) virtual machine with Docker Engine and cgroup v1 enabled.
cd backend
./mvnw clean package -DskipTests
./mvnw spring-boot:runThe API will be available at http://localhost:8080/codelearning.
cd frontend
npm install
npm run devThe frontend application will be available at http://localhost:5173.






