Welcome to the ITC Main Website repository. This is the official website of the Institute Technical Council (ITC) built and maintained by the ITC Web Team.
The ITC Main website serves as the primary portal for sharing information about ITC activities, events, and resources at IIT Bombay. The website is hosted at tech-iitb.org.
- Backend: Django
- Frontend: Django Templates, Tailwind CSS
- Database: PostgreSQL
- Hosting: Nginx, Gunicorn
- Others: GitHub Actions for CI/CD
Follow these steps to set up the project locally.
Ensure you have the following installed:
- Python (v3.8+)
- PostgreSQL
- Node.js and npm (for managing Tailwind CSS)
- Django (v3.2+)
-
Clone the repository:
git clone https://github.com/ITC-Web-Team/ITC_Main.git
-
Navigate to the project directory:
cd ITC_Main
-
Create a virtual environment:
python -m venv env
-
Activate the virtual environment:
- On macOS/Linux:
source env/bin/activate
- On Windows:
.\env\Scripts\activate
- On macOS/Linux:
-
Install the required Python dependencies:
pip install -r requirements.txt
-
Install Tailwind CSS dependencies using npm:
npm install
-
Make sure PostgreSQL is installed and running.
-
Create a PostgreSQL database:
psql CREATE DATABASE itc_main; CREATE USER itc_user WITH PASSWORD 'yourpassword'; ALTER ROLE itc_user SET client_encoding TO 'utf8'; ALTER ROLE itc_user SET default_transaction_isolation TO 'read committed'; ALTER ROLE itc_user SET timezone TO 'UTC'; GRANT ALL PRIVILEGES ON DATABASE itc_main TO itc_user;
-
Update your
.env
file with the database connection details:DATABASE_URL=postgres://itc_user:yourpassword@localhost:5432/itc_main
-
Run database migrations:
python manage.py migrate
-
Compile Tailwind CSS:
npm run build:css
-
Start the development server:
python manage.py runserver
The website will be available at http://localhost:8000
.
We welcome contributions from the ITC Web Team and external contributors.
- Fork the repository.
- Create a new branch for your feature or bugfix.
- Commit your changes and submit a pull request.
- Follow the existing code structure and naming conventions.
- Run migrations and make sure to update the database schema if necessary:
python manage.py makemigrations python manage.py migrate
The website is deployed using GitHub Actions. When changes are pushed to the main
branch, the deployment workflow triggers automatically.
For manual deployment:
-
SSH into the server:
ssh user@server_ip
-
Pull the latest code:
git pull origin main
-
Collect static files:
python manage.py collectstatic
-
Restart Gunicorn and Nginx:
sudo systemctl restart gunicorn sudo systemctl restart nginx
This project is licensed under the MIT License.