A complete management system for driving schools. Built with PHP, MySQL, Bootstrap 5, and real-time communication features.
- Real-time KPI cards (students, instructors, vehicles, revenue)
- Monthly revenue bar charts (Chart.js)
- Exam eligibility doughnut charts
- Recent payments & upcoming lessons widgets
- Quick action buttons
- 6 role-based access levels: Admin, Director, Secretary, Cashier, Instructor, Trainee
- Granular permissions per role
- Account creation, modification, renewal, blocking/unblocking
- Auto-lock after 5 failed login attempts (15 minutes)
- Two-factor authentication (2FA) via email OTP
- Password reset via email tokens
- Profile photo upload with auto-resize
- Session timeout (20 minutes inactivity)
- CRUD operations with soft delete (trash bin)
- Student profiles with payment history, lesson history, comments
- Auto-generated matricule numbers
- Advanced search with autocomplete suggestions
- Sortable table columns
- Pagination (10 per page)
- Archive students (+6 months deleted)
- CRUD operations with archive support
- Experience tracking (cannot be reduced)
- Phone number validation
- Auto-uppercase names
- Sortable, searchable, paginated list
- CRUD operations with archive support
- Availability toggling
- Unique immatriculation validation
- Sortable, searchable, paginated list
- Schedule lessons (student + instructor + vehicle + date/time)
- Conflict detection: prevents double-booking within 1-hour window
- Mark as completed / cancel / delete
- Filter by status (scheduled, completed, cancelled)
- FullCalendar weekly/monthly/daily view
- Sortable, searchable, paginated list
- Record payments (amount, date, method)
- Printable payment receipts with school branding
- Revenue statistics (collected vs expected vs outstanding)
- Payment method tracking (Cash, Mobile Money, Bank Card, Transfer)
- Archive old payments (+12 months)
- Sortable, searchable, paginated list
- Eligibility tracking (≥3 completed lessons)
- Pass/fail results recording
- Score tracking (/100)
- Exam center and comments
- Per-formation eligibility statistics
- Upload documents (PDF, JPG, PNG, DOCX — 5MB max)
- Automatic versioning (v1, v2, v3...)
- Download with original filename
- Share via 7-day expiring token links
- AJAX search with autocomplete suggestions
- Filter by document type and student
- Archive and restore documents
- Instant messaging with AJAX polling (3-second refresh)
- WebRTC audio/video calls (peer-to-peer)
- WebSocket signaling server (Node.js on port 8080)
- Typing indicators
- Message reactions (👍❤️😂😮😢🙏)
- Delete for me / delete for all (10-minute window)
- Unread message counter
- File sharing in chat (images, documents — 20MB max)
- User profile modal from chat header
- Monthly revenue report with year selector
- Custom date range report with formation filter
- Comparative analysis by formation (chart + table)
- Statistical forecasts (3/6/12 month projections)
- Excel/CSV export
- Printable PDF reports
- Revenue charts with Chart.js
- Internal notification system for admins
- Automatic alerts: unpaid balances, expired accounts, upcoming lessons
- Unread notification counter in sidebar
- Email notifications (SMTP Gmail compatible)
- Manual database backup via mysqldump
- Download backup files (.sql)
- Restore from uploaded SQL file
- Auto-purge old backups (keeps last 7)
- Archive system: students, lessons, payments, documents
- Archive restoration
- Responsive design (mobile, tablet, desktop)
- Dark mode toggle (persisted in localStorage)
- Fixed sidebar with collapsible mobile menu
- Bootstrap 5 cards, badges, modals, tooltips
- Sortable table columns (click header to sort)
- Pagination on all list pages (10-20 per page)
- Empty states with icons and messages
- Breadcrumb navigation
- PWA manifest (installable on mobile)
- CSRF protection on all POST forms
- Bcrypt password hashing
- Session timeout (20 min auto-logout)
- X-Frame-Options, X-Content-Type-Options headers
- .env file for credentials (excluded from Git)
- Auto-lock after failed attempts
- 2FA via email OTP
- Input sanitization (htmlspecialchars)
- SQL injection prevention (prepared statements)
- All SELECT queries use SQL Views only
- All INSERT/UPDATE/DELETE use Stored Procedures
- Triggers for data integrity
- Events for scheduled tasks
- Soft delete with trash bin
- Audit trails for CRUD operations
- Connection journaling
| Layer | Technology |
|---|---|
| Backend | PHP 8.2, MySQL 8.0 |
| Frontend | Bootstrap 5.3, Bootstrap Icons, Chart.js, FullCalendar |
| Real-time | WebSocket (Node.js + ws), WebRTC |
| Libraries | jQuery, DataTables |
| PHP mail() / SMTP Gmail | |
| Charts | Chart.js 4 |
| Calendar | FullCalendar 6 |
| Browser print to PDF | |
| Excel | CSV export |
- PHP 8.0+
- MySQL 5.7+ / MariaDB 10.3+
- Apache with mod_rewrite enabled
- Node.js 18+ (for WebSocket server — chat & calls)
- Composer (optional, for PHPMailer)
- npm (for frontend dependencies)
git clone https://github.com/yourusername/project_auto.git
cd project-auto/npm installcp .env.example .env
# Edit .env with your database credentialsmysql -u root -p your_database < database.sqlchmod -R 777 uploads/ logs/ backups/node server.jshttp://localhost/project_auto/pages/login.php
Default admin credentials:
- Username:
admin - Password:
your password hashed stored in your db
project_auto/
├── assets/
│ ├── css/
│ │ └── style.css
│ ├── images/
│ └── js/
├── config/
│ └── database.php
├── includes/
│ ├── auth.php
│ ├── footer.php
│ ├── header.php
│ ├── mailer.php
│ └── sidebar.php
├── pages/
│ ├── actions/
│ │ ├── calendar_events.php
│ │ ├── chat_actions.php
│ │ ├── download_document.php
│ │ ├── logout.php
│ │ └── shared_doc.php
│ ├── 404.php
│ ├── aide.php
│ ├── alertes.php
│ ├── archives.php
│ ├── backup.php
│ ├── calendar.php
│ ├── chat.php
│ ├── corbeille.php
│ ├── documents.php
│ ├── enrollments.php
│ ├── exams.php
│ ├── export.php
│ ├── forgot_password.php
│ ├── instructors.php
│ ├── lessons.php
│ ├── login.php
│ ├── notifications.php
│ ├── payments.php
│ ├── presentation.php
│ ├── profile.php
│ ├── rapport_pdf.php
│ ├── rapports.php
│ ├── recu_paiement.php
│ ├── reset_password.php
│ ├── search.php
│ ├── settings.php
│ ├── student_profile.php
│ ├── students.php
│ ├── uml.php
│ ├── vehicles.php
│ └── verify_2fa.php
├── uploads/
│ ├── documents/
│ ├── profiles/
│ └── backups/
├── .env
├── .env.example
├── .htaccess
├── backup.sh
├── index.php
├── manifest.json
├── package.json
├── server.js
└── README.md
| Role | Permissions |
|---|---|
| 🔴 Admin | Full access: manage accounts, settings, all CRUD, reports |
| 🟤 Director | Like Admin except user account management |
| 🔵 Secretary | Students, lessons, payments, enrollments, documents |
| 🟢 Cashier | Payments only + read access |
| 🟡 Instructor | Lessons only + read access |
| ⚫ Trainee | Read-only access to all modules |
Navigate to Settings → School Configuration to customize:
- School name
- Phone number
- Email address
- Physical address
- Currency symbol
- SMTP credentials (for email sending)
-- Enable
UPDATE config_systeme SET valeur = '1' WHERE cle = '2fa_active';
-- Disable
UPDATE config_systeme SET valeur = '0' WHERE cle = '2fa_active';Click the 🌓 toggle button in the sidebar header. Preference is saved in localStorage.
The application is fully responsive and can be accessed from any device on the same network:
# Find server IP
ip addr show
# Access from mobile browser
http://192.168.x.x/project_autoFor WebRTC calls on mobile (HTTP only):
- Open Chrome
- Go to
chrome://flags/#unsafely-treat-insecure-origin-as-secure - Add
http://YOUR_IP:8080 - Enable and restart Chrome
- Create site in alwaysdata panel (Apache/PHP 8.2)
- Create MySQL database
- Upload files via rsync (exclude
node_modules) - Set
DB_HOST=/var/run/mysqld/mysqld.sockin.env - Import database via phpMyAdmin
- Recreate stored procedures without DEFINER
- Correct collations:
utf8mb4_unicode_ci - Set permissions:
chmod -R 777 uploads/ logs/
MIT License — feel free to use, modify, and distribute.
Developed by Monami Jerome with ❤️ for driving schools.
For issues, questions, or contributions:
- Check the Guide page in the application
- View UML Diagrams for system architecture
- Consult the About page for tech stack details