# vaishnavithevar/salon_management architecture

> Architecture diagram of the GitHub repository vaishnavithevar/salon_management, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vaishnavithevar/salon_management
- Repository: https://github.com/vaishnavithevar/salon_management

## Overview

This is a PHP salon appointment-booking application with customer booking, slot availability, payment, appointment management, and an admin dashboard. The main flow selects a service, stylist, date, and available time, then records a pending appointment and unpaid payment; customers can later pay or cancel, while administrators update appointment status. The excerpts show the database connection and individual page behavior, but not the booking form’s submission target or the JavaScript request URL for slot lookup, so those links are omitted.

Main entry points: [`db.php`](https://github.com/vaishnavithevar/salon_management/blob/main/db.php) (PDO connection), [`my_bookings.php`](https://github.com/vaishnavithevar/salon_management/blob/main/my_bookings.php) (My appointments), [`pay.php`](https://github.com/vaishnavithevar/salon_management/blob/main/pay.php) (Payment confirmation), [`index.php`](https://github.com/vaishnavithevar/salon_management/blob/main/index.php) (Booking interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_booking["Booking"]
  node_booking_ui["Booking interface<br/>[index.php]"]
  node_slot_lookup["Slot availability<br/>[get_slots.php]"]
  node_booking_submit["Booking processing"]
end

subgraph group_customer["Customer management"]
  node_payment["Payment confirmation<br/>[pay.php]"]
  node_my_bookings["My appointments<br/>[my_bookings.php]"]
end

subgraph group_admin["Administration and data"]
  node_admin_dashboard["Admin dashboard<br/>[admin.php]"]
  node_db_connection["PDO connection<br/>[db.php]"]
  node_salon_db[("Salon database")]
end

node_customer_actor(("Customer"))
node_admin_actor(("Administrator"))

node_customer_actor -->|"opens booking"| node_booking_ui
node_customer_actor -->|"submits booking"| node_booking_submit
node_customer_actor -->|"views appointments"| node_my_bookings
node_customer_actor -->|"submits payment"| node_payment
node_admin_actor -->|"manages appointments"| node_admin_dashboard
node_booking_ui -->|"loads PDO"| node_db_connection
node_slot_lookup -->|"loads PDO"| node_db_connection
node_booking_submit -->|"loads PDO"| node_db_connection
node_payment -->|"loads PDO"| node_db_connection
node_my_bookings -->|"links to pay"| node_payment
node_my_bookings -->|"loads PDO"| node_db_connection
node_admin_dashboard -->|"loads PDO"| node_db_connection
node_db_connection -->|"connects to"| node_salon_db

click node_booking_ui "https://github.com/vaishnavithevar/salon_management/blob/main/index.php"
click node_slot_lookup "https://github.com/vaishnavithevar/salon_management/blob/main/get_slots.php"
click node_booking_submit "https://github.com/vaishnavithevar/salon_management/blob/main/process_booking.php"
click node_payment "https://github.com/vaishnavithevar/salon_management/blob/main/pay.php"
click node_my_bookings "https://github.com/vaishnavithevar/salon_management/blob/main/my_bookings.php"
click node_admin_dashboard "https://github.com/vaishnavithevar/salon_management/blob/main/admin.php"
click node_db_connection "https://github.com/vaishnavithevar/salon_management/blob/main/db.php"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_booking_ui,node_slot_lookup,node_booking_submit toneBlue
class node_payment,node_my_bookings toneAmber
class node_admin_dashboard,node_db_connection,node_salon_db toneMint
class node_customer_actor,node_admin_actor toneIndigo
```

## Components

### Booking

- [Booking interface](https://github.com/vaishnavithevar/salon_management/blob/main/index.php): `index.php`
- [Slot availability](https://github.com/vaishnavithevar/salon_management/blob/main/get_slots.php): `get_slots.php`
- [Booking processing](https://github.com/vaishnavithevar/salon_management/blob/main/process_booking.php): `process_booking.php`

### Customer management

- [Payment confirmation](https://github.com/vaishnavithevar/salon_management/blob/main/pay.php): `pay.php`
- [My appointments](https://github.com/vaishnavithevar/salon_management/blob/main/my_bookings.php): `my_bookings.php`

### Administration and data

- [Admin dashboard](https://github.com/vaishnavithevar/salon_management/blob/main/admin.php): `admin.php`
- [PDO connection](https://github.com/vaishnavithevar/salon_management/blob/main/db.php): `db.php`
- **Salon database**

### Other components

- **Customer**
- **Administrator**

## Connections

- Customer → Booking interface: opens booking (evidence: `index.php`)
- Customer → Booking processing: submits booking (evidence: `process_booking.php`)
- Customer → My appointments: views appointments (evidence: `my_bookings.php`)
- Customer → Payment confirmation: submits payment (evidence: `pay.php`)
- Administrator → Admin dashboard: manages appointments (evidence: `admin.php`)
- Booking interface → PDO connection: loads PDO (evidence: `index.php`)
- Slot availability → PDO connection: loads PDO (evidence: `get_slots.php`)
- Booking processing → PDO connection: loads PDO (evidence: `process_booking.php`)
- Payment confirmation → PDO connection: loads PDO (evidence: `pay.php`)
- My appointments → Payment confirmation: links to pay (evidence: `my_bookings.php`)
- My appointments → PDO connection: loads PDO (evidence: `my_bookings.php`)
- Admin dashboard → PDO connection: loads PDO (evidence: `admin.php`)
- PDO connection → Salon database: connects to (evidence: `db.php`)
