Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

548 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CABA logo

Clinic Appointment Booking App

About the Application

This project was created as a case study for a master's thesis used to analyze productivity and software quality outcomes in a distributed agile development context.

  • Version: 9.2.0 (APP_VERSION in config.php)
  • Stack: PHP 8 (PDO/MySQL), Twig, Apache, jQuery/Bootstrap 4, SCSS

How do I get set up?

Docker (recommended)

Requires Docker Desktop with Compose v2+.

docker compose up --build

Open http://localhost:8080/

  • Images: php:8.5-apache, mysql:lts, composer:lts (official Docker Hub images)
  • First start creates DB clinicAppointmentApp and imports docker/db/init/01-clinicappointmentapp.sql
  • App DB user: caba / caba - root: caba_root (local only, change before any shared use)
  • Env used by the PHP container: APP_URL, DB_HOST, DB_USER, DB_PASS, DB_NAME (see compose.yaml)
  • Stop: docker compose down - add -v to delete the MySQL volume and re-seed next start

Without Docker

  • PHP 8.1+ with pdo_mysql, Apache (or equivalent) with mod_rewrite, Composer deps (composer install)
  • Create MySQL database clinicAppointmentApp
  • Import docker/db/init/01-clinicappointmentapp.sql (or a dump under assets/backups/)
  • Set env (or edit config.php): APP_URL, DB_HOST, DB_USER, DB_PASS, DB_NAME
  • Default non-Docker APP_URL is http://localhost/caba/ - the vhost path must match that URL (or set APP_URL to your real base). JS reads APP_URL from the page and falls back to http://localhost/caba/ when it is not set.

Seed users in the SQL dump

Roles in DB: 1 receptionist, 2 doctor, 3 patient.

Demo logins from docker/db/init/01-clinicappointmentapp.sql (local only). The password for each account is the username duplicated (admin -> adminadmin, emad -> emademad).

  • Receptionist: admin
  • Doctors: emad, heba, reem, eman, sameer, omar
  • Patients: safaa, saeed, lina, shima, marwa, mazen, ahmed, mohammed

If the MySQL volume already exists from an older seed, recreate it (docker compose down -v then up --build) for these passwords to apply.

SCSS / CSS

  • Edit files under scss/, not the generated CSS
  • App loads css/style.min.css and css/rtl.min.css (config.php)
  • Local rebuild typically goes through gulp (gulpfile.js) / sass, the Docker image does not run a frontend build pipeline (scss/ is dockerignored)

Known problems / incomplete work

  • Debug left on: APP_DEBUG is TRUE, Twig debug is on, and display_errors is forced on in config.php (even though the Docker image enables production php.ini).
  • Weak auth: passwords stored as MD5 with a static salt (class.user.php).
  • Secrets in source: Gmail SMTP credentials in sendEmail.php. AES key hardcoded in backend/functions.php.
  • PWA incomplete: service-worker.js is fully commented out. Registration/PWA bits commented in Twig. Referenced manifest.json / Apple touch icons are missing.
  • .htaccess host rules: non-localhost hosts are redirected to https://www.…. Awkward for LAN IPs or custom hostnames.
  • Seed dump quirks: dump originated as a phpMyAdmin export for techrjfw_cabadb. Includes old session rows and content that may not match a clean install.
  • No automated tests and no CI configuration in this repo.
  • Composer lock targets older Symfony/Twig minors while Docker runs PHP 8.5. E_DEPRECATED is filtered in config.php so those vendor notices do not flood the UI.
  • Docker DB port 3306 published on the host..

Project layout (short)

Path Purpose
pages/ PHP page entrypoints
backend/ API, classes, DB helpers
templates/ Twig templates
js/, css/, scss/ Front-end assets
uploads/ Runtime uploads (mounted as a volume in Compose)
docker/db/init/ MySQL first-boot SQL
Dockerfile, compose.yaml Container setup

About

This project was created as a case study for a master's thesis used to analyze productivity and software quality outcomes in a distributed agile development context (this repo is incomplete version)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Used by

Contributors

Languages