# lillian0201/molarcoaster architecture

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

- Interactive diagram: https://gitdiagram.com/lillian0201/molarcoaster
- Repository: https://github.com/lillian0201/molarcoaster

## Overview

MolarCoaster is a dental clinic website for patients. Its primary workflow is browsing clinic information and services, checking educational resources, then requesting an appointment; a separate contact form sends messages. The appointment UI checks availability and submits requests through PHP endpoints backed by MySQL. The tree also documents booking, contact, resources, and shared navigation; unsampled page content is represented at its exact page path. Relationships are limited to explicit README/index references and shown calls; some page-to-page navigation and unsampled backend behavior are not expanded.

Main entry points: [`Patient/Database/config.php`](https://github.com/lillian0201/molarcoaster/blob/main/Patient/Database/config.php) (Database helpers), [`Patient/Appointment Booking/appointment.js`](https://github.com/lillian0201/molarcoaster/blob/main/Patient/Appointment%20Booking/appointment.js) (Booking calendar), [`Patient/Services/services.html`](https://github.com/lillian0201/molarcoaster/blob/main/Patient/Services/services.html) (Dental services), [`Patient/Resources/resources.html`](https://github.com/lillian0201/molarcoaster/blob/main/Patient/Resources/resources.html) (Dental resources)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_patient_site["Patient website"]
  node_home["Clinic home<br/>[home.html]"]
  node_about["Clinic profile<br/>[about.html]"]
  node_services["Dental services<br/>[services.html]"]
  node_service_details["Service details"]
  node_resources["Dental resources<br/>[resources.html]"]
  node_shared_layout["Shared navigation<br/>[layout.js]"]
end

subgraph group_patient_interactions["Patient interactions"]
  node_contact_page["Contact page<br/>[contact.html]"]
  node_contact_form["Contact submission<br/>[contact.js]"]
  node_booking_page["Appointment page<br/>[appointment.html]"]
  node_booking_ui["Booking calendar<br/>[appointment.js]"]
end

subgraph group_api_data["API and data"]
  node_message_api["Message endpoint<br/>[send_message.php]"]
  node_booking_api["Booking endpoint"]
  node_slots_api["Availability endpoint<br/>[booked_slots.php]"]
  node_db_helpers["Database helpers<br/>[config.php]"]
  node_clinic_db[("Clinic database<br/>[schema.sql]")]
end

node_patient(("Patient"))
node_external_resources(("Resource providers"))

node_patient -->|"browses"| node_home
node_patient -->|"browses"| node_about
node_patient -->|"browses"| node_services
node_patient -->|"browses"| node_resources
node_patient -->|"opens"| node_contact_page
node_patient -->|"opens"| node_booking_page
node_services -.->|"offers"| node_service_details
node_booking_ui -->|"fetches availability"| node_slots_api
node_booking_ui -->|"submits request"| node_booking_api
node_contact_form -->|"submits message"| node_message_api
node_message_api -->|"uses helpers"| node_db_helpers
node_booking_api -->|"uses helpers"| node_db_helpers
node_slots_api -->|"uses helpers"| node_db_helpers
node_db_helpers -.->|"connects to"| node_clinic_db
node_resources -->|"links to"| node_external_resources

click node_home "https://github.com/lillian0201/molarcoaster/blob/main/Patient/Home%20Page/home.html"
click node_about "https://github.com/lillian0201/molarcoaster/blob/main/Patient/About/about.html"
click node_services "https://github.com/lillian0201/molarcoaster/blob/main/Patient/Services/services.html"
click node_service_details "https://github.com/lillian0201/molarcoaster/tree/main/Patient/Services"
click node_resources "https://github.com/lillian0201/molarcoaster/blob/main/Patient/Resources/resources.html"
click node_contact_page "https://github.com/lillian0201/molarcoaster/blob/main/Patient/Contact/contact.html"
click node_contact_form "https://github.com/lillian0201/molarcoaster/blob/main/Patient/Contact/contact.js"
click node_booking_page "https://github.com/lillian0201/molarcoaster/blob/main/Patient/Appointment%20Booking/appointment.html"
click node_booking_ui "https://github.com/lillian0201/molarcoaster/blob/main/Patient/Appointment%20Booking/appointment.js"
click node_shared_layout "https://github.com/lillian0201/molarcoaster/blob/main/Patient/js/layout.js"
click node_message_api "https://github.com/lillian0201/molarcoaster/blob/main/Patient/Database/send_message.php"
click node_booking_api "https://github.com/lillian0201/molarcoaster/blob/main/Patient/Database/book_appointment.php"
click node_slots_api "https://github.com/lillian0201/molarcoaster/blob/main/Patient/Database/booked_slots.php"
click node_db_helpers "https://github.com/lillian0201/molarcoaster/blob/main/Patient/Database/config.php"
click node_clinic_db "https://github.com/lillian0201/molarcoaster/blob/main/Patient/Database/schema.sql"

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_home,node_about,node_services,node_service_details,node_resources,node_shared_layout toneBlue
class node_contact_page,node_contact_form,node_booking_page,node_booking_ui toneAmber
class node_message_api,node_booking_api,node_slots_api,node_db_helpers,node_clinic_db toneMint
class node_patient,node_external_resources toneIndigo
```

## Components

### Patient website

- [Clinic home](https://github.com/lillian0201/molarcoaster/blob/main/Patient/Home%20Page/home.html): `Patient/Home Page/home.html`
- [Clinic profile](https://github.com/lillian0201/molarcoaster/blob/main/Patient/About/about.html): `Patient/About/about.html`
- [Dental services](https://github.com/lillian0201/molarcoaster/blob/main/Patient/Services/services.html): `Patient/Services/services.html`
- [Service details](https://github.com/lillian0201/molarcoaster/tree/main/Patient/Services): `Patient/Services`
- [Dental resources](https://github.com/lillian0201/molarcoaster/blob/main/Patient/Resources/resources.html): `Patient/Resources/resources.html`
- [Shared navigation](https://github.com/lillian0201/molarcoaster/blob/main/Patient/js/layout.js): `Patient/js/layout.js`

### Patient interactions

- [Contact page](https://github.com/lillian0201/molarcoaster/blob/main/Patient/Contact/contact.html): `Patient/Contact/contact.html`
- [Contact submission](https://github.com/lillian0201/molarcoaster/blob/main/Patient/Contact/contact.js): `Patient/Contact/contact.js`
- [Appointment page](https://github.com/lillian0201/molarcoaster/blob/main/Patient/Appointment%20Booking/appointment.html): `Patient/Appointment Booking/appointment.html`
- [Booking calendar](https://github.com/lillian0201/molarcoaster/blob/main/Patient/Appointment%20Booking/appointment.js): `Patient/Appointment Booking/appointment.js`

### API and data

- [Message endpoint](https://github.com/lillian0201/molarcoaster/blob/main/Patient/Database/send_message.php): `Patient/Database/send_message.php`
- [Booking endpoint](https://github.com/lillian0201/molarcoaster/blob/main/Patient/Database/book_appointment.php): `Patient/Database/book_appointment.php`
- [Availability endpoint](https://github.com/lillian0201/molarcoaster/blob/main/Patient/Database/booked_slots.php): `Patient/Database/booked_slots.php`
- [Database helpers](https://github.com/lillian0201/molarcoaster/blob/main/Patient/Database/config.php): `Patient/Database/config.php`
- [Clinic database](https://github.com/lillian0201/molarcoaster/blob/main/Patient/Database/schema.sql): `Patient/Database/schema.sql`

### Other components

- **Patient**
- **Resource providers**

## Connections

- Patient → Clinic home: browses
- Patient → Clinic profile: browses
- Patient → Dental services: browses
- Patient → Dental resources: browses
- Patient → Contact page: opens
- Patient → Appointment page: opens
- Dental services → Service details: offers
- Booking calendar → Availability endpoint: fetches availability (evidence: `Patient/Appointment Booking/appointment.js`)
- Booking calendar → Booking endpoint: submits request (evidence: `Patient/Appointment Booking/appointment.js`)
- Contact submission → Message endpoint: submits message (evidence: `Patient/Contact/contact.js`)
- Message endpoint → Database helpers: uses helpers (evidence: `Patient/Database/send_message.php`)
- Booking endpoint → Database helpers: uses helpers (evidence: `Patient/Database/book_appointment.php`)
- Availability endpoint → Database helpers: uses helpers (evidence: `Patient/Database/booked_slots.php`)
- Database helpers → Clinic database: connects to
- Dental resources → Resource providers: links to
