Web application for managing students, teachers and courses developed in PHP with an MVC architecture.
TD3 is a complete web application for managing an academic institution. It offers the following features:
- Student Management: Create, modify, delete and view students
- Teacher Management: Create, modify, delete and view teachers
- Course Management: Create, modify, delete and view courses
- Module Management: Organize subjects by modules
- Subject Management: Organize courses by subjects
- PHP 8.0 or higher
- MySQL 5.7 or higher
- Apache or Nginx with mod_rewrite
- Composer (for dependencies)
-
Clone or download the project
cd /srv/http/r301devweb/TD3 -
Install dependencies
β οΈ Important: Thevendor/folder is not included in the ZIP archive. You must install dependencies with Composer:composer install
This command will automatically install dependencies listed in
composer.json(notablyvlucas/phpdotenvfor environment variable management). -
Configure the database
Create a
.envfile at the project root with the following information:DB_HOST=localhost DB_NAME=r301project DB_PORT=3306 DB_USER=simpleuser DB_PASS=simplepass
-
Create the database
Import the
sqldumb.sqlfile into your MySQL/MariaDB database:mysql -u simpleuser -p r301project < sqldumb.sqlOr via phpMyAdmin: Select your database, then "Import" tab and select the
sqldumb.sqlfile.This import will automatically create the following tables:
mp_users: System usersmp_etudiants: Studentsmp_enseignants: Teachersmp_modules: Modulesmp_matieres: Subjectsmp_cours: Courses
-
Configure permissions
Ensure the web server has read permissions on all files:
sudo chown -R www-data:www-data /srv/http/r301devweb/TD3 sudo chmod -R 755 /srv/http/r301devweb/TD3
TD3/
βββ class/ # Business classes (Model)
β βββ cours.class.php
β βββ enseignant.class.php
β βββ etudiant.class.php
β βββ matiere.class.php
β βββ module.class.php
β βββ myAuthClass.php
βββ cours/ # Course Module
β βββ controllers/ # Controllers
β βββ views/ # Views
βββ enseignants/ # Teachers Module
β βββ controllers/
β βββ views/
βββ etudiants/ # Students Module
β βββ controllers/
β βββ views/
βββ modules/ # Modules Module
β βββ controllers/
β βββ views/
βββ matieres/ # Subjects Module
β βββ controllers/
β βββ views/
βββ inc/ # Included files
β βββ head.php # HTML header
β βββ footer.php # Footer
β βββ top.php # Navigation bar
β βββ content.php # MVC router
βββ lib/ # Libraries
β βββ mypdo.php # PDO connection
β βββ security.lib.php # Security and authentication
β βββ myproject.lib.php # Utility functions
βββ css/ # Stylesheets
β βββ styles.css
βββ js/ # JavaScript scripts
β βββ scripts.js
βββ docs/ # Generated documentation (PHPDoc)
βββ vendor/ # Composer dependencies
βββ index.php # Main entry point
βββ login.php # Login page
βββ main.inc.php # Main MVC structure
βββ phpdoc.xml # PHPDoc configuration
βββ composer.json # PHP dependencies
βββ README.md # This file
The application uses a PHP session-based authentication system. Login credentials are stored in the mp_users table.
Note: For first use, create an administrator user in the database.
The application features a modern and responsive interface with:
- Interactive Design: Smooth animations and transitions
- Font Awesome Icons: For a better user experience
- Address Autocomplete: Uses Adresse Data Gouv API to facilitate data entry
- Tooltips: Contextual information on action buttons
- Confirmation Modals: For critical actions (deletion)
- Creation with automatic associated user generation
- Automatic capitalization of names and first names
- Address autocomplete with automatic city and zip code filling
- Modification and deletion
- Creation with automatic associated user generation
- Automatic capitalization of names and first names
- Address autocomplete
- Modification and deletion
- Course creation with association to a subject and a teacher
- Ability to create a module or subject when creating a course
- Modification and deletion
- Complete CRUD (Create, Read, Update, Delete)
- Coefficient assignment
- Complete CRUD
- Association with a module
- Coefficient assignment
PHPDoc documentation is automatically generated. To generate it:
cd /srv/http/r301devweb/TD3
php /home/lazou/tools/phpdoc/phpDocumentor.phar run -v -c "./phpdoc.xml"Documentation will be available in the docs/ folder and accessible via:
http://localhost/r301devweb/TD3/docs/index.html
- Backend: PHP 8.4
- Database: MySQL
- Frontend: HTML5, CSS3, JavaScript (ES6+)
- CSS Framework: Custom CSS (replacement of W3.CSS)
- Libraries:
- Font Awesome 6.4.0 (icons)
- Google Fonts (Quicksand)
- vlucas/phpdotenv (environment variable management)
- Documentation: PHPDoc
The .env file must contain:
DB_HOST=localhost # Database host
DB_NAME=r301project # Database name
DB_PORT=3306 # MySQL port
DB_USER=simpleuser # MySQL user
DB_PASS=simplepass # MySQL passwordFor the application to work correctly, enable the mod_rewrite module:
sudo a2enmod rewrite
sudo systemctl restart apache2Tables are created with the following prefixes:
mp_users: Usersmp_etudiants: Studentsmp_enseignants: Teachersmp_modules: Modulesmp_matieres: Subjectsmp_cours: Courses
- Check that MySQL is running:
sudo systemctl status mysql - Check the information in
.env - Verify that the MySQL user has the necessary permissions
- Clear browser cache (Ctrl+F5)
- Verify that the
css/styles.cssfile is accessible - Check CSS file permissions
Type errors are generally due to non-casted values. All numeric fields must be explicitly cast to int or float when assigned.
Kime Marwa
- Date: November 2, 2025
- Version: 1.0
This project is an academic work carried out as part of TD3.
- Project initialization
- MVC architecture implementation
- Complete management of students, teachers and courses
- Modern and interactive user interface
- Complete PHPDoc documentation
- Address autocomplete with Adresse Data Gouv API
- Automatic capitalization of names and first names