How do people become good at something ? By doing it regularly, right ? That's why this project aims to help all the students in practicing programming regularly by maintaining a leaderboard. The website will be have 6 different leaderboards
- LeaderBoard Website + Django backend to collect data from different sources( APIs and web scraping )
- Leaderboard type 1 : Github profile activeness (based on commits/stars etc.)
- Leaderboard type 2 : OpenLake contributions (based on commits/pull requests etc.)
- Leaderboard type 3 : Codechef ranking
- Leaderboard type 4 : Codeforces ranking
- Leaderboard Type 5 : Leetcode ranking
- Leaderboard type 6 : Leetcode contest ranking
- Students can also view the rankings of the latest LeetCode contests, their institute rank and visualise contest performance through graph.
- Students will get notified(through email) whenever their rank is decreasing (because they aren't active)
- Our metrics will promote consistent work instead of bulk work at once.
- Tech Stack : React, Django, PostgreSQL, MongoDB (for Friend's Table)
- Install
pnpm
, To obtain installation instructions for the pnpm package manager on your operating system, please refer to the following link. - Install
python3.7
- Ensure that you are in project folder
- Create a virtual Environment
python3 -m venv <ENVIRONMENT_NAME>
- Activate the virtual Environment
source <ENVIRONMENT_NAME>/bin/activate
- Install
make
- For Ubuntu:
sudo apt update sudo apt install make
- For Mac OS:
- In the terminal window, run the command
xcode-select --install
- In the windows that pops up, click Install, and agree to the Terms of Service.
- In the terminal window, run the command
- For Windows, follow the link
- For Ubuntu:
- Install Redis
- Replace database credentials
- Create a new project on Supabase
- Go to
Project Settings > Database
- Open the project in prefered code-editor
- Go to
Leaderboard-Pro > api > leaderboard > settings.py
, scroll down toDATABASES
variable and change theNAME
,USER
,PASSWORD
,HOST
andPORT
as on the Supabase Database page.
- Run the following commands in the same order:
make install make dev
- Visit http://localhost:8000/ and http://localhost:3000/
Docker provides a consistent and isolated environment for running the Leaderboard project, ensuring that it works the same way on every machine. Follow these steps to get the application up and running with Docker:
- Ensure you have Docker installed on your machine. To install Docker, follow the instructions on the Docker website.
-
Clone the repository (if you haven't already):
git clone https://github.com/your-username/Leaderboard-Pro.git cd Leaderboard-Pro
-
Build the Docker image:
docker build -t leaderboard-pro .
This command builds a Docker image named
leaderboard-pro
based on the instructions in the Dockerfile.
-
To start the application in a Docker container, run:
docker run -p 8000:8000 -p 3000:3000 leaderboard-pro
This command starts the Docker container and maps the ports so that you can access the Django backend at
http://localhost:8000/
and the React frontend athttp://localhost:3000/
. -
Visit the URLs in your web browser to interact with the application:
- Django Backend: http://localhost:8000/
- React Frontend: http://localhost:3000/
- To stop the Docker container, you can press
Ctrl+C
in the terminal where the container is running. Alternatively, you can stop the container from another terminal using thedocker stop
command with the container ID.