A comprehensive full-stack attendance management system designed for educational institutions. Built with modern web technologies including PHP (OOP & PDO), MySQL, JavaScript, and Bootstrap for a responsive and intuitive user experience.
π₯ Live Demo: Watch on YouTube
- Student & Teacher Attendance Tracking - Real-time attendance monitoring
- Absence Justification System - Upload and manage PDF justification documents
- Admin Profile Management - Complete user profile control
- Dynamic Dashboard - Interactive statistics and analytics
- Excel Bulk Upload - Import students and teachers via Excel files
- Advanced Search & Filtering - Smart filtering with pagination
- Responsive Design - Mobile-friendly interface
- Real-time attendance statistics
- Monthly/weekly attendance trends
- Student and teacher performance metrics
- Absence rate analysis
- Clean, modern Bootstrap 5 interface
- Mobile-responsive design
- Intuitive navigation and user flows
- Toast notifications for user feedback
- PHP 8.0 or higher
- MySQL 5.7 or higher
- Apache/Nginx web server
- Composer (optional, for dependency management)
-
Clone the repository
git clone https://github.com/Sa3d-Ka/Attendance-Management-System-School.git cd Attendance-Management-System-School
-
Database Setup
- Create a new MySQL database (e.g.,
attendancedb
) - Import the SQL schema:
mysql -u your_username -p attendancedb < database/attendance_system.sql
- Create a new MySQL database (e.g.,
-
Environment Configuration
- Copy the environment template:
cp .env.example .env
- Update
.env
with your database credentials:DB_HOST=localhost DB_NAME=attendancedb DB_USER=your_username DB_PASS=your_password
- Copy the environment template:
-
File Permissions
chmod 755 uploads/ chmod 755 uploads/justifications/ chmod 755 uploads/students/ chmod 755 uploads/teachers/
-
Launch the Application
- For XAMPP: Place in
htdocs
folder - Access via:
http://localhost/Attendance-Management-System-School/
- Default login: Check
database/attendance_system.sql
for default credentials
- For XAMPP: Place in
-
Admin Login Credentials
Use the following credentials to log in as an admin:
- Email:
admin1@cmc.ma
- Password:
admin123
Attendance-Management-System-School/
βββ π index.php # Main entry point
βββ π login.php # Authentication page
βββ πͺ logout.php # Session termination
βββ βοΈ .env # Environment configuration
βββ π README.md # Project documentation
β
βββ π api/ # REST API endpoints
β βββ π dashboard/ # Dashboard data endpoints
β βββ π₯ attendance/ # Attendance management APIs
β βββ π student/ # Student management APIs
β βββ π¨βπ« teacher/ # Teacher management APIs
β βββ π records/ # Record management APIs
β
βββ π¨ assets/ # Static resources
β βββ π css/ # Stylesheets
β βββ πΌοΈ images/ # Images and icons
β βββ β‘ js/ # JavaScript files
β βββ π οΈ utils/ # Utility scripts
β
βββ ποΈ classes/ # PHP OOP Classes
β βββ Students.php # Student management class
β βββ Teachers.php # Teacher management class
β βββ StudentAttendance.php # Student attendance logic
β βββ TeacherAttendance.php # Teacher attendance logic
β βββ Profile.php # Profile management class
β
βββ βοΈ config/ # Configuration files
β βββ config.php # Application config
β βββ database.php # Database connection
β
βββ π¦ includes/ # Reusable components
β βββ header.php # Common header
β βββ footer.php # Common footer
β βββ toast.php # Notification component
β βββ π student/ # Student-specific includes
β βββ π¨βπ« teacher/ # Teacher-specific includes
β
βββ π pages/ # Main application pages
β βββ dashboard.php # Main dashboard
β βββ attendance.php # Attendance tracking
β βββ students.php # Student management
β βββ teachers.php # Teacher management
β βββ records.php # Attendance records
β βββ admin-profile.php # Admin profile page
β
βββ π uploads/ # File upload directory
βββ justifications/ # Absence justification PDFs
βββ students/ # Student-related uploads
βββ teachers/ # Teacher-related uploads
- PHP 8.0+ - Server-side logic with OOP principles
- MySQL - Relational database management
- PDO - Secure database operations
- Apache/Nginx - Web server
- HTML5 & CSS3 - Modern markup and styling
- Bootstrap 5.3 - Responsive UI framework
- JavaScript (Vanilla) - Client-side interactivity
- SheetJS - Excel file processing
- Font Awesome - Icon library
- Chart.js - Data visualization
- DataTables - Advanced table functionality
Edit config/database.php
to match your database settings:
<?php
class Database {
private $host;
private $db_name;
private $username;
private $password;
public function __construct() {
$this->host = $_ENV['DB_HOST'] ?? 'localhost';
$this->db_name = $_ENV['DB_NAME'] ?? 'attendancedb';
$this->username = $_ENV['DB_USER'] ?? 'root';
$this->password = $_ENV['DB_PASS'] ?? '';
}
// ... connection logic
}
Configure your .env
file:
# Database Configuration
DB_HOST=localhost
DB_NAME=attendancedb
DB_USER=root
DB_PASS=
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch
git checkout -b feature/amazing-feature
- Make your changes
- Commit your changes
git commit -m 'Add some amazing feature'
- Push to the branch
git push origin feature/amazing-feature
- Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Saad Kanani π²π¦
- Instagram: @learntodev.ka
- LinkedIn: Saad Kanani
- Email: saad.kanani.off@gmail.com
β Star this repository if you found it helpful!
Made with β€οΈ in Morocco π²π¦