# jaabee95/medlinediagnostics architecture

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

- Interactive diagram: https://gitdiagram.com/jaabee95/medlinediagnostics
- Repository: https://github.com/jaabee95/medlinediagnostics

## Overview

This is a diagnostic-center public website with an administrative console. Visitors browse the center’s profile, services and tests, and reviews, then use phone or WhatsApp contact links; the review form accepts submissions for moderation. Staff manage site content and operational records through protected admin pages. The clearest sampled data paths use Supabase for profile reads and review submissions, with a separate Excel import helper in service administration. Several route modules are present in the tree but unsampled, so their internal behavior and connections are not asserted here.

Main entry points: [`src/components/site/SiteLayout.tsx`](https://github.com/jaabee95/medlinediagnostics/blob/main/src/components/site/SiteLayout.tsx) (Site layout), [`src/components/admin/AdminShell.tsx`](https://github.com/jaabee95/medlinediagnostics/blob/main/src/components/admin/AdminShell.tsx) (Admin shell), [`src/routes/index.tsx`](https://github.com/jaabee95/medlinediagnostics/blob/main/src/routes/index.tsx) (Home page), [`src/routes/services.tsx`](https://github.com/jaabee95/medlinediagnostics/blob/main/src/routes/services.tsx) (Service catalogue)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public experience"]
  node_home["Home page<br/>[index.tsx]"]
  node_services["Service catalogue<br/>[services.tsx]"]
  node_reviews["Review submission<br/>[reviews.tsx]"]
  node_otherpublic["About and contact"]
  node_sitelayout["Site layout<br/>[SiteLayout.tsx]"]
  node_sitechrome["Site header and footer"]
  node_carousel["Auto carousel<br/>[AutoCarousel.tsx]"]
  node_contactbar["Contact bar<br/>[ContactBar.tsx]"]
end

subgraph group_admin["Admin console"]
  node_adminshell["Admin shell<br/>[AdminShell.tsx]"]
  node_serviceadmin["Services administration<br/>[admin.services.tsx]"]
  node_otheradmin["Other admin pages"]
  node_adminusers["Admin user functions"]
  node_permissions["Access permissions<br/>[permissions.ts]"]
  node_excel["Excel import<br/>[tests-excel.ts]"]
end

subgraph group_data["Data services"]
  node_siteprofile["Site profile helpers<br/>[site.ts]"]
  node_upload["Public media upload<br/>[admin-helpers.ts]"]
  node_supabase[("Supabase")]
end

subgraph group_shared["Shared UI"]
  node_button["Button<br/>[button.tsx]"]
  node_input["Input<br/>[input.tsx]"]
  node_utils["Class utilities<br/>[utils.ts]"]
end

node_visitor(("Visitor"))
node_staff(("Staff user"))

node_visitor -.->|"opens"| node_home
node_visitor -.->|"browses"| node_services
node_visitor -.->|"submits"| node_reviews
node_home -->|"renders"| node_sitelayout
node_services -->|"renders"| node_sitelayout
node_reviews -->|"renders"| node_sitelayout
node_home -->|"renders"| node_carousel
node_services -->|"renders"| node_contactbar
node_sitelayout -->|"renders"| node_sitechrome
node_sitelayout -->|"renders"| node_contactbar
node_home -->|"uses links"| node_siteprofile
node_services -->|"uses links"| node_siteprofile
node_siteprofile -->|"reads profile"| node_supabase
node_reviews -->|"inserts review"| node_supabase
node_reviews -->|"uploads photo"| node_upload
node_staff -.->|"uses console"| node_adminshell
node_serviceadmin -->|"renders"| node_adminshell
node_adminshell -->|"uses auth"| node_supabase
node_adminshell -->|"checks access"| node_permissions
node_serviceadmin -->|"parses imports"| node_excel
node_otheradmin -.->|"uses shell"| node_adminshell
node_adminusers -.->|"admin operations"| node_supabase
node_button -->|"merges classes"| node_utils
node_input -->|"merges classes"| node_utils

click node_home "https://github.com/jaabee95/medlinediagnostics/blob/main/src/routes/index.tsx"
click node_services "https://github.com/jaabee95/medlinediagnostics/blob/main/src/routes/services.tsx"
click node_reviews "https://github.com/jaabee95/medlinediagnostics/blob/main/src/routes/reviews.tsx"
click node_otherpublic "https://github.com/jaabee95/medlinediagnostics/tree/main/src/routes"
click node_sitelayout "https://github.com/jaabee95/medlinediagnostics/blob/main/src/components/site/SiteLayout.tsx"
click node_sitechrome "https://github.com/jaabee95/medlinediagnostics/tree/main/src/components/site"
click node_carousel "https://github.com/jaabee95/medlinediagnostics/blob/main/src/components/site/AutoCarousel.tsx"
click node_contactbar "https://github.com/jaabee95/medlinediagnostics/blob/main/src/components/site/ContactBar.tsx"
click node_adminshell "https://github.com/jaabee95/medlinediagnostics/blob/main/src/components/admin/AdminShell.tsx"
click node_serviceadmin "https://github.com/jaabee95/medlinediagnostics/blob/main/src/routes/admin.services.tsx"
click node_otheradmin "https://github.com/jaabee95/medlinediagnostics/tree/main/src/routes"
click node_adminusers "https://github.com/jaabee95/medlinediagnostics/blob/main/src/lib/admin-users.functions.ts"
click node_permissions "https://github.com/jaabee95/medlinediagnostics/blob/main/src/lib/permissions.ts"
click node_excel "https://github.com/jaabee95/medlinediagnostics/blob/main/src/lib/tests-excel.ts"
click node_siteprofile "https://github.com/jaabee95/medlinediagnostics/blob/main/src/lib/site.ts"
click node_upload "https://github.com/jaabee95/medlinediagnostics/blob/main/src/lib/admin-helpers.ts"
click node_button "https://github.com/jaabee95/medlinediagnostics/blob/main/src/components/ui/button.tsx"
click node_input "https://github.com/jaabee95/medlinediagnostics/blob/main/src/components/ui/input.tsx"
click node_utils "https://github.com/jaabee95/medlinediagnostics/blob/main/src/lib/utils.ts"

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_services,node_reviews,node_otherpublic,node_sitelayout,node_sitechrome,node_carousel,node_contactbar,node_staff toneBlue
class node_adminshell,node_serviceadmin,node_otheradmin,node_adminusers,node_permissions,node_excel toneAmber
class node_siteprofile,node_upload,node_supabase toneMint
class node_button,node_input,node_utils toneRose
class node_visitor toneIndigo
```

## Components

### Public experience

- [Home page](https://github.com/jaabee95/medlinediagnostics/blob/main/src/routes/index.tsx): `src/routes/index.tsx`
- [Service catalogue](https://github.com/jaabee95/medlinediagnostics/blob/main/src/routes/services.tsx): `src/routes/services.tsx`
- [Review submission](https://github.com/jaabee95/medlinediagnostics/blob/main/src/routes/reviews.tsx): `src/routes/reviews.tsx`
- [About and contact](https://github.com/jaabee95/medlinediagnostics/tree/main/src/routes): `src/routes`
- [Site layout](https://github.com/jaabee95/medlinediagnostics/blob/main/src/components/site/SiteLayout.tsx): `src/components/site/SiteLayout.tsx`
- [Site header and footer](https://github.com/jaabee95/medlinediagnostics/tree/main/src/components/site): `src/components/site`
- [Auto carousel](https://github.com/jaabee95/medlinediagnostics/blob/main/src/components/site/AutoCarousel.tsx): `src/components/site/AutoCarousel.tsx`
- [Contact bar](https://github.com/jaabee95/medlinediagnostics/blob/main/src/components/site/ContactBar.tsx): `src/components/site/ContactBar.tsx`

### Admin console

- [Admin shell](https://github.com/jaabee95/medlinediagnostics/blob/main/src/components/admin/AdminShell.tsx): `src/components/admin/AdminShell.tsx`
- [Services administration](https://github.com/jaabee95/medlinediagnostics/blob/main/src/routes/admin.services.tsx): `src/routes/admin.services.tsx`
- [Other admin pages](https://github.com/jaabee95/medlinediagnostics/tree/main/src/routes): `src/routes`
- [Admin user functions](https://github.com/jaabee95/medlinediagnostics/blob/main/src/lib/admin-users.functions.ts): `src/lib/admin-users.functions.ts`
- [Access permissions](https://github.com/jaabee95/medlinediagnostics/blob/main/src/lib/permissions.ts): `src/lib/permissions.ts`
- [Excel import](https://github.com/jaabee95/medlinediagnostics/blob/main/src/lib/tests-excel.ts): `src/lib/tests-excel.ts`

### Data services

- [Site profile helpers](https://github.com/jaabee95/medlinediagnostics/blob/main/src/lib/site.ts): `src/lib/site.ts`
- [Public media upload](https://github.com/jaabee95/medlinediagnostics/blob/main/src/lib/admin-helpers.ts): `src/lib/admin-helpers.ts`
- **Supabase**

### Shared UI

- [Button](https://github.com/jaabee95/medlinediagnostics/blob/main/src/components/ui/button.tsx): `src/components/ui/button.tsx`
- [Input](https://github.com/jaabee95/medlinediagnostics/blob/main/src/components/ui/input.tsx): `src/components/ui/input.tsx`
- [Class utilities](https://github.com/jaabee95/medlinediagnostics/blob/main/src/lib/utils.ts): `src/lib/utils.ts`

### Other components

- **Visitor**
- **Staff user**

## Connections

- Visitor → Home page: opens
- Visitor → Service catalogue: browses
- Visitor → Review submission: submits
- Home page → Site layout: renders (evidence: `src/routes/index.tsx`)
- Service catalogue → Site layout: renders (evidence: `src/routes/services.tsx`)
- Review submission → Site layout: renders (evidence: `src/routes/reviews.tsx`)
- Home page → Auto carousel: renders (evidence: `src/routes/index.tsx`)
- Service catalogue → Contact bar: renders (evidence: `src/routes/services.tsx`)
- Site layout → Site header and footer: renders (evidence: `src/components/site/SiteLayout.tsx`)
- Site layout → Contact bar: renders (evidence: `src/components/site/SiteLayout.tsx`)
- Home page → Site profile helpers: uses links (evidence: `src/routes/index.tsx`)
- Service catalogue → Site profile helpers: uses links (evidence: `src/routes/services.tsx`)
- Site profile helpers → Supabase: reads profile (evidence: `src/lib/site.ts`)
- Review submission → Supabase: inserts review (evidence: `src/routes/reviews.tsx`)
- Review submission → Public media upload: uploads photo (evidence: `src/routes/reviews.tsx`)
- Staff user → Admin shell: uses console
- Services administration → Admin shell: renders (evidence: `src/routes/admin.services.tsx`)
- Admin shell → Supabase: uses auth (evidence: `src/components/admin/AdminShell.tsx`)
- Admin shell → Access permissions: checks access (evidence: `src/components/admin/AdminShell.tsx`)
- Services administration → Excel import: parses imports (evidence: `src/routes/admin.services.tsx`)
- Other admin pages → Admin shell: uses shell (evidence: `src/routes/admin.services.tsx`)
- Admin user functions → Supabase: admin operations
- Button → Class utilities: merges classes (evidence: `src/components/ui/button.tsx`)
- Input → Class utilities: merges classes (evidence: `src/components/ui/input.tsx`)
