ChapterOS is the central management hub for the AISSMS IOIT ACM Student Chapter. It's an internal web application designed to streamline committee operations, from managing recruitment and analyzing statistics to planning events and maintaining documentation and annual events calender.
recruitments: Manage and analyze data from member recruitment drives.form_builder: Create custom forms for event registrations, feedback, surveys and events.documentation: A central repository for all chapter-related documents, reports, and assets.events: Plan, track, and manage all chapter events, workshops, and speaker sessions.users: Manage committee member profiles, roles, and internal permissions.- and more comming soon...
- Backend: Django, Python
- Frontend: HTML, Tailwind CSS, Vanilla JavaScript, Alpine.js
- Database: MySQL
- Deployment: Gunicorn / Passenger
Choose one of the following methods to set up your local development environment. The Docker method is recommended for a quick and consistent database setup.
This method uses Docker to run the MySQL database and phpMyAdmin, while you run the Django application locally on your machine.
- Python 3.6.8
- Node.js and npm
- Docker and Docker Compose
git clone https://github.com/IOIT-ACM/ChapterOS.git
cd ChapterOSThis command starts the MySQL database and phpMyAdmin services in the background using the configuration in docker-compose.yml.
docker-compose up -dA Makefile is provided to simplify the setup process. This command will create a Python virtual environment, install all Python and Node.js dependencies, and create a .env file from the example.
make setupThe make setup command creates a .env file. Open it and ensure it has the following configuration to connect your local Django application to the Docker database.
# .env
DB_HOST=127.0.0.1
DB_NAME=chapteros_db
DB_USER=chapteros_user
DB_PASSWORD=chapteros_password
# Django Settings
DEBUG=True
SECRET_KEY=your-super-secret-key-hereThe database credentials must match those in docker-compose.yml.
With the database running in Docker and your local environment ready, apply the migrations.
# Make sure your virtual environment is active
source venv/bin/activate
python3 manage.py migrateYou may need to populate the database with some initial values, such as academic years. To do this, run the following command:
python3 manage.py populate_academic_yearsTo access the Django Admin panel (/admin/), you need to create a superuser account.
python3 manage.py createsuperuserFollow the prompts to create your admin account.
For development, you need to run two processes in separate terminal windows.
-
Start the Django Development Server This runs the backend on
http://127.0.0.1:8000/.make run # Or manually: python3 manage.py runserver -
Start the Tailwind CSS Watcher This watches for changes in your template and CSS files and automatically rebuilds the stylesheet.
npm run watch
- Django Application: http://localhost:8000
- phpMyAdmin (Database GUI): http://localhost:8080
- Server:
db - Username:
root - Password:
root_password_123
- Server:
To stop the database and phpMyAdmin services when you are done:
docker-compose downThis method requires you to install and manage a MySQL server directly on your local machine.
- Python 3.6.8
- Node.js and npm
- A running MySQL server on your local machine.
git clone https://github.com/IOIT-ACM/ChapterOS.git
cd ChapterOSmake setupEdit the newly created .env file with your local MySQL database credentials.
# .env
DB_HOST="127.0.0.1"
DB_NAME="your_db_name"
DB_USER="your_db_user"
DB_PASSWORD="your_db_password"# Make sure your virtual environment is active
source venv/bin/activate
python3 manage.py migrate
python3 manage.py createsuperuserFollow the same steps as in the Docker guide for running the Django server and Tailwind watcher.
Migrations are how Django tracks changes to your database schema (your models.py files). It is critical that all developers handle them correctly to ensure consistency.
- After you change a model (e.g., add a field to
apps/users/models.py), runmakemigrations. This creates a new migration file that represents your changes.python3 manage.py makemigrations
- Next, run
migrateto apply this change to your local database.python3 manage.py migrate
- Commit both your model changes and the newly generated migration file to Git.
- DO NOT DELETE MIGRATION FILES. These files are a historical record of your database schema. Deleting them can cause irreversible issues for other developers and in production. If you make a mistake, it's better to create a new migration to reverse the change.
- ALWAYS RUN
migrateAFTER PULLING CHANGES. After you pull new code from the repository, always runpython3 manage.py migrateto apply any database changes made by other developers. - RESOLVE MIGRATION CONFLICTS CAREFULLY. If you encounter conflicts, ask for help. Never just delete the conflicting files. Contact webmaster while doing so.
When deploying the application, you need to build the static assets and collect them into a single directory.
-
Build Static CSS This command compiles and minifies the Tailwind CSS.
npm run build
-
Collect Django Static Files This command gathers all static files (CSS, JS, images) into the
staticfilesdirectory, which is then served by WhiteNoise or your web server.python3 manage.py collectstatic



