# tanishktewetia/smile_connect architecture

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

- Interactive diagram: https://gitdiagram.com/tanishktewetia/smile_connect
- Repository: https://github.com/tanishktewetia/smile_connect

## Overview

SmileConnect is a dental-clinic website with informational pages and appointment booking. Visitors enter through the routed React app, browse clinic services and editorial content, and can submit a booking/contact form; the frontend posts appointments to an Express API, which validates and stores them in Supabase. The admin-only appointment retrieval route is a separate capability. The README documents the API-to-database behavior; source excerpts show the booking call chain. Some page and section wiring is supported by the SOURCE INDEX rather than sampled implementation.

Main entry points: [`src/App.js`](https://github.com/tanishktewetia/smile_connect/blob/main/src/App.js) (Route application), [`src/pages/Home.js`](https://github.com/tanishktewetia/smile_connect/blob/main/src/pages/Home.js) (Home page), [`src/pages/Services.js`](https://github.com/tanishktewetia/smile_connect/blob/main/src/pages/Services.js) (Services page), [`src/pages/Contact/Contactus.js`](https://github.com/tanishktewetia/smile_connect/blob/main/src/pages/Contact/Contactus.js) (Contact page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Website and pages"]
  node_app["Route application<br/>[App.js]"]
  node_home["Home page<br/>[Home.js]"]
  node_about["About page<br/>[About.js]"]
  node_servicespage["Services page<br/>[Services.js]"]
  node_contactpage["Contact page<br/>[Contactus.js]"]
  node_legal["Legal pages<br/>[PrivacyPolicy.js]"]
  node_footer["Site footer<br/>[Footer.js]"]
  node_navbar["Navigation<br/>[Navbar.js]"]
  node_whatsapp["WhatsApp contact<br/>[WhatsAppButton.js]"]
end

subgraph group_content["Clinic content"]
  node_bloglist["Blog listing<br/>[BlogsPage.js]"]
  node_blogdetail["Blog article<br/>[SingleBlog.js]"]
  node_blogdata["Blog content data<br/>[BlogData.js]"]
  node_clinicinfo["Clinic details<br/>[clinic.js]"]
  node_servicessection["Home services<br/>[Services.js]"]
  node_servicedata["Service data<br/>[ServiceData.js]"]
  node_servicedetails["Service details<br/>[ServiceDetails.js]"]
  node_faq["FAQs<br/>[Faq.js]"]
  node_gallery["Clinic gallery<br/>[Gallery.js]"]
  node_testimonials["Testimonials<br/>[Testimonial.js]"]
end

subgraph group_booking["Appointment booking"]
  node_contactform["Contact booking form<br/>[ContactForm.js]"]
  node_appointmentform["Home booking form<br/>[AppointmentForm.js]"]
  node_appointmentservice["Appointment API client"]
end

subgraph group_api["Booking API and storage"]
  node_express["Express server<br/>[server.js]"]
  node_routes["Appointment routes"]
  node_admin["Admin authorization<br/>[requireAdmin.js]"]
  node_handler["Appointment handler"]
  node_supabaseclient["Supabase client<br/>[supabaseClient.js]"]
  node_appointmentsdb[("Appointments table<br/>[Schema.sql]")]
end

node_visitor(("Patient or visitor"))
node_supabase[("Supabase Postgres")]

node_visitor -->|"opens site"| node_app
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_about
node_app -->|"routes to"| node_servicespage
node_app -->|"routes to"| node_contactpage
node_app -->|"routes to"| node_bloglist
node_app -->|"routes to"| node_blogdetail
node_app -->|"routes to"| node_legal
node_bloglist -->|"reads posts"| node_blogdata
node_blogdetail -->|"finds article"| node_blogdata
node_home -->|"renders"| node_servicessection
node_servicessection -->|"reads services"| node_servicedata
node_servicespage -->|"renders"| node_servicedetails
node_about -->|"renders"| node_faq
node_servicespage -->|"renders"| node_gallery
node_home -->|"renders"| node_testimonials
node_home -->|"renders"| node_navbar
node_contactpage -->|"renders"| node_contactform
node_contactpage -->|"renders"| node_footer
node_navbar -->|"reads details"| node_clinicinfo
node_footer -->|"reads details"| node_clinicinfo
node_app -->|"renders"| node_whatsapp
node_contactform -->|"submits form"| node_appointmentservice
node_appointmentform -->|"submits form"| node_appointmentservice
node_visitor -->|"enters booking"| node_contactform
node_visitor -->|"enters booking"| node_appointmentform
node_appointmentservice -->|"posts appointment"| node_express
node_express -->|"mounts routes"| node_routes
node_routes -->|"dispatches"| node_handler
node_routes -->|"protects retrieval"| node_admin
node_handler -->|"queries"| node_supabaseclient
node_supabaseclient -->|"connects"| node_supabase
node_handler -->|"reads and writes"| node_appointmentsdb

click node_app "https://github.com/tanishktewetia/smile_connect/blob/main/src/App.js"
click node_home "https://github.com/tanishktewetia/smile_connect/blob/main/src/pages/Home.js"
click node_about "https://github.com/tanishktewetia/smile_connect/blob/main/src/pages/About.js"
click node_servicespage "https://github.com/tanishktewetia/smile_connect/blob/main/src/pages/Services.js"
click node_contactpage "https://github.com/tanishktewetia/smile_connect/blob/main/src/pages/Contact/Contactus.js"
click node_bloglist "https://github.com/tanishktewetia/smile_connect/blob/main/src/pages/BlogsPage.js"
click node_blogdetail "https://github.com/tanishktewetia/smile_connect/blob/main/src/pages/SingleBlog/SingleBlog.js"
click node_blogdata "https://github.com/tanishktewetia/smile_connect/blob/main/src/sections/Blogs/BlogData.js"
click node_legal "https://github.com/tanishktewetia/smile_connect/blob/main/src/pages/PrivacyPolicy.js"
click node_clinicinfo "https://github.com/tanishktewetia/smile_connect/blob/main/src/config/clinic.js"
click node_servicessection "https://github.com/tanishktewetia/smile_connect/blob/main/src/sections/Services/Services.js"
click node_servicedata "https://github.com/tanishktewetia/smile_connect/blob/main/src/sections/Services/ServiceData.js"
click node_servicedetails "https://github.com/tanishktewetia/smile_connect/blob/main/src/sections/ServiceDetails/ServiceDetails.js"
click node_faq "https://github.com/tanishktewetia/smile_connect/blob/main/src/sections/Faq/Faq.js"
click node_gallery "https://github.com/tanishktewetia/smile_connect/blob/main/src/sections/Gallery/Gallery.js"
click node_testimonials "https://github.com/tanishktewetia/smile_connect/blob/main/src/sections/Testimonial/Testimonial.js"
click node_footer "https://github.com/tanishktewetia/smile_connect/blob/main/src/sections/Footer/Footer.js"
click node_navbar "https://github.com/tanishktewetia/smile_connect/blob/main/src/components/Navbar/Navbar.js"
click node_whatsapp "https://github.com/tanishktewetia/smile_connect/blob/main/src/components/WhatsAppButton/WhatsAppButton.js"
click node_contactform "https://github.com/tanishktewetia/smile_connect/blob/main/src/components/ContactForm/ContactForm.js"
click node_appointmentform "https://github.com/tanishktewetia/smile_connect/blob/main/src/sections/Banner/AppointmentForm.js"
click node_appointmentservice "https://github.com/tanishktewetia/smile_connect/blob/main/src/services/appointmentService.js"
click node_express "https://github.com/tanishktewetia/smile_connect/blob/main/backend/server.js"
click node_routes "https://github.com/tanishktewetia/smile_connect/blob/main/backend/src/routes/appointmentRoutes.js"
click node_admin "https://github.com/tanishktewetia/smile_connect/blob/main/backend/src/middleware/requireAdmin.js"
click node_handler "https://github.com/tanishktewetia/smile_connect/blob/main/backend/src/handlers/appointmentHandler.js"
click node_supabaseclient "https://github.com/tanishktewetia/smile_connect/blob/main/backend/src/utils/supabaseClient.js"
click node_appointmentsdb "https://github.com/tanishktewetia/smile_connect/blob/main/backend/sql/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_app,node_home,node_about,node_servicespage,node_contactpage,node_legal,node_footer,node_navbar,node_whatsapp toneBlue
class node_bloglist,node_blogdetail,node_blogdata,node_clinicinfo,node_servicessection,node_servicedata,node_servicedetails,node_faq,node_gallery,node_testimonials,node_supabase toneAmber
class node_contactform,node_appointmentform,node_appointmentservice toneMint
class node_express,node_routes,node_admin,node_handler,node_supabaseclient,node_appointmentsdb toneRose
class node_visitor toneIndigo
```

## Components

### Website and pages

- [Route application](https://github.com/tanishktewetia/smile_connect/blob/main/src/App.js): `src/App.js`
- [Home page](https://github.com/tanishktewetia/smile_connect/blob/main/src/pages/Home.js): `src/pages/Home.js`
- [About page](https://github.com/tanishktewetia/smile_connect/blob/main/src/pages/About.js): `src/pages/About.js`
- [Services page](https://github.com/tanishktewetia/smile_connect/blob/main/src/pages/Services.js): `src/pages/Services.js`
- [Contact page](https://github.com/tanishktewetia/smile_connect/blob/main/src/pages/Contact/Contactus.js): `src/pages/Contact/Contactus.js`
- [Legal pages](https://github.com/tanishktewetia/smile_connect/blob/main/src/pages/PrivacyPolicy.js): `src/pages/PrivacyPolicy.js`
- [Site footer](https://github.com/tanishktewetia/smile_connect/blob/main/src/sections/Footer/Footer.js): `src/sections/Footer/Footer.js`
- [Navigation](https://github.com/tanishktewetia/smile_connect/blob/main/src/components/Navbar/Navbar.js): `src/components/Navbar/Navbar.js`
- [WhatsApp contact](https://github.com/tanishktewetia/smile_connect/blob/main/src/components/WhatsAppButton/WhatsAppButton.js): `src/components/WhatsAppButton/WhatsAppButton.js`

### Clinic content

- [Blog listing](https://github.com/tanishktewetia/smile_connect/blob/main/src/pages/BlogsPage.js): `src/pages/BlogsPage.js`
- [Blog article](https://github.com/tanishktewetia/smile_connect/blob/main/src/pages/SingleBlog/SingleBlog.js): `src/pages/SingleBlog/SingleBlog.js`
- [Blog content data](https://github.com/tanishktewetia/smile_connect/blob/main/src/sections/Blogs/BlogData.js): `src/sections/Blogs/BlogData.js`
- [Clinic details](https://github.com/tanishktewetia/smile_connect/blob/main/src/config/clinic.js): `src/config/clinic.js`
- [Home services](https://github.com/tanishktewetia/smile_connect/blob/main/src/sections/Services/Services.js): `src/sections/Services/Services.js`
- [Service data](https://github.com/tanishktewetia/smile_connect/blob/main/src/sections/Services/ServiceData.js): `src/sections/Services/ServiceData.js`
- [Service details](https://github.com/tanishktewetia/smile_connect/blob/main/src/sections/ServiceDetails/ServiceDetails.js): `src/sections/ServiceDetails/ServiceDetails.js`
- [FAQs](https://github.com/tanishktewetia/smile_connect/blob/main/src/sections/Faq/Faq.js): `src/sections/Faq/Faq.js`
- [Clinic gallery](https://github.com/tanishktewetia/smile_connect/blob/main/src/sections/Gallery/Gallery.js): `src/sections/Gallery/Gallery.js`
- [Testimonials](https://github.com/tanishktewetia/smile_connect/blob/main/src/sections/Testimonial/Testimonial.js): `src/sections/Testimonial/Testimonial.js`

### Appointment booking

- [Contact booking form](https://github.com/tanishktewetia/smile_connect/blob/main/src/components/ContactForm/ContactForm.js): `src/components/ContactForm/ContactForm.js`
- [Home booking form](https://github.com/tanishktewetia/smile_connect/blob/main/src/sections/Banner/AppointmentForm.js): `src/sections/Banner/AppointmentForm.js`
- [Appointment API client](https://github.com/tanishktewetia/smile_connect/blob/main/src/services/appointmentService.js): `src/services/appointmentService.js`

### Booking API and storage

- [Express server](https://github.com/tanishktewetia/smile_connect/blob/main/backend/server.js): `backend/server.js`
- [Appointment routes](https://github.com/tanishktewetia/smile_connect/blob/main/backend/src/routes/appointmentRoutes.js): `backend/src/routes/appointmentRoutes.js`
- [Admin authorization](https://github.com/tanishktewetia/smile_connect/blob/main/backend/src/middleware/requireAdmin.js): `backend/src/middleware/requireAdmin.js`
- [Appointment handler](https://github.com/tanishktewetia/smile_connect/blob/main/backend/src/handlers/appointmentHandler.js): `backend/src/handlers/appointmentHandler.js`
- [Supabase client](https://github.com/tanishktewetia/smile_connect/blob/main/backend/src/utils/supabaseClient.js): `backend/src/utils/supabaseClient.js`
- [Appointments table](https://github.com/tanishktewetia/smile_connect/blob/main/backend/sql/Schema.sql): `backend/sql/Schema.sql`

### Other components

- **Patient or visitor**
- **Supabase Postgres**

## Connections

- Patient or visitor → Route application: opens site (evidence: `src/App.js`)
- Route application → Home page: routes to (evidence: `src/App.js`)
- Route application → About page: routes to (evidence: `src/App.js`)
- Route application → Services page: routes to (evidence: `src/App.js`)
- Route application → Contact page: routes to (evidence: `src/App.js`)
- Route application → Blog listing: routes to (evidence: `src/App.js`)
- Route application → Blog article: routes to (evidence: `src/App.js`)
- Route application → Legal pages: routes to (evidence: `src/App.js`)
- Blog listing → Blog content data: reads posts (evidence: `src/pages/BlogsPage.js`)
- Blog article → Blog content data: finds article (evidence: `src/pages/SingleBlog/SingleBlog.js`)
- Home page → Home services: renders (evidence: `src/pages/Home.js`)
- Home services → Service data: reads services (evidence: `src/sections/Services/Services.js`)
- Services page → Service details: renders (evidence: `src/pages/Services.js`)
- About page → FAQs: renders (evidence: `src/pages/About.js`)
- Services page → Clinic gallery: renders (evidence: `src/pages/Services.js`)
- Home page → Testimonials: renders (evidence: `src/pages/Home.js`)
- Home page → Navigation: renders (evidence: `src/pages/Home.js`)
- Contact page → Contact booking form: renders (evidence: `src/pages/Contact/Contactus.js`)
- Contact page → Site footer: renders (evidence: `src/pages/Contact/Contactus.js`)
- Navigation → Clinic details: reads details (evidence: `src/components/Navbar/Navbar.js`)
- Site footer → Clinic details: reads details (evidence: `src/sections/Footer/Footer.js`)
- Route application → WhatsApp contact: renders (evidence: `src/App.js`)
- Contact booking form → Appointment API client: submits form (evidence: `src/components/ContactForm/ContactForm.js`)
- Home booking form → Appointment API client: submits form (evidence: `src/sections/Banner/AppointmentForm.js`)
- Patient or visitor → Contact booking form: enters booking (evidence: `README.md`)
- Patient or visitor → Home booking form: enters booking (evidence: `README.md`)
- Appointment API client → Express server: posts appointment (evidence: `README.md`)
- Express server → Appointment routes: mounts routes (evidence: `backend/server.js`)
- Appointment routes → Appointment handler: dispatches (evidence: `backend/src/routes/appointmentRoutes.js`)
- Appointment routes → Admin authorization: protects retrieval (evidence: `backend/src/routes/appointmentRoutes.js`)
- Appointment handler → Supabase client: queries (evidence: `backend/src/handlers/appointmentHandler.js`)
- Supabase client → Supabase Postgres: connects (evidence: `README.md`)
- Appointment handler → Appointments table: reads and writes (evidence: `README.md`)
