Skip to content

About

E-learning & Online Judge platform for learning programming and practicing data structures and algorithms (DSA).

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Repository files navigation

CodeLearning logo CODELEARNING

CodeLearning Home

Overview

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.

Key Features

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.

Platform Screenshots

Problems list
Problem solving workspace
Contests
Contest problems
Contest ranking
Payments

Getting Started

Prerequisites

Ensure the following tools are installed on your environment:

1. Environment Configuration

Backend Configuration (backend/.env):

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_name

Frontend Configuration (frontend/.env):

Create a .env file in the frontend/ directory:

VITE_API_BASE_URL=http://localhost:8080/codelearning
VITE_GOOGLE_CLIENT_ID=your_google_oauth_client_id

2. Running Locally

To run the application manually for development or debugging:

Step 1: Start Supporting Infrastructure

docker compose -f docker-compose.dev.yml up -d db redis rabbitmq judge0-server judge0-workers judge0-db judge0-redis

Note: 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.

Step 2: Start the Backend

cd backend
./mvnw clean package -DskipTests
./mvnw spring-boot:run

The API will be available at http://localhost:8080/codelearning.

Step 3: Start the Frontend

cd frontend
npm install
npm run dev

The frontend application will be available at http://localhost:5173.

About

E-learning & Online Judge platform for learning programming and practicing data structures and algorithms (DSA).

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages