A complete web-based system for NWSSU that uses SVM (Support Vector Machine) machine learning to automatically classify and route student concerns to the appropriate college or department.
- Student Portal: Submit concerns with automatic AI classification
- Admin/Staff Dashboard: Manage concerns, update status, view routing
- SVM Classification: Automatic categorization of concerns (Academic, Financial, Guidance, Facilities, IT, Library)
- Intelligent Routing: Auto-route concerns to appropriate departments
- Status Tracking: Track concern status (Pending → In Progress → Resolved)
- Notifications: Real-time notifications for status updates
- Reports & Analytics: View statistics and insights
- Backend: PHP 7.4+
- Database: MySQL (via XAMPP)
- Frontend: HTML5, CSS3, JavaScript
- Machine Learning: Python 3.x with scikit-learn (SVM)
- Server: XAMPP (Apache + MySQL)
Option 1: Automated Setup (Easiest)
- Ensure XAMPP is running (Apache and MySQL)
- Open your browser and navigate to:
http://localhost/iconcern/setup.php - Follow the on-screen instructions to:
- Initialize the database
- Train the SVM model with 1000 entries
- Login with admin credentials (username:
admin, password:admin123)
Option 2: Manual Setup
-
XAMPP installed and running
- Download from: https://www.apachefriends.org/
- Ensure Apache and MySQL are running
-
Python 3.x with required packages
pip install scikit-learn pandas numpy
- Copy the
iconcernfolder to your XAMPP htdocs directory:C:\xampp\htdocs\iconcern\
Method A: Using PHP Script (Recommended)
php database/init_database.phpMethod B: Using phpMyAdmin
- Open phpMyAdmin: http://localhost/phpmyadmin
- Import the database schema:
- Click "Import" tab
- Choose file:
database/schema.sql - Click "Go"
The database iconcern_db will be created with all required tables, including:
- All 6 NWSSU colleges (COED, CCIS, CCJS, COM, CEA, CON)
- Complete department list
- Admin account (username:
admin, password:admin123)
Edit config/database.php if your MySQL credentials are different:
define('DB_HOST', 'localhost');
define('DB_USER', 'root');
define('DB_PASS', ''); // Your MySQL password
define('DB_NAME', 'iconcern_db');The system includes a comprehensive 1000-entry training dataset for high accuracy classification.
- Open terminal/command prompt
- Navigate to the project directory:
cd C:\xampp\htdocs\iconcern
- Run the training script:
python ml/train_model.py
This will:
- Load 1000 training entries from
ml/training_data.csv - Train the SVM model with 97%+ accuracy
- Create
svm_model.pklandvectorizer.pklfiles in themldirectory
Expected Output:
Model Accuracy: 97.50%
Training completed successfully!
- Start XAMPP (Apache and MySQL)
- Open your browser and navigate to:
http://localhost/iconcern/ - You will be redirected to the login page
- Username:
admin - Password:
admin123
- Username:
student1 - Password:
admin123
- Username:
staff1 - Password:
admin123
iconcern/
├── admin/ # Admin panel pages
│ ├── concerns.php
│ ├── routing.php
│ ├── users.php
│ └── reports.php
├── assets/ # Static assets
│ ├── css/
│ │ └── style.css
│ └── js/
│ └── main.js
├── config/ # Configuration files
│ ├── config.php
│ └── database.php
├── database/ # Database schema
│ └── schema.sql
├── includes/ # PHP includes
│ ├── auth.php
│ ├── concern.php
│ ├── college.php
│ ├── header.php
│ └── footer.php
├── ml/ # Machine Learning scripts
│ ├── classify.py
│ └── train_model.py
├── uploads/ # File uploads directory
├── index.php # Main dashboard
├── login.php # Login page
├── register.php # Registration page
├── submit_concern.php # Submit concern form
├── my_concerns.php # Student concerns list
├── concern.php # Concern details page
├── notifications.php # Notifications page
├── profile.php # User profile
├── logout.php # Logout handler
└── README.md # This file
The system uses 9 main tables:
- users - User accounts (students, staff, admins)
- colleges - NWSSU colleges (COED, CCIS, CCJS, COM, CEA, CON)
- departments - Administrative departments (Guidance, Cashiers, Registrar, Library, OSAS, IT Support, Maintenance, and all colleges as departments)
- concerns - Student-submitted concerns
- classifications - SVM classification results with confidence scores
- routing - Concern routing information (college and department)
- status_history - Status change logs with notes
- notifications - User notifications
- training_data - ML training data (1000 entries included)
- Student logs in and fills out the concern form
- Optionally uploads an attachment (image/document)
- System calls Python SVM script (
ml/classify.py) - Concern text is preprocessed and classified
- Result is saved in
classificationstable
- SVM Classification: Concern is automatically classified into categories:
- Academic, Financial, Guidance, Facilities, IT, Library, General
- College Detection: System detects college names in concern text (e.g., "CCIS", "COED", "CEA")
- Smart Routing: Based on classification AND detected college:
- Academic → Registrar Office (or specific college if detected)
- Financial → Cashiers Office
- Guidance → Guidance Office
- Facilities → Maintenance Office (or specific college department if college detected)
- IT → IT Support
- Library → Library Office
Example: "The TV in the CCIS classroom is broken" → Classified as Facilities → Routed to CCIS Department
- Staff can view routed concerns
- Update status (Pending → In Progress → Resolved)
- Add notes and track history
- Students receive notifications when status changes
- Real-time updates via notification system
The system uses a Support Vector Machine (SVM) classifier trained on 1000 labeled entries with:
- Text preprocessing: Lowercasing, special character removal, whitespace normalization
- TF-IDF Vectorization: 2000 features with n-grams (1-3) for better accuracy
- Linear SVM: Fast and accurate for text classification
- Model Accuracy: 97.50% on test set
- Fallback classification: Keyword-based if model not available
- College Detection: Automatically detects college names (COED, CCIS, CCJS, COM, CEA, CON) in concern text
- Academic (200 training samples) - Course, grades, exams, enrollment
- Financial (150 training samples) - Tuition, fees, scholarships, payments
- Guidance (150 training samples) - Counseling, mental health, personal issues
- Facilities (200 training samples) - Buildings, maintenance, equipment
- IT (150 training samples) - Computers, network, software, technical issues
- Library (100 training samples) - Books, research, study rooms
- General (50 training samples) - General inquiries and other concerns
Edit database/schema.sql and add to colleges table, or use phpMyAdmin to insert new records.
Insert into departments table via phpMyAdmin or SQL.
Edit includes/concern.php in the autoRoute() method to change routing logic.
- Update
ml/training_data.csvwith your labeled data (format: concern_text,label) - Or add data to the
training_datatable in the database - Run training script:
python ml/train_model.py - Model will be saved automatically
Note: The system includes 1000 pre-labeled training entries. You can add more to improve accuracy.
- Check XAMPP MySQL is running
- Verify credentials in
config/database.php - Ensure database
iconcern_dbexists
- Verify Python is installed:
python --version - Install required packages:
pip install scikit-learn pandas numpy - Check Python path in
includes/concern.php(line withpythoncommand) - On Windows, you may need to use
pythoninstead ofpython3
- Ensure
uploads/directory exists and is writable - Check file size limits in
config/config.php - Verify allowed file extensions
- Ensure PHP sessions are enabled
- Check session directory permissions
- Clear browser cookies if login persists
- Change all default passwords
- Use strong password hashing (already using bcrypt)
- Enable HTTPS/SSL
- Sanitize all user inputs (already implemented)
- Implement CSRF protection
- Set proper file upload permissions
- Hide sensitive error messages
- Use environment variables for database credentials
For issues or questions:
- Check the database connection settings
- Verify all dependencies are installed
- Review Apache error logs:
C:\xampp\apache\logs\error.log - Check PHP error logs
This project is developed for NWSSU (Northwest Samar State University).
Current Version: 1.0.0
Developed for NWSSU | Intelligent Concern Classification System