# richard-musyoka/milestone-beauty-parlour architecture

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

- Interactive diagram: https://gitdiagram.com/richard-musyoka/milestone-beauty-parlour
- Repository: https://github.com/richard-musyoka/milestone-beauty-parlour

## Overview

Beauty Parlour Management System is a PHP salon site with public service information and appointment booking, plus an administrator panel for appointments, customers, services, invoices, reports, and site pages. The main customer path is service selection and appointment submission, followed by confirmation. The sampled booking code shows database writes and redirect behavior; the admin menu documents additional operational branches whose individual handlers were not sampled. Edges are limited to relationships visible in excerpts or the source index.

Main entry points: [`admin/includes/sidebar.php`](https://github.com/richard-musyoka/milestone-beauty-parlour/blob/main/admin/includes/sidebar.php) (Admin navigation and header), [`admin/includes/dbconnection.php`](https://github.com/richard-musyoka/milestone-beauty-parlour/blob/main/admin/includes/dbconnection.php) (Admin database connection), [`index.php`](https://github.com/richard-musyoka/milestone-beauty-parlour/blob/main/index.php) (Appointment booking), [`includes/dbconnection.php`](https://github.com/richard-musyoka/milestone-beauty-parlour/blob/main/includes/dbconnection.php) (Public database connection)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Customer site"]
  node_booking["Appointment booking<br/>[index.php]"]
  node_service_catalog["Service catalog<br/>[services.php]"]
  node_confirmation["Booking confirmation<br/>[thank-you.php]"]
  node_public_pages["About and contact<br/>[about.php]"]
end

subgraph group_adminops["Admin operations"]
  node_admin_dashboard["Admin dashboards<br/>[dashboard.php]"]
  node_appointment_ops["Appointment management"]
  node_service_admin["Service management<br/>[add-services.php]"]
  node_customer_admin["Customer management<br/>[add-customer.php]"]
  node_invoice_admin["Invoices and billing<br/>[invoices.php]"]
  node_reports["Sales and date reports<br/>[sales-reports.php]"]
  node_page_admin["Site page settings<br/>[about-us.php]"]
end

subgraph group_shared["Shared infrastructure"]
  node_admin_layout["Admin navigation and header<br/>[sidebar.php]"]
  node_public_layout["Public shared layout<br/>[header.php]"]
  node_public_db["Public database connection<br/>[dbconnection.php]"]
  node_admin_db["Admin database connection<br/>[dbconnection.php]"]
  node_database[("BPMS MySQL database")]
end

node_customer(("Customer"))
node_admin_user(("Administrator"))

node_customer -->|"submits details"| node_booking
node_booking -->|"loads services and writes appointment"| node_public_db
node_booking -->|"redirects after booking"| node_confirmation
node_customer -->|"views prices"| node_service_catalog
node_booking -->|"includes navigation"| node_public_layout
node_service_catalog -->|"includes navigation"| node_public_layout
node_public_pages -->|"queries page data"| node_public_db
node_public_db -->|"connects"| node_database
node_admin_user -->|"navigates panel"| node_admin_layout
node_admin_layout -->|"links appointments"| node_appointment_ops
node_admin_layout -->|"links services"| node_service_admin
node_admin_layout -->|"links customers"| node_customer_admin
node_admin_layout -->|"links invoices"| node_invoice_admin
node_admin_layout -->|"links reports"| node_reports
node_admin_layout -->|"links page settings"| node_page_admin
node_admin_dashboard -->|"queries dashboard data"| node_admin_db
node_service_admin -->|"writes service records"| node_admin_db
node_customer_admin -->|"uses connection"| node_admin_db
node_admin_db -->|"connects"| node_database
node_invoice_admin -.->|"uses connection"| node_admin_db
node_appointment_ops -.->|"uses connection"| node_admin_db
node_reports -.->|"uses connection"| node_admin_db

click node_booking "https://github.com/richard-musyoka/milestone-beauty-parlour/blob/main/index.php"
click node_service_catalog "https://github.com/richard-musyoka/milestone-beauty-parlour/blob/main/services.php"
click node_confirmation "https://github.com/richard-musyoka/milestone-beauty-parlour/blob/main/thank-you.php"
click node_public_pages "https://github.com/richard-musyoka/milestone-beauty-parlour/blob/main/about.php"
click node_admin_dashboard "https://github.com/richard-musyoka/milestone-beauty-parlour/blob/main/admin/dashboard.php"
click node_appointment_ops "https://github.com/richard-musyoka/milestone-beauty-parlour/blob/main/admin/all-appointment.php"
click node_service_admin "https://github.com/richard-musyoka/milestone-beauty-parlour/blob/main/admin/add-services.php"
click node_customer_admin "https://github.com/richard-musyoka/milestone-beauty-parlour/blob/main/admin/add-customer.php"
click node_invoice_admin "https://github.com/richard-musyoka/milestone-beauty-parlour/blob/main/admin/invoices.php"
click node_reports "https://github.com/richard-musyoka/milestone-beauty-parlour/blob/main/admin/sales-reports.php"
click node_page_admin "https://github.com/richard-musyoka/milestone-beauty-parlour/blob/main/admin/about-us.php"
click node_admin_layout "https://github.com/richard-musyoka/milestone-beauty-parlour/blob/main/admin/includes/sidebar.php"
click node_public_layout "https://github.com/richard-musyoka/milestone-beauty-parlour/blob/main/includes/header.php"
click node_public_db "https://github.com/richard-musyoka/milestone-beauty-parlour/blob/main/includes/dbconnection.php"
click node_admin_db "https://github.com/richard-musyoka/milestone-beauty-parlour/blob/main/admin/includes/dbconnection.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,node_service_catalog,node_confirmation,node_public_pages toneBlue
class node_admin_dashboard,node_appointment_ops,node_service_admin,node_customer_admin,node_invoice_admin,node_reports,node_page_admin toneAmber
class node_admin_layout,node_public_layout,node_public_db,node_admin_db,node_database toneMint
class node_customer,node_admin_user toneIndigo
```

## Components

### Customer site

- [Appointment booking](https://github.com/richard-musyoka/milestone-beauty-parlour/blob/main/index.php): `index.php`
- [Service catalog](https://github.com/richard-musyoka/milestone-beauty-parlour/blob/main/services.php): `services.php`
- [Booking confirmation](https://github.com/richard-musyoka/milestone-beauty-parlour/blob/main/thank-you.php): `thank-you.php`
- [About and contact](https://github.com/richard-musyoka/milestone-beauty-parlour/blob/main/about.php): `about.php`

### Admin operations

- [Admin dashboards](https://github.com/richard-musyoka/milestone-beauty-parlour/blob/main/admin/dashboard.php): `admin/dashboard.php`
- [Appointment management](https://github.com/richard-musyoka/milestone-beauty-parlour/blob/main/admin/all-appointment.php): `admin/all-appointment.php`
- [Service management](https://github.com/richard-musyoka/milestone-beauty-parlour/blob/main/admin/add-services.php): `admin/add-services.php`
- [Customer management](https://github.com/richard-musyoka/milestone-beauty-parlour/blob/main/admin/add-customer.php): `admin/add-customer.php`
- [Invoices and billing](https://github.com/richard-musyoka/milestone-beauty-parlour/blob/main/admin/invoices.php): `admin/invoices.php`
- [Sales and date reports](https://github.com/richard-musyoka/milestone-beauty-parlour/blob/main/admin/sales-reports.php): `admin/sales-reports.php`
- [Site page settings](https://github.com/richard-musyoka/milestone-beauty-parlour/blob/main/admin/about-us.php): `admin/about-us.php`

### Shared infrastructure

- [Admin navigation and header](https://github.com/richard-musyoka/milestone-beauty-parlour/blob/main/admin/includes/sidebar.php): `admin/includes/sidebar.php`
- [Public shared layout](https://github.com/richard-musyoka/milestone-beauty-parlour/blob/main/includes/header.php): `includes/header.php`
- [Public database connection](https://github.com/richard-musyoka/milestone-beauty-parlour/blob/main/includes/dbconnection.php): `includes/dbconnection.php`
- [Admin database connection](https://github.com/richard-musyoka/milestone-beauty-parlour/blob/main/admin/includes/dbconnection.php): `admin/includes/dbconnection.php`
- **BPMS MySQL database**

### Other components

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

## Connections

- Customer → Appointment booking: submits details (evidence: `index.php`)
- Appointment booking → Public database connection: loads services and writes appointment (evidence: `index.php`)
- Appointment booking → Booking confirmation: redirects after booking (evidence: `index.php`)
- Customer → Service catalog: views prices
- Appointment booking → Public shared layout: includes navigation (evidence: `index.php`)
- Service catalog → Public shared layout: includes navigation (evidence: `services.php`)
- About and contact → Public database connection: queries page data (evidence: `about.php`)
- Public database connection → BPMS MySQL database: connects (evidence: `includes/dbconnection.php`)
- Administrator → Admin navigation and header: navigates panel (evidence: `admin/includes/sidebar.php`)
- Admin navigation and header → Appointment management: links appointments (evidence: `admin/includes/sidebar.php`)
- Admin navigation and header → Service management: links services (evidence: `admin/includes/sidebar.php`)
- Admin navigation and header → Customer management: links customers (evidence: `admin/includes/sidebar.php`)
- Admin navigation and header → Invoices and billing: links invoices (evidence: `admin/includes/sidebar.php`)
- Admin navigation and header → Sales and date reports: links reports (evidence: `admin/includes/sidebar.php`)
- Admin navigation and header → Site page settings: links page settings (evidence: `admin/includes/sidebar.php`)
- Admin dashboards → Admin database connection: queries dashboard data (evidence: `admin/dashboard.php`)
- Service management → Admin database connection: writes service records (evidence: `admin/add-services.php`)
- Customer management → Admin database connection: uses connection (evidence: `admin/add-customer.php`)
- Admin database connection → BPMS MySQL database: connects (evidence: `admin/includes/dbconnection.php`)
- Invoices and billing → Admin database connection: uses connection
- Appointment management → Admin database connection: uses connection
- Sales and date reports → Admin database connection: uses connection
