Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

 
 

Repository files navigation

HealthBook – electronic vaccination record

Carnet de vaccination électronique : suivez vos vaccins et leurs dates d'injection.

School project (November 2020), built in about two weeks by a team of four students. HealthBook lets a user create an account, pick vaccines from a catalogue, record the date of each injection, and lets an administrator manage the vaccine catalogue and the users from a back-office.

This repository is a fork of the team repository ClemBlue/Sant-Connect-.

Team and my contributions

Team (as listed on the contact page): Younès Bessa, Cyril Bationo, Clément Blin, Julien Morel.

Rough split, based on the git history:

  • Clément Blin: project skeleton, database, profile page and the user/vaccine logic (add/remove a vaccine, list available vaccines), logout.
  • Julien Morel: sign-up/login, forgotten-password flow, admin back-office (vaccine CRUD, users, statistics).
  • Oliebat account (presumably Cyril Bationo): header, logo, contact page, responsive home page.
  • Me (YounesBessa), 28 of 73 commits, mostly front-end:
    • styling of the site: reorganised asset/css/style.css, styled the home page forms, header, footer, legal notice page and the profile page (layout, avatar, buttons);
    • HTML of the sign-up/login forms on the home page, home page description and background images, Montserrat web font, logo;
    • wrote the legal notice page (mentionlegal.php) and translated the footer;
    • integrated the contact page markup and the profile page clean-up (removed debug output);
    • fixed a division by zero in the admin statistics (admin/index.php).

Features

Users (index.php, profil.php, vaccins.php)

  • Sign-up (first name, last name, unique e-mail, password hashed with password_hash) and login on the home page; deactivated accounts cannot log in.
  • Profile page: list of "my vaccines" with description and injection date, catalogue of the other active vaccines with an "add to my vaccines" link, removal of a vaccine, form to set the injection date of one of my vaccines.
  • Forgotten password (mot_de_passe_oublier.php → mdp_modif.php) based on a per-user token (see limitations).
  • Static pages: contact/team page and legal notice.

Admin back-office (admin/, based on the SB Admin 2 Bootstrap template)

  • Accessible to users whose role is admin (a "Back" link appears on the home page).
  • Dashboard with statistics: number of users, number of vaccines, share of active vaccines, average number of vaccines per user.
  • Vaccine catalogue: add, edit, activate/deactivate.
  • Users: list, edit name/surname, activate/deactivate accounts.
  • Raw list of user ↔ vaccine links.

Tech stack

  • PHP (procedural, PDO + MySQL/MariaDB)
  • HTML/CSS for the public site (no framework)
  • Admin: SB Admin 2 (Bootstrap 4.5, jQuery 3.5, DataTables, Chart.js, Font Awesome 5), loaded from CDNs

Project structure

index.php                  home: login + sign-up
profil.php                 user profile and vaccines
vaccins.php                add/remove a vaccine for the logged-in user
mot_de_passe_oublier.php   request a password reset
mdp_modif.php              set a new password (token in the URL)
contact.php, mentionlegal.php
logout.php
inc/
  config.example.php       DB settings template (copy to inc/config.php)
  pdo.php                  PDO connection (reads the config)
  function.php             helpers (validation, XSS cleaning, random token)
  header-front.php, footer-front.php
admin/                     back-office (index.php = vaccines + stats, user.php, user_vaccin.php)
asset/                     CSS, fonts, images
sante_connectesante_connecte.sql   phpMyAdmin dump: schema + sample data

Database

sante_connectesante_connecte.sql contains the three tables (users, vaccins, user_vaccin) and a few sample vaccines and users.

mysql -u root -p -e "CREATE DATABASE sante_connecte CHARACTER SET utf8mb4"
mysql -u root -p sante_connecte < sante_connectesante_connecte.sql

The sample users' passwords are not documented. Create your own account through the sign-up form, then promote it to admin if you want to use the back-office:

UPDATE users SET role = 'admin' WHERE email = 'you@example.com';

Running locally

Requirements: PHP 7.4+ with pdo_mysql, MySQL or MariaDB (XAMPP/MAMP/WAMP are fine).

  1. Import the database (see above).
  2. Optional: cp inc/config.example.php inc/config.php and edit the credentials. Without inc/config.php the app connects to sante_connecte on localhost as root with an empty password (stock XAMPP).
  3. Start a server from the project root:
    php -S localhost:8000
    or copy the folder into htdocs/. Then open http://localhost:8000.

Limitations

  • The password reset is a demo: no e-mail is sent; mot_de_passe_oublier.php displays the reset link directly on the page, so anyone who knows an e-mail address can reset that account's password. The token never expires.
  • No reminder/alert system: the home page mentions recall alerts, but only the injection date is stored (the delay column exists but is not used for reminders).
  • Setting an injection date only works for a vaccine already added to the profile.
  • Admin pages rely on ?id=…&tag=… GET parameters for state changes, with no CSRF protection; output is not consistently escaped.
  • The contact page photos (asset/img/imgcontact*.jpg) are 5–13 MB each and are not resized.
  • Student project: minimal error handling, mixed French/English naming.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages