Skip to content

Welcome to the GC Portal repository. This is the official platform for the General Championship (GC) at IIT Bombay, developed and maintained by the ITC Web Team. The portal facilitates management and tracking of GC events and results.

Notifications You must be signed in to change notification settings

ITC-Web-Team/GC_Portal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 

Repository files navigation

GC Portal

Welcome to the GC Portal repository. This is the official platform for the General Championship (GC) at IIT Bombay, developed and maintained by the ITC Web Team. The portal facilitates management and tracking of GC events and results.

Table of Contents

Project Overview

The GC Portal is designed to manage and track the various General Championship (GC) events at IIT Bombay. It serves as a platform for event organizers, participants, and admins to view schedules, submit entries, and see results.

The website is live at itc.gymkhana.iitb.ac.in/techgc.

Tech Stack

  • Frontend: React, Tailwind CSS
  • Backend: Django REST Framework (DRF)
  • Database: PostgreSQL
  • Others: GitHub Actions for CI/CD, Nginx, Gunicorn

Getting Started

To get started with the project locally, follow the steps below.

Prerequisites

Ensure you have the following installed:

  • Python (v3.8+)
  • Node.js (v14+), npm or yarn
  • PostgreSQL
  • Django (v3.2+)

Backend Installation (Django)

  1. Clone the repository:

    git clone https://github.com/ITC-Web-Team/GC_Portal.git
  2. Navigate to the backend directory:

    cd GC_Portal/backend
  3. Create a virtual environment:

    python -m venv env
  4. Activate the virtual environment:

    • On macOS/Linux:
      source env/bin/activate
    • On Windows:
      .\env\Scripts\activate
  5. Install the required Python dependencies:

    pip install -r requirements.txt
  6. Set up your PostgreSQL database:

    Open PostgreSQL and create the database:

    CREATE DATABASE gc_portal;
    CREATE USER gc_user WITH PASSWORD 'yourpassword';
    GRANT ALL PRIVILEGES ON DATABASE gc_portal TO gc_user;
  7. Add your database connection information in a .env file:

    DATABASE_URL=postgres://gc_user:yourpassword@localhost:5432/gc_portal
  8. Apply the migrations:

    python manage.py migrate
  9. Create a superuser for the Django admin panel:

    python manage.py createsuperuser

Frontend Installation (React)

  1. Navigate to the frontend directory:

    cd ../frontend
  2. Install the Node.js dependencies:

    npm install

    or

    yarn install
  3. Configure the API URL in the environment file (if necessary):

    REACT_APP_API_URL=http://localhost:8000/api

Running Locally

  1. Start the Django backend:

    cd ../backend
    python manage.py runserver
  2. In a new terminal, start the React frontend:

    cd ../frontend
    npm start

    or

    yarn start

The React frontend will be running at http://localhost:3000 and the Django backend will be at http://localhost:8000.

Contributing

We welcome contributions from the ITC Web Team and external developers. To contribute:

  1. Fork the repository.
  2. Create a new branch for your feature or bugfix.
  3. Commit your changes and submit a pull request.

Code Style

  • Use Prettier and ESLint for frontend code formatting:

    npm run lint
  • For backend (Django), ensure the code follows PEP 8 standards and format with black:

    black .

Deployment

The website is deployed using GitHub Actions and managed on a server using Nginx and Gunicorn.

Manual Deployment

  1. SSH into the server:

    ssh user@server_ip
  2. Pull the latest code from the main branch:

    git pull origin main
  3. Navigate to the backend directory and apply migrations:

    cd backend
    python manage.py migrate
  4. Collect static files for Django:

    python manage.py collectstatic
  5. Restart Gunicorn and Nginx:

    sudo systemctl restart gunicorn
    sudo systemctl restart nginx

License

This project is licensed under the MIT License.

About

Welcome to the GC Portal repository. This is the official platform for the General Championship (GC) at IIT Bombay, developed and maintained by the ITC Web Team. The portal facilitates management and tracking of GC events and results.

Resources

Stars

Watchers

Forks