=====================================================
   MedAssist Clinic Management System
   README
=====================================================

PROJECT OVERVIEW
================
MedAssist is a web-based clinic management system
designed for private healthcare clinics. It enables
administrators to manage patients, doctors, and
appointments through a secure, user-friendly interface.

Built as a university database assignment project.


TECHNOLOGY STACK
================
- PHP (Plain PHP, no framework)
- MySQL (Database)
- HTML5, CSS3, Bootstrap 5
- Vanilla JavaScript
- Apache (XAMPP)


REQUIREMENTS
============
- XAMPP (Apache + MySQL)
- PHP 7.4 or higher
- MySQL 5.7 or higher
- Modern web browser (Chrome, Firefox, Edge)


INSTALLATION STEPS
==================

1. Install XAMPP
   Download and install from: https://www.apachefriends.org/

2. Copy Project to htdocs
   Copy the entire "MedAssist_Clinic_Management_System" folder
   into your XAMPP htdocs directory:
   C:\xampp\htdocs\MedAssist_Clinic_Management_System\

3. Start XAMPP Services
   Open XAMPP Control Panel.
   Start Apache and MySQL.

4. Create the Database
   Open phpMyAdmin: http://localhost/phpmyadmin
   Import the SQL file: "Sql Code.sql" from the project root.
   This will create the database "medassist_clinic_db"
   with all tables and sample data.

5. Access the Application
   Open your browser and go to:
   http://localhost/MedAssist_Clinic_Management_System/


LOGIN CREDENTIALS
=================
Admin Login:
   Username: admin01
   Password: Admin@123


PROJECT STRUCTURE
=================

MedAssist_Clinic_Management_System/
|
|-- index.php              (Public Home Page)
|-- login.php              (Admin Login Page)
|-- logout.php             (Logout Script)
|-- dashboard.php          (Admin Dashboard)
|
|-- patients.php           (View All Patients)
|-- add_patient.php        (Add New Patient)
|-- edit_patient.php       (Edit Patient Record)
|-- delete_patient.php     (Delete Patient)
|
|-- doctors.php            (View All Doctors)
|-- add_doctor.php         (Add New Doctor)
|-- edit_doctor.php        (Edit Doctor Record)
|-- delete_doctor.php      (Delete Doctor)
|
|-- appointments.php       (View All Appointments)
|-- add_appointment.php    (Book New Appointment)
|-- edit_appointment.php   (Edit Appointment)
|-- delete_appointment.php (Cancel Appointment)
|
|-- search.php             (Search Records)
|
|-- includes/
|   |-- config.php         (Database Connection)
|   |-- session.php        (Session Management)
|   |-- auth.php           (Authentication Guard)
|   |-- functions.php      (Helper Functions)
|   |-- header.php         (HTML Head Section)
|   |-- navbar.php         (Navigation Bar)
|   |-- footer.php         (Footer Section)
|
|-- css/
|   |-- style.css          (Main Stylesheet)
|   |-- login.css          (Login Page Styles)
|   |-- dashboard.css      (Dashboard Styles)
|   |-- table.css          (Table Page Styles)
|   |-- form.css           (Form Styles)
|
|-- js/
|   |-- validation.js      (Form Validation)
|   |-- confirm_delete.js  (Delete Confirmation)
|
|-- images/
|   |-- logo.png           (Clinic Logo)
|   |-- banner.jpg         (Banner Image)
|
|-- database/
|   |-- README.txt         (Database Reference)
|
|-- Sql Code.sql           (Complete Database Schema)
|-- README.txt             (This File)


DATABASE TABLES
===============
1. Users         - User accounts (Admin, Doctor, Patient)
2. Departments   - Clinic departments
3. Doctors       - Doctor profiles and specializations
4. Patients      - Patient records and contact info
5. Appointments  - Appointment bookings and status
6. Treatments    - Treatment records (referenced)
7. Feedback      - Patient feedback (referenced)
8. Audit_Log     - System audit trail (referenced)


SECURITY FEATURES
=================
- SQL Injection Protection (Prepared Statements)
- XSS Protection (htmlspecialchars output escaping)
- Session-based Authentication
- Role-based Access Control (Admin only)
- Input Validation (server-side and client-side)
- Foreign Key Constraint Checks before deletion


KEY FEATURES
============
- Responsive Bootstrap 5 Design
- CRUD Operations for Patients, Doctors, Appointments
- Universal Search Functionality
- Dashboard with Statistics Cards
- Flash Messages for User Feedback
- Form Validation (Client + Server side)
- Professional Blue/White/Grey Theme


NOTES
=====
- Passwords are stored in plain text as per sample data.
  In a production environment, use password_hash() and
  password_verify() for secure password handling.

- The application connects to MySQL on localhost with
  username "root" and no password (default XAMPP config).

- All form inputs are validated on both client-side
  (JavaScript) and server-side (PHP).


AUTHOR
======
University Database Assignment Project
MedAssist Clinic Management System

=====================================================
