CampusManager is a web-based Smart Curriculum Activity & Attendance App. This repository contains the source code for CampusManager, initially developed as a solution for the SIH 2025 problem statement (ID: 25011). The app automates attendance tracking using face recognition and provides personalized task recommendations for students during free periods.
- Admin Dashboard:
- Manage users, including Adding, Editing, and Viewing.
- Assign Classes to Teachers (multiple subjects per teacher).
- Teacher Dashboard:
- View assigned classes and enrollment statistics.
- Live Class Support: "Class in Progress" indicator with one-click attendance during scheduled hours.
- Manage Enrollment Requests from students (Approve/Reject).
- Student Dashboard:
- View Branch-Specific Curriculum.
- Active Class Widget: Real-time display of currently serving class.
- Request to join classes.
- Track attendance and view simplified academic calendar.
- Attendance Tracking: Automated tracking (currently simulates data).
- Role-Based Access Control: Secure routes for Admin, Teacher, and Student.
-
Check Python version (needs 3.10+):
python --version -
Create a virtual environment (first time only):
python -m venv .venv -
Activate it (PowerShell):
.\.venv\Scripts\Activate.ps1
CMD alternative:
.\.venv\Scripts\activate.bat
-
(Optional) Upgrade pip:
python -m pip install --upgrade pip
-
Install dependencies:
pip install -r requirements.txt -
Copy and configure environment variables:
# Create .env file with your secret key echo "SECRET_KEY=your_super_secret_key_change_this_in_production" > .env
-
Run the app:
Standard Run:
python main.py
Multi-Instance Run (Recommended for Development): To simulate the full ecosystem, run these commands in separate terminals:
# Admin Panel (Port 5000) python main.py --name "Admin Panel" --port 5000 # Teacher Dashboard (Port 5001) python main.py --name "Teacher Dashboard" --port 5001 # Student Dashboard (Port 5002) python main.py --name "Student Dashboard" --port 5002
Docker Run (Alternative): Run the entire ecosystem with a single command using Docker Compose:
# Build and start all three servers (detached) docker compose up --build -d # Or set an explicit project name so Compose uses 'campusmanager' as the project prefix: docker compose -p campusmanager up --build -d # If you previously created images/containers with the old project name and want to remove them, # list and remove them manually (examples for PowerShell): # List containers: docker ps -a # Remove a container: docker rm -f <container_id> # List images: docker image ls # Remove an image: docker image rm <image_id>
-
Visit:
- Admin: http://127.0.0.1:5000/
- Teacher: http://127.0.0.1:5001/
- Student: http://127.0.0.1:5002/
-
Deactivate when done:
deactivate
For a complete guide on using the utility scripts (creating admins, resetting DB, generating sample data), please refer to the Utility Guide.
For instructions on running the test suite, please refer to the Testing Guide.
python -m venv .venv; .\.venv\Scripts\Activate.ps1; pip install -r requirements.txt; echo "SECRET_KEY=your_super_secret_key_change_this_in_production" > .envIf you prefer the Flask development server:
$env:FLASK_APP = "main.py"
flask runError: open //./pipe/dockerDesktopLinuxEngine: The system cannot find the file specified
Solution: This means Docker Desktop is not running.
- Open the "Docker Desktop" application on your Windows machine.
- Wait until the status bar in the bottom left of the Docker window turns green or says "Engine running".
- Try the command again.
- If you later add face recognition / ML, update
requirements.txt. - For prod, use a WSGI server (gunicorn on Linux, waitress on Windows) and load secrets from environment or a
.envfile.