Codeboard is an open-source project under the CCS Coding Community, an initiative by the Creative Computing Society, TIET. This project maintains a list of coders and ranks them based on their LeetCode performance by scraping their profiles.
The project has two main directories:
server: Contains backend code built with Django and Celery.client: Contains frontend code built with React.
Follow these instructions to set up a local version of Codeboard for development and testing.
Ensure you have the following installed:
- Python 3.x
- Node.js
- Docker (required for the Django backend and to properly run Celery with Redis)
- Django
- Celery
- Redis (for Celery backend)
- PostgreSQL (or your preferred database)
-
Clone the backend repository:
git clone -b dev-backend https://github.com/creative-computing-society/codeboard.git codeboard-backend
-
Set up a Python virtual environment:
cd codeboard-backend python3 -m venv .venvFor Linux/MacOS:
source .venv/bin/activateFor Windows:
.venv\Scripts\activate
-
Install project dependencies:
pip install -r requirements.txt
-
Configure environment variables: Create a
.envfile at the root of the backend project (codeboard-backend/.env) and include the following variables:SECRET_KEY='' # Django secret key DB_NAME='' DB_USER='' DB_PASS='' DB_HOST='' DB_PORT='' CLIENT_SECRET='' # CCS Auth Client SecretCreate a database and update these variables with your database credentials.
-
Apply database migrations:
python manage.py migrate
-
Collect Static
python manage.py collectstatic
-
Start the backend services: Use Docker to start Redis, Celery, and the Django server:
docker compose up --build
The server runs on port 4881 by default. You can change this in
docker-compose.ymlif necessary.
-
Clone the frontend repository:
git clone -b dev-frontend https://github.com/creative-computing-society/codeboard-frontend.git codeboard-frontend
-
Install frontend dependencies:
cd codeboard-frontend npm install -
Set the server URL (for local development): If you’re running the backend locally, navigate to
config.jsin thesrcdirectory and setSERVER_URL:SERVER_URL = "http://127.0.0.1:4881/"
-
Set the callback URL for authentication: In
Login.jsunder theComponentsfolder, update the callback URL:http://localhost:3000/authVerify -
Start the frontend server:
npm start
After following these steps, the application should be running locally.
Visit the live application at https://codeboard.ccstiet.com/ to view coder rankings.
We welcome contributions! Please refer to our CONTRIBUTION.md for guidelines on contributing and submitting pull requests.
This project is licensed under the MIT License. See the LICENSE file for more information.