PSTU Enrollment Automation System (Experimental)
A comprehensive web-based enrollment and result management system built with Django for Patuakhali Science and Technology University (PSTU). This system automates the entire student enrollment process, course management, result generation, and payment processing.
๐ Live Demo
๐ Application URL: https://pstuenrollment.pythonanywhere.com
The system is live and ready to explore! Jump to Demo Accounts section for login credentials.
๐ Table of Contents
- Live Demo
- Overview
- Features
- System Architecture
- Technology Stack
- Prerequisites
- Installation
- Configuration
- Usage
- Live Demo & Test Accounts
- Project Structure
- Key Models
- Security Features
- Common Issues and Solutions
- Contributing
- License
- Acknowledgments
- Contact
๐ฏ Overview
The PSTU Enrollment Automation System is designed to streamline the academic operations of university faculties. It provides separate interfaces for Faculty Administrators, Teachers, and Students, enabling efficient management of courses, enrollments, examinations, and results.
โจ Features
๐๏ธ Faculty Admin Portal
-
User Management
- Add/delete students, teachers, and departments
- Manage faculty controller accounts
-
Course Management
- Create and manage courses for different semesters
- Assign courses to teachers
- Handle special course assignments for repeat/improvement exams
-
Result Management
- Calculate semester results automatically
- Generate result PDFs for all students
- Create conditional pass and special exam lists
- Generate merit lists
-
Semester Operations
- Update exam periods (Regular/F-Removal)
- Promote students to next semester
- Manage enrollment fees and costs
-
Document Generation
- Automated PDF generation for results
- Merit list reports
- Special/repeat exam reports
๐จโ๐ซ Teacher Portal
-
Profile Management
- Update personal information and profile picture
- View assigned courses
-
Course Management
- View regular and special course assignments
- Enter marks for attendance, assignments, mid-term, and final exams
-
Mark Entry
- Comprehensive mark entry system
- Generate course-wise mark sheets in PDF format
- Handle special/repeat exam marks separately
๐ Student Portal
-
Profile Management
- Update personal information and profile picture
- View academic status and current semester
-
Enrollment System
- Semester-wise course enrollment
- View enrolled courses and total credits
- Real-time cost calculation
-
Payment Integration
- Integrated SSLCOMMERZ payment gateway
- Secure online payment processing
- Payment history tracking
- Invoice download functionality
-
Result Viewing
- View semester-wise results
- Check GPA and CGPA
- Download result PDFs
๐๏ธ System Architecture
The system follows Django's MVT (Model-View-Template) architecture with four main applications:
- FacultyApp - Faculty administration and management
- TeacherApp - Teacher dashboard and mark entry
- StudentApp - Student enrollment and payments
- ResultApp - Result calculation and generation
๐ ๏ธ Technology Stack
- Backend Framework: Django 5.1.2
- Database: MySQL (via mysqlclient 2.2.4)
- Frontend: HTML, CSS, JavaScript (Django Templates)
- Payment Gateway: SSLCOMMERZ
- PDF Generation: ReportLab 4.2.5
- Environment Management: python-dotenv
- Email: SMTP (Gmail)
- Additional Libraries:
- Pillow 10.4.0 (Image processing)
- pytz 2024.2 (Timezone management)
- requests 2.32.3 (HTTP library)
๐ฆ Prerequisites
Before you begin, ensure you have the following installed:
- Python 3.8 or higher
- MySQL Server (or XAMPP with MariaDB)
- pip (Python package manager)
- Virtual environment (recommended)
- Git
๐ Installation
1. Clone the Repository
git clone https://github.com/Mehedi-Hasan-Rabbi/PSTU-Enrollment-Automation-Experimental.git
cd PSTU-Enrollment-Automation-Experimental
2. Create Virtual Environment
# Windows
python -m venv venv
venv\Scripts\activate
# Linux/Mac
python3 -m venv venv
source venv/bin/activate
3. Install Dependencies
pip install -r requirements. txt
4. Set Up Database
Using XAMPP:
- Start Apache and MySQL from XAMPP Control Panel
- Open phpMyAdmin (http://localhost/phpmyadmin)
- Create a new database named
pstu_enrollment
Using MySQL Command Line:
CREATE DATABASE pstu_enrollment CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
There is an SQL file in Document folder that can be use for demo purposes only.
5. Environment Configuration
Create a .env file in the root directory by copying .env.example:
cp .env.example .env
Edit the .env file with your configuration:
# Security
SECRET_KEY=your-secret-key-here
DEBUG=True # False for production
# Hosts
ALLOWED_HOSTS=127.0.0.1,localhost
CSRF_TRUSTED_ORIGINS=
# Database
DB_ENGINE=django.db.backends.mysql
DB_NAME=pstu_enrollment
DB_USER=root
DB_PASSWORD=your_mysql_password
DB_HOST=localhost
DB_PORT=3306
# Email Configuration
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_USE_TLS=True
[email protected]
EMAIL_HOST_PASSWORD=your_app_password
[email protected]
# SSLCOMMERZ Settings
SSLCOMMERZ_STORE_ID=your_store_id
SSLCOMMERZ_PASSWORD=your_password
SSLCOMMERZ_IS_SANDBOX=True
6. Run Migrations
python manage.py makemigrations
python manage.py migrate
7. Create Superuser
python manage.py createsuperuser
Follow the prompts to create an admin account.
8. Run Development Server
python manage.py runserver
The application will be available at http://127.0.0.1:8000/
โ๏ธ Configuration
Email Setup (Gmail)
- Enable 2-Factor Authentication on your Gmail account
- Generate an App Password:
- Go to Google Account โ Security โ 2-Step Verification โ App passwords
- Generate a password for "Mail"
- Use this password in
EMAIL_HOST_PASSWORD
SSLCOMMERZ Setup
- Register at SSLCOMMERZ
- Get your Store ID and Password
- Set
SSLCOMMERZ_IS_SANDBOX=Truefor testing - Update credentials in
.envfile
Database Configuration
The system supports both SQLite (development) and MySQL (production). To switch:
For SQLite (Development):
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
}
}
For MySQL (Production): Already configured via .env file
๐ Usage
Admin Panel
Access the Django admin panel at http://127.0.0.1:8000/admin/
- Manage all database models
- Clear cache at
/admin/clearcache/
Faculty Admin Portal
URL: http://127.0.0.1:8000/faculty_admin/login/
- Login with Faculty Controller credentials
- Manage students, teachers, courses, and departments
- Assign courses to teachers
- Update exam periods
- Generate results and reports
Teacher Portal
URL: http://127.0.0.1:8000/teacher/login/
- Login with teacher credentials
- View assigned courses
- Enter student marks
- Generate mark sheets
Student Portal
URL: http://127.0.0.1:8000/student/login/
- Login with student credentials
- Enroll in semester courses
- Make payments via SSLCOMMERZ
- View results and download transcripts
๐ฎ Live Demo & Test Accounts
๐ Live Application: https://pstuenrollment.pythonanywhere.com
Experience the full system with these demo accounts:
| Role | Login URL | Username | Password |
|---|---|---|---|
| ๐ง Super Admin | Admin Panel | admin |
admin |
| ๐๏ธ Faculty Admin | Faculty Portal | cseadmin |
facultyofcse |
| ๐จโ๐ซ Teacher | Teacher Portal | mahbubur.csit |
deptofcsit |
| ๐ Student | Student Portal | mehedi.cse.16 |
studentofcse |
๐ What You Can Test
โ Faculty Admin Features:
- Add/manage courses, teachers, and students
- Assign courses to teachers
- Generate semester results and PDFs
- Promote students to next semester
- Manage enrollment fees
โ Teacher Features:
- View assigned courses
- Enter marks (attendance, assignment, mid-term, final)
- Generate and download mark sheets
- Handle special/repeat exams
โ Student Features:
- Enroll in semester courses
- Make online payments (sandbox mode)
- View payment history and download invoices
- Check results and CGPA
- Download result transcripts
โ Payment Testing:
- Payment gateway is in sandbox/test mode
- Use test card:
4111 1111 1111 1111 - Expiry: Any future date
- CVV: Any 3 digits
- No real money will be charged
โ ๏ธ Demo System Notice
This is a demonstration environment with sample data.
- ๐ Please be respectful and do not delete critical data
- ๐ณ All payments are in test mode (no real transactions)
- ๐ Database may be reset periodically for maintenance
- ๐ง Email notifications are functional (test emails may be sent)
๐ Project Structure
PSTU-Enrollment-Automation-Experimental/
โโโ FacultyApp/ # Faculty administration app
โ โโโ models.py # Faculty, Department, Course, Cost models
โ โโโ views. py # Admin dashboard and operations
โ โโโ urls.py # URL routing
โ โโโ templates/ # Faculty templates
โ
โโโ TeacherApp/ # Teacher portal app
โ โโโ models.py # Teacher, Course_Instructor models
โ โโโ views. py # Teacher dashboard and mark entry
โ โโโ urls.py # URL routing
โ โโโ templates/ # Teacher templates
โ
โโโ StudentApp/ # Student portal app
โ โโโ models.py # Student, Transaction models
โ โโโ views. py # Student dashboard, enrollment, payment
โ โโโ urls. py # URL routing
โ โโโ templates/ # Student templates
โ
โโโ ResultApp/ # Result management app
โ โโโ models.py # Course_Mark, Semester_Result models
โ โโโ views.py # Result calculation logic
โ
โโโ PSTU_Enrollment/ # Main project directory
โ โโโ settings. py # Project settings
โ โโโ urls.py # Main URL configuration
โ โโโ wsgi. py # WSGI configuration
โ
โโโ media/ # User uploaded files
โ โโโ students_profile_pics/
โ โโโ teachers_profile_pics/
โ
โโโ Documents/ # Project documentation
โโโ . env. example # Environment variables template
โโโ . gitignore # Git ignore file
โโโ manage.py # Django management script
โโโ requirements.txt # Python dependencies
โโโ README.md # This file
๐ฏ Key Models
FacultyApp Models
Faculty- Faculty informationFacultyController- Admin users for facultiesSemester- Semester definitions (1-15)Department- Department informationCourse- Course catalogCost- Fee structure
TeacherApp Models
Teacher- Teacher profilesCourse_Instructor- Regular course assignmentsSpecial_Course_Instructor- Special exam course assignments
StudentApp Models
Student- Student profiles and enrollment statusStudent_Transaction- Payment records
ResultApp Models
Course_Mark- Individual course marksSemester_Result- Semester-wise GPA/CGPAExam_Period- Exam period configurationSpecial_Repeat- Special exam settings
๐ Security Features
- Environment-based configuration
- CSRF protection enabled
- Session-based authentication
- Password hashing
- Login required decorators
- Cache control for sensitive pages
- Secure payment gateway integration
๐ Common Issues and Solutions
Issue: Database Connection Error
Solution: Ensure MySQL is running and credentials in .env are correct
Issue: Static Files Not Loading
Solution: Run python manage.py collectstatic for production
Issue: Payment Gateway Not Working
Solution: Verify SSLCOMMERZ credentials and ensure sandbox mode is set correctly
Issue: Email Not Sending
Solution: Check Gmail app password and enable "Less secure app access"
๐ค Contributing
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
- Patuakhali Science and Technology University (PSTU)
- Django Documentation
- SSLCOMMERZ Payment Gateway
- All contributors to this project
๐ฅ Contact
Mehedi Hasan Rabbi
- ๐ง Email: [email protected]
- ๐ผ LinkedIn: ultr4-instinct
- ๐ GitHub: @Mehedi-Hasan-Rabbi
Project Link: https://github.com/Mehedi-Hasan-Rabbi/PSTU-Enrollment-Automation-Experimental
โญ If you find this project helpful, please consider giving it a star! โญ
Made with โค๏ธ for PSTU