Website for attendance optimization in a generic school.
This was a project developed with vanilla PHP in a subject when I was student. Now I refactored all the project with better practices (MVC, Composer, etc), similar to professional framework.
Due to this project does not have testing, is not deployed anymore and does not have more purposes, is no longer maintained.
- Configured composer to respect PSR4 standard.
- Installed third party packages and respect PSR7 standard.
- Implemented Model-View-Controller pattern and Front Controller.
- Implemented a basic ORM using OOP and SQL queries.
- Implemented Twig in order to have better views.
- Improved the URLs (/rolecall/{class_room_id} instead of /rolecall?class_room_id=*).
- Implemented libraries for database management (migrations and seeders).
- Improved the design, palette colors and HTML semantic.
- Implemented docker compose for a better environment.
These instructions will get you a copy of the project up and running on your local machine.
The programs you need are:
First duplicate the file .env.example as .env.
cp .env.example .env
Note: You could change some values, anyway docker-compose create the database according to the defined values.
Create the image (php:7.4-composer-npm) and run the services (php, nginx and mysql):
docker-compose up
Note: You can run the last command in the background with docker-compose up -d
.
Now you have all the environment ready, for the next commands you need to be inside of the app container with:
docker-compose exec app /bin/bash
Then install the PHP packages.
composer install
Finally generate the database and fill it with testing data:
vendor/bin/phinx migrate
vendor/bin/phinx seed:run
And now you have all the environment in the port 8000.
Note: Use exit
command to exit from the container, docker-compose down
to delete the containers and docker volume rm php-school-rollcall_mysql
to delete the database volume.
- In the login there are the ids and password by default to log in.
- Administrator can watch all the users.
- Students can watch its class rooms and its attendances.
- Teachers can watch its class rooms, pass the role and edit an attendance.
- Martín S. Campos - mascam97
You're free to contribute to this project by submitting issues and/or pull requests.
This personal project is licensed under the MIT License.
- Tutorial Laravel with Docker Compose
- Docker course
- PHP advance course 2018 - Course for better features
- PHP introduction course 2018 - Course for remastering
- PHP framework introduction course
- Oriented Object Programming in PHP - Course for creating better Models and Controllers
- PHP 7 and MySQL: Course from scratch