Skip to content

Skyl1te/codearena

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CodeArena

CodeArena is a web platform for solving algorithmic programming problems with an automated judging system. Users can browse problems, submit solutions, receive results from the judge, and compete with others on a leaderboard.


Features

  • 📚 Browse programming problems
  • 🔎 Filter problems by difficulty
  • 🧠 Solve algorithmic challenges
  • ⚡ Automatic solution judging
  • 🏆 Leaderboard with rankings
  • 👤 User profiles
  • 🔐 User registration and login
  • 📜 History of accepted submissions

Technologies Used

This project is built with:

  • Python
  • Django
  • HTML
  • Bootstrap
  • SQLite / PostgreSQL
  • Custom judging system

Project Structure

CodeArena/
│
├── templates/
│   ├── login.html
│   ├── register.html
│   ├── profile.html
│   └── submit.html
│
├── problems/
│   ├── views.py
│   ├── models.py
│   └── judge.py
│
└── manage.py

Pages

Login

login.html

Allows users to log into their accounts.

Includes:

  • username field
  • password field
  • login form

Register

register.html

Allows new users to create an account.

Features:

  • account creation
  • form validation
  • error messages display

Example form:

<form method="post">
{% csrf_token %}

Profile

profile.html

Displays information about a user.

Includes:

  • username
  • avatar
  • user statistics
  • number of solved problems

Submit Solution

submit.html

Allows users to submit code for a specific problem.

Users can:

  • write code
  • choose programming language
  • submit the solution for judging

Backend Logic

Main backend logic is implemented in:

views.py

problem_list

Displays the list of available problems.

Features:

  • show all problems
  • filter by difficulty

problem_detail

Displays details of a specific problem.


rankings_list

Shows the leaderboard of top users.

Ranking is based on:

  • number of solved problems
  • number of submissions

submit_solution

Handles code submissions.

Process:

  1. User submits code
  2. A Submission object is created
  3. The judge processes the submission
  4. Test cases are executed

submissions_list

Displays all accepted submissions for the current user.


Judging System

The judging logic is implemented in:

judge.py

Responsibilities:

  • running user code
  • executing test cases
  • determining the result

Possible results:

  • Accepted
  • Wrong Answer
  • Runtime Error
  • Time Limit Exceeded

Leaderboard

Users are ranked based on:

number of solved problems

and

total number of submissions

Running the Project

1. Clone the repository

git clone https://github.com/yourusername/codearena.git

2. Create a virtual environment

python -m venv venv

3. Activate the environment

Windows

venv\Scripts\activate

Linux / Mac

source venv/bin/activate

4. Install dependencies

pip install -r requirements.txt

5. Run migrations

python manage.py migrate

6. Start the development server

python manage.py runserver

Future Improvements

  • 🧠 support for multiple programming languages
  • 🏆 coding contests
  • 📈 advanced statistics
  • 🔔 notification system
  • 📦 Docker deployment
  • ⚡ asynchronous judging system

Author

Skyl1te

CodeArena was created as a learning project to practice:

  • Django development
  • algorithmic problem solving
  • building an online judge system.

About

CodeArena is a web platform for solving algorithmic programming problems with an automated judging system. Users can browse problems, submit solutions, receive results from the judge, and compete with others on a leaderboard.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors