# joshua-id/med-lab-survey-management architecture

> Architecture diagram of the GitHub repository joshua-id/med-lab-survey-management, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-07-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/joshua-id/med-lab-survey-management
- Repository: https://github.com/joshua-id/med-lab-survey-management

## Overview

#### Purpose and Runtime

This is a Vue 3 single-page application built and bundled by Vite. It appears to combine a marketing landing experience with authenticated operational views for doctors, patients, staff, and administrators. Deployment is configured for Vercel.

Core runtime paths: `src/main.js`, `src/App.vue`, `vite.config.js`, `vercel.json`.

#### Application Bootstrap and Shell

`src/main.js` initializes Vue and mounts the application. `src/App.vue` is the top-level shell, likely hosting route rendering and globally persistent UI. Shared navigation, drawer, theme, consent, and logout UI are separated into reusable shell components.

Paths: `src/main.js`, `src/App.vue`, `src/components/HeaderNavigator.vue`, `src/components/AppDrawer.vue`, `src/components/CookiesBanner.vue`.

#### Routing and Page Boundaries

Client-side route definitions centralize navigation in `src/router/index.js`. Views are the primary feature boundaries: public landing/authentication pages, domain-facing clinical/control pages, and administration pages. Unmatched navigation is handled by a dedicated not-found view.

Paths: `src/router/index.js`, `src/views/HeroLanding.vue`, `src/views/AuthLogin.vue`, `src/views/NotFoundPage.vue`.

#### Identity and Firebase Boundary

Firebase is initialized behind `src/firebase.js`, using Vite-provided environment variables for project credentials. Authentication-oriented views and logout UI are the likely consumers of this boundary; Firebase may also provide data or storage services, but the tree does not establish that usage conclusively.

Paths: `src/firebase.js`, `src/views/AuthLogin.vue`, `src/views/Register.vue`, `src/components/LogoutButton.vue`.

#### Operational Domain Areas

The protected/product workflow is partitioned into role- or task-oriented screens. Dashboard provides the general entry point; doctor and patient-control screens represent clinical operations; staff and admin monitoring/users screens represent management operations.

Paths: `src/views/Dashboard.vue`, `src/views/DoctorsView.vue`, `src/views/PatientControl.vue`, `src/views/AdminUsers.vue`, `src/views/MonitoringAdmin.vue`, `src/views/StaffUsers.vue`.

#### Data Access and External APIs

`src/utils/fetchDataStore.js` is the explicit application data-access abstraction. It likely mediates calls to externally configured dummy/random API URLs, keeping API interaction out of views. API endpoint bases are supplied through `VITE_API_URL_DUMMY` and `VITE_API_URL_RANDOM`; Firebase configuration is separately environment-driven.

Paths: `src/utils/fetchDataStore.js`, `src/firebase.js`, `package.json`.

#### Public Marketing Composition

The landing experience is assembled from route-level content sections rather than a separate application. Marketing, pricing, testimonials, and footer are represented as views, with reusable feature cards supporting presentation composition.

Paths: `src/views/HeroLanding.vue`, `src/views/ProductMarketingSection.vue`, `src/views/PricingSection.vue`, `src/views/TestimonialSection.vue`, `src/views/FooterSection.vue`, `src/components/FeatureCard.vue`.

#### Shared Presentation and Static Delivery

Global styling is centralized in `src/style.css`; application assets reside under `src/assets`. Vercel serves the Vite build, while `public/robots.txt` and `public/sitemap.xml` support public-site crawlability.

Paths: `src/style.css`, `src/assets`, `public/robots.txt`, `public/sitemap.xml`, `vercel.json`.

Main entry points: [`src/router/index.js`](https://github.com/joshua-id/med-lab-survey-management/blob/master/src/router/index.js) (Client router), [`src/App.vue`](https://github.com/joshua-id/med-lab-survey-management/blob/master/src/App.vue) (Application shell), [`src/views/HeroLanding.vue`](https://github.com/joshua-id/med-lab-survey-management/blob/master/src/views/HeroLanding.vue) (Public landing & auth), [`src/utils/fetchDataStore.js`](https://github.com/joshua-id/med-lab-survey-management/blob/master/src/utils/fetchDataStore.js) (Data access store)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Vue Runtime"]
  node_bootstrap(("Vue bootstrap<br/>entry point<br/>[main.js]"))
  node_app["Application shell<br/>root component<br/>[App.vue]"]
  node_shell_ui["Persistent shell UI<br/>shared components"]
  node_styles_assets["Global styles &amp; assets<br/>presentation resources<br/>[style.css]"]
end

subgraph group_experience["Routes &amp; Experiences"]
  node_router{{"Client router<br/>route definitions<br/>[index.js]"}}
  node_public_routes["Public landing &amp; auth<br/>route views<br/>[HeroLanding.vue]"]
  node_marketing_sections["Marketing sections<br/>presentation views"]
  node_feature_card["Feature cards<br/>shared component<br/>[FeatureCard.vue]"]
  node_dashboard["Dashboard<br/>protected view<br/>[Dashboard.vue]"]
  node_clinical_views["Clinical operations<br/>protected views<br/>[DoctorsView.vue]"]
  node_management_views["Management operations<br/>protected views<br/>[AdminUsers.vue]"]
end

subgraph group_services["Service Boundaries"]
  node_firebase[("Firebase boundary<br/>identity service<br/>[firebase.js]")]
  node_auth["Authentication flows<br/>auth views<br/>[AuthLogin.vue]"]
  node_data_store[("Data access store<br/>API abstraction<br/>[fetchDataStore.js]")]
end

subgraph group_delivery["Build &amp; Delivery"]
  node_vite{{"Vite build<br/>build config<br/>[vite.config.js]"}}
  node_vercel{{"Vercel deployment<br/>hosting<br/>[vercel.json]"}}
  node_crawl_files["Crawl metadata<br/>public files<br/>[robots.txt]"]
end

node_vite -->|"bundles"| node_bootstrap
node_vite -->|"build deployed by"| node_vercel
node_vercel -->|"serves"| node_crawl_files
node_bootstrap -->|"mounts"| node_app
node_app -->|"renders routes"| node_router
node_app -->|"hosts"| node_shell_ui
node_app -->|"uses"| node_styles_assets
node_router -->|"maps"| node_public_routes
node_router -->|"maps"| node_dashboard
node_router -->|"maps"| node_clinical_views
node_router -->|"maps"| node_management_views
node_public_routes -->|"composes"| node_marketing_sections
node_marketing_sections -->|"uses"| node_feature_card
node_public_routes -->|"includes"| node_auth
node_auth -->|"authenticates with"| node_firebase
node_shell_ui -->|"logs out through"| node_firebase
node_dashboard -.->|"loads data"| node_data_store
node_clinical_views -.->|"loads data"| node_data_store
node_management_views -.->|"loads data"| node_data_store

click node_vite "https://github.com/joshua-id/med-lab-survey-management/blob/master/vite.config.js"
click node_vercel "https://github.com/joshua-id/med-lab-survey-management/blob/master/vercel.json"
click node_bootstrap "https://github.com/joshua-id/med-lab-survey-management/blob/master/src/main.js"
click node_app "https://github.com/joshua-id/med-lab-survey-management/blob/master/src/App.vue"
click node_shell_ui "https://github.com/joshua-id/med-lab-survey-management/blob/master/src/components/HeaderNavigator.vue"
click node_router "https://github.com/joshua-id/med-lab-survey-management/blob/master/src/router/index.js"
click node_public_routes "https://github.com/joshua-id/med-lab-survey-management/blob/master/src/views/HeroLanding.vue"
click node_marketing_sections "https://github.com/joshua-id/med-lab-survey-management/blob/master/src/views/ProductMarketingSection.vue"
click node_feature_card "https://github.com/joshua-id/med-lab-survey-management/blob/master/src/components/FeatureCard.vue"
click node_dashboard "https://github.com/joshua-id/med-lab-survey-management/blob/master/src/views/Dashboard.vue"
click node_clinical_views "https://github.com/joshua-id/med-lab-survey-management/blob/master/src/views/DoctorsView.vue"
click node_management_views "https://github.com/joshua-id/med-lab-survey-management/blob/master/src/views/AdminUsers.vue"
click node_firebase "https://github.com/joshua-id/med-lab-survey-management/blob/master/src/firebase.js"
click node_auth "https://github.com/joshua-id/med-lab-survey-management/blob/master/src/views/AuthLogin.vue"
click node_data_store "https://github.com/joshua-id/med-lab-survey-management/blob/master/src/utils/fetchDataStore.js"
click node_styles_assets "https://github.com/joshua-id/med-lab-survey-management/blob/master/src/style.css"
click node_crawl_files "https://github.com/joshua-id/med-lab-survey-management/blob/master/public/robots.txt"

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_bootstrap,node_app,node_shell_ui,node_styles_assets toneBlue
class node_router,node_public_routes,node_marketing_sections,node_feature_card,node_dashboard,node_clinical_views,node_management_views toneAmber
class node_firebase,node_auth,node_data_store toneMint
class node_vite,node_vercel,node_crawl_files toneRose
```

## Components

### Vue Runtime

- [Vue bootstrap](https://github.com/joshua-id/med-lab-survey-management/blob/master/src/main.js): entry point · `src/main.js`
- [Application shell](https://github.com/joshua-id/med-lab-survey-management/blob/master/src/App.vue): root component · `src/App.vue`
- [Persistent shell UI](https://github.com/joshua-id/med-lab-survey-management/blob/master/src/components/HeaderNavigator.vue): shared components · Navigation, drawer, consent, and logout controls. · `src/components/HeaderNavigator.vue`
- [Global styles & assets](https://github.com/joshua-id/med-lab-survey-management/blob/master/src/style.css): presentation resources · `src/style.css`

### Routes & Experiences

- [Client router](https://github.com/joshua-id/med-lab-survey-management/blob/master/src/router/index.js): route definitions · `src/router/index.js`
- [Public landing & auth](https://github.com/joshua-id/med-lab-survey-management/blob/master/src/views/HeroLanding.vue): route views · Landing, login, registration, and not-found screens. · `src/views/HeroLanding.vue`
- [Marketing sections](https://github.com/joshua-id/med-lab-survey-management/blob/master/src/views/ProductMarketingSection.vue): presentation views · Product, pricing, testimonials, and footer composition. · `src/views/ProductMarketingSection.vue`
- [Feature cards](https://github.com/joshua-id/med-lab-survey-management/blob/master/src/components/FeatureCard.vue): shared component · `src/components/FeatureCard.vue`
- [Dashboard](https://github.com/joshua-id/med-lab-survey-management/blob/master/src/views/Dashboard.vue): protected view · `src/views/Dashboard.vue`
- [Clinical operations](https://github.com/joshua-id/med-lab-survey-management/blob/master/src/views/DoctorsView.vue): protected views · Doctor and patient-control workflows. · `src/views/DoctorsView.vue`
- [Management operations](https://github.com/joshua-id/med-lab-survey-management/blob/master/src/views/AdminUsers.vue): protected views · Admin, monitoring, and staff-user screens. · `src/views/AdminUsers.vue`

### Service Boundaries

- [Firebase boundary](https://github.com/joshua-id/med-lab-survey-management/blob/master/src/firebase.js): identity service · Initialized with Vite environment credentials. · `src/firebase.js`
- [Authentication flows](https://github.com/joshua-id/med-lab-survey-management/blob/master/src/views/AuthLogin.vue): auth views · Login and registration consume the identity boundary. · `src/views/AuthLogin.vue`
- [Data access store](https://github.com/joshua-id/med-lab-survey-management/blob/master/src/utils/fetchDataStore.js): API abstraction · Mediates configured dummy and random API calls. · `src/utils/fetchDataStore.js`

### Build & Delivery

- [Vite build](https://github.com/joshua-id/med-lab-survey-management/blob/master/vite.config.js): build config · `vite.config.js`
- [Vercel deployment](https://github.com/joshua-id/med-lab-survey-management/blob/master/vercel.json): hosting · `vercel.json`
- [Crawl metadata](https://github.com/joshua-id/med-lab-survey-management/blob/master/public/robots.txt): public files · Robots and sitemap support public-site indexing. · `public/robots.txt`

## Connections

- Vite build → Vue bootstrap: bundles
- Vite build → Vercel deployment: build deployed by
- Vercel deployment → Crawl metadata: serves
- Vue bootstrap → Application shell: mounts
- Application shell → Client router: renders routes
- Application shell → Persistent shell UI: hosts
- Application shell → Global styles & assets: uses
- Client router → Public landing & auth: maps
- Client router → Dashboard: maps
- Client router → Clinical operations: maps
- Client router → Management operations: maps
- Public landing & auth → Marketing sections: composes
- Marketing sections → Feature cards: uses
- Public landing & auth → Authentication flows: includes
- Authentication flows → Firebase boundary: authenticates with
- Persistent shell UI → Firebase boundary: logs out through
- Dashboard → Data access store: loads data
- Clinical operations → Data access store: loads data
- Management operations → Data access store: loads data
