# jvgprogramming/dots_daily-v2 architecture

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

- Interactive diagram: https://gitdiagram.com/jvgprogramming/dots_daily-v2
- Repository: https://github.com/jvgprogramming/dots_daily-v2

## Overview

This is a tuberculosis-care management product with a Laravel API, a Next.js web portal, and a Flutter mobile app (the mobile tree shown contains platform runners, not the app’s Dart feature code). The main documented-in-source workflow is staff patient registration: the API delegates registration to a transactional service that creates patient and related TB records, then returns a patient resource. Treatment tracking and adherence/reporting form another substantial domain branch. Web pages indicate broader dashboard, medication, monitoring, AI, notification, search, and settings capabilities; their API wiring cannot be confirmed from the excerpts. No README content was provided.

Main entry points: [`web/components/layout/dashboard-shell.tsx`](https://github.com/jvgprogramming/dots_daily-v2/blob/main/web/components/layout/dashboard-shell.tsx) (Portal shell), [`backend/app/Http/Controllers/API/TreatmentsController.php`](https://github.com/jvgprogramming/dots_daily-v2/blob/main/backend/app/Http/Controllers/API/TreatmentsController.php) (Treatment API), [`backend/app/Http/Controllers/API/ReportsController.php`](https://github.com/jvgprogramming/dots_daily-v2/blob/main/backend/app/Http/Controllers/API/ReportsController.php) (Reports API), [`backend/app/Http/Controllers/API/PatientController.php`](https://github.com/jvgprogramming/dots_daily-v2/blob/main/backend/app/Http/Controllers/API/PatientController.php) (Patient API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web portal"]
  node_webshell["Portal shell"]
  node_patientsui["Patient management<br/>[page.tsx]"]
  node_regwizard["Registration wizard"]
  node_dashboardui["Dashboard<br/>[page.tsx]"]
  node_medui["Medications<br/>[page.tsx]"]
  node_monitorui["Monitoring<br/>[page.tsx]"]
  node_treatmentui["Treatments<br/>[page.tsx]"]
  node_reportsui["Reports<br/>[page.tsx]"]
  node_aiui["AI assistance<br/>[page.tsx]"]
  node_notifyui["Notifications<br/>[page.tsx]"]
  node_searchui["Global search<br/>[global-search.tsx]"]
  node_settingsui["Settings<br/>[page.tsx]"]
end

subgraph group_api["API and identity"]
  node_auth["Authentication API<br/>[AuthController.php]"]
  node_baseapi["API response base"]
  node_user[("User account<br/>[User.php]")]
end

subgraph group_care["Patient and TB care"]
  node_patientctl["Patient API"]
  node_registration["Registration service"]
  node_patient[("Patient record<br/>[Patient.php]")]
  node_patientresource["Patient response"]
  node_aistore[("AI records")]
end

subgraph group_treatment["Treatment and insights"]
  node_treatmentctl["Treatment API"]
  node_plan[("Treatment plan<br/>[TreatmentPlan.php]")]
  node_medlog[("Medication logs<br/>[MedicationLog.php]")]
  node_adherence["Adherence calculations<br/>[Adherence.php]"]
  node_reschedule["Follow-up schedule<br/>[FollowUps.php]"]
  node_reportsctl["Reports API"]
  node_monitorctl["Monitoring API"]
  node_medctl["Medication inventory API"]
end

node_staff(("Care staff"))

node_staff -.->|"uses portal"| node_webshell
node_patientsui -.->|"opens wizard"| node_regwizard
node_regwizard -.->|"submits registration"| node_patientctl
node_webshell -.->|"presents"| node_dashboardui
node_webshell -.->|"presents"| node_patientsui
node_webshell -.->|"presents"| node_medui
node_webshell -.->|"presents"| node_monitorui
node_webshell -.->|"presents"| node_treatmentui
node_webshell -.->|"presents"| node_reportsui
node_webshell -.->|"presents"| node_aiui
node_webshell -.->|"presents"| node_notifyui
node_webshell -.->|"presents"| node_searchui
node_webshell -.->|"presents"| node_settingsui
node_auth -->|"creates and authenticates"| node_user
node_patientctl -->|"delegates registration"| node_registration
node_registration -->|"creates and updates"| node_patient
node_registration -->|"creates account"| node_user
node_patientctl -->|"serializes patient"| node_patientresource
node_patient -->|"belongs to"| node_user
node_patient -->|"has treatment plans"| node_plan
node_treatmentctl -->|"reads and updates"| node_plan
node_treatmentctl -->|"aggregates dose logs"| node_medlog
node_treatmentctl -->|"calculates adherence"| node_adherence
node_treatmentctl -.->|"derives follow-ups"| node_reschedule
node_reportsctl -->|"uses adherence"| node_adherence
node_reportsctl -->|"reads plans"| node_plan
node_reportsctl -->|"reads dose logs"| node_medlog
node_monitorui -.->|"requests monitoring"| node_monitorctl
node_medui -.->|"requests inventory"| node_medctl
node_aiui -.->|"uses AI records"| node_aistore

click node_webshell "https://github.com/jvgprogramming/dots_daily-v2/blob/main/web/components/layout/dashboard-shell.tsx"
click node_patientsui "https://github.com/jvgprogramming/dots_daily-v2/blob/main/web/app/(dashboard)/patients/page.tsx"
click node_regwizard "https://github.com/jvgprogramming/dots_daily-v2/blob/main/web/components/features/patients/PatientRegistrationWizard.tsx"
click node_dashboardui "https://github.com/jvgprogramming/dots_daily-v2/blob/main/web/app/(dashboard)/dashboard/page.tsx"
click node_medui "https://github.com/jvgprogramming/dots_daily-v2/blob/main/web/app/(dashboard)/medications/page.tsx"
click node_monitorui "https://github.com/jvgprogramming/dots_daily-v2/blob/main/web/app/(dashboard)/monitoring/page.tsx"
click node_treatmentui "https://github.com/jvgprogramming/dots_daily-v2/blob/main/web/app/(dashboard)/treatments/page.tsx"
click node_reportsui "https://github.com/jvgprogramming/dots_daily-v2/blob/main/web/app/(dashboard)/reports/page.tsx"
click node_aiui "https://github.com/jvgprogramming/dots_daily-v2/blob/main/web/app/(dashboard)/ai/page.tsx"
click node_notifyui "https://github.com/jvgprogramming/dots_daily-v2/blob/main/web/app/(dashboard)/notifications/page.tsx"
click node_searchui "https://github.com/jvgprogramming/dots_daily-v2/blob/main/web/components/layout/global-search.tsx"
click node_settingsui "https://github.com/jvgprogramming/dots_daily-v2/blob/main/web/app/(dashboard)/settings/page.tsx"
click node_auth "https://github.com/jvgprogramming/dots_daily-v2/blob/main/backend/app/Http/Controllers/API/Auth/AuthController.php"
click node_baseapi "https://github.com/jvgprogramming/dots_daily-v2/blob/main/backend/app/Http/Controllers/API/BaseApiController.php"
click node_patientctl "https://github.com/jvgprogramming/dots_daily-v2/blob/main/backend/app/Http/Controllers/API/PatientController.php"
click node_registration "https://github.com/jvgprogramming/dots_daily-v2/blob/main/backend/app/Services/PatientRegistrationService.php"
click node_patient "https://github.com/jvgprogramming/dots_daily-v2/blob/main/backend/app/Models/Patient.php"
click node_patientresource "https://github.com/jvgprogramming/dots_daily-v2/blob/main/backend/app/Http/Resources/PatientResource.php"
click node_user "https://github.com/jvgprogramming/dots_daily-v2/blob/main/backend/app/Models/User.php"
click node_treatmentctl "https://github.com/jvgprogramming/dots_daily-v2/blob/main/backend/app/Http/Controllers/API/TreatmentsController.php"
click node_plan "https://github.com/jvgprogramming/dots_daily-v2/blob/main/backend/app/Models/TreatmentPlan.php"
click node_medlog "https://github.com/jvgprogramming/dots_daily-v2/blob/main/backend/app/Models/MedicationLog.php"
click node_adherence "https://github.com/jvgprogramming/dots_daily-v2/blob/main/backend/app/Support/Adherence.php"
click node_reschedule "https://github.com/jvgprogramming/dots_daily-v2/blob/main/backend/app/Support/FollowUps.php"
click node_reportsctl "https://github.com/jvgprogramming/dots_daily-v2/blob/main/backend/app/Http/Controllers/API/ReportsController.php"
click node_monitorctl "https://github.com/jvgprogramming/dots_daily-v2/blob/main/backend/app/Http/Controllers/API/MonitoringController.php"
click node_medctl "https://github.com/jvgprogramming/dots_daily-v2/blob/main/backend/app/Http/Controllers/API/MedicationInventoryController.php"
click node_aistore "https://github.com/jvgprogramming/dots_daily-v2/blob/main/backend/app/Models/AiRecommendation.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_webshell,node_patientsui,node_regwizard,node_dashboardui,node_medui,node_monitorui,node_treatmentui,node_reportsui,node_aiui,node_notifyui,node_searchui,node_settingsui toneBlue
class node_auth,node_baseapi,node_user toneAmber
class node_patientctl,node_registration,node_patient,node_patientresource,node_aistore toneMint
class node_treatmentctl,node_plan,node_medlog,node_adherence,node_reschedule,node_reportsctl,node_monitorctl,node_medctl toneRose
class node_staff toneIndigo
```

## Components

### Web portal

- [Portal shell](https://github.com/jvgprogramming/dots_daily-v2/blob/main/web/components/layout/dashboard-shell.tsx): `web/components/layout/dashboard-shell.tsx`
- [Patient management](https://github.com/jvgprogramming/dots_daily-v2/blob/main/web/app/(dashboard)/patients/page.tsx): `web/app/(dashboard)/patients/page.tsx`
- [Registration wizard](https://github.com/jvgprogramming/dots_daily-v2/blob/main/web/components/features/patients/PatientRegistrationWizard.tsx): `web/components/features/patients/PatientRegistrationWizard.tsx`
- [Dashboard](https://github.com/jvgprogramming/dots_daily-v2/blob/main/web/app/(dashboard)/dashboard/page.tsx): `web/app/(dashboard)/dashboard/page.tsx`
- [Medications](https://github.com/jvgprogramming/dots_daily-v2/blob/main/web/app/(dashboard)/medications/page.tsx): `web/app/(dashboard)/medications/page.tsx`
- [Monitoring](https://github.com/jvgprogramming/dots_daily-v2/blob/main/web/app/(dashboard)/monitoring/page.tsx): `web/app/(dashboard)/monitoring/page.tsx`
- [Treatments](https://github.com/jvgprogramming/dots_daily-v2/blob/main/web/app/(dashboard)/treatments/page.tsx): `web/app/(dashboard)/treatments/page.tsx`
- [Reports](https://github.com/jvgprogramming/dots_daily-v2/blob/main/web/app/(dashboard)/reports/page.tsx): `web/app/(dashboard)/reports/page.tsx`
- [AI assistance](https://github.com/jvgprogramming/dots_daily-v2/blob/main/web/app/(dashboard)/ai/page.tsx): `web/app/(dashboard)/ai/page.tsx`
- [Notifications](https://github.com/jvgprogramming/dots_daily-v2/blob/main/web/app/(dashboard)/notifications/page.tsx): `web/app/(dashboard)/notifications/page.tsx`
- [Global search](https://github.com/jvgprogramming/dots_daily-v2/blob/main/web/components/layout/global-search.tsx): `web/components/layout/global-search.tsx`
- [Settings](https://github.com/jvgprogramming/dots_daily-v2/blob/main/web/app/(dashboard)/settings/page.tsx): `web/app/(dashboard)/settings/page.tsx`

### API and identity

- [Authentication API](https://github.com/jvgprogramming/dots_daily-v2/blob/main/backend/app/Http/Controllers/API/Auth/AuthController.php): `backend/app/Http/Controllers/API/Auth/AuthController.php`
- [API response base](https://github.com/jvgprogramming/dots_daily-v2/blob/main/backend/app/Http/Controllers/API/BaseApiController.php): `backend/app/Http/Controllers/API/BaseApiController.php`
- [User account](https://github.com/jvgprogramming/dots_daily-v2/blob/main/backend/app/Models/User.php): `backend/app/Models/User.php`

### Patient and TB care

- [Patient API](https://github.com/jvgprogramming/dots_daily-v2/blob/main/backend/app/Http/Controllers/API/PatientController.php): `backend/app/Http/Controllers/API/PatientController.php`
- [Registration service](https://github.com/jvgprogramming/dots_daily-v2/blob/main/backend/app/Services/PatientRegistrationService.php): `backend/app/Services/PatientRegistrationService.php`
- [Patient record](https://github.com/jvgprogramming/dots_daily-v2/blob/main/backend/app/Models/Patient.php): `backend/app/Models/Patient.php`
- [Patient response](https://github.com/jvgprogramming/dots_daily-v2/blob/main/backend/app/Http/Resources/PatientResource.php): `backend/app/Http/Resources/PatientResource.php`
- [AI records](https://github.com/jvgprogramming/dots_daily-v2/blob/main/backend/app/Models/AiRecommendation.php): `backend/app/Models/AiRecommendation.php`

### Treatment and insights

- [Treatment API](https://github.com/jvgprogramming/dots_daily-v2/blob/main/backend/app/Http/Controllers/API/TreatmentsController.php): `backend/app/Http/Controllers/API/TreatmentsController.php`
- [Treatment plan](https://github.com/jvgprogramming/dots_daily-v2/blob/main/backend/app/Models/TreatmentPlan.php): `backend/app/Models/TreatmentPlan.php`
- [Medication logs](https://github.com/jvgprogramming/dots_daily-v2/blob/main/backend/app/Models/MedicationLog.php): `backend/app/Models/MedicationLog.php`
- [Adherence calculations](https://github.com/jvgprogramming/dots_daily-v2/blob/main/backend/app/Support/Adherence.php): `backend/app/Support/Adherence.php`
- [Follow-up schedule](https://github.com/jvgprogramming/dots_daily-v2/blob/main/backend/app/Support/FollowUps.php): `backend/app/Support/FollowUps.php`
- [Reports API](https://github.com/jvgprogramming/dots_daily-v2/blob/main/backend/app/Http/Controllers/API/ReportsController.php): `backend/app/Http/Controllers/API/ReportsController.php`
- [Monitoring API](https://github.com/jvgprogramming/dots_daily-v2/blob/main/backend/app/Http/Controllers/API/MonitoringController.php): `backend/app/Http/Controllers/API/MonitoringController.php`
- [Medication inventory API](https://github.com/jvgprogramming/dots_daily-v2/blob/main/backend/app/Http/Controllers/API/MedicationInventoryController.php): `backend/app/Http/Controllers/API/MedicationInventoryController.php`

### Other components

- **Care staff**

## Connections

- Care staff → Portal shell: uses portal
- Patient management → Registration wizard: opens wizard
- Registration wizard → Patient API: submits registration
- Portal shell → Dashboard: presents
- Portal shell → Patient management: presents
- Portal shell → Medications: presents
- Portal shell → Monitoring: presents
- Portal shell → Treatments: presents
- Portal shell → Reports: presents
- Portal shell → AI assistance: presents
- Portal shell → Notifications: presents
- Portal shell → Global search: presents
- Portal shell → Settings: presents
- Authentication API → User account: creates and authenticates (evidence: `backend/app/Http/Controllers/API/Auth/AuthController.php`)
- Patient API → Registration service: delegates registration (evidence: `backend/app/Http/Controllers/API/PatientController.php`)
- Registration service → Patient record: creates and updates (evidence: `backend/app/Services/PatientRegistrationService.php`)
- Registration service → User account: creates account (evidence: `backend/app/Services/PatientRegistrationService.php`)
- Patient API → Patient response: serializes patient (evidence: `backend/app/Http/Controllers/API/PatientController.php`)
- Patient record → User account: belongs to (evidence: `backend/app/Models/Patient.php`)
- Patient record → Treatment plan: has treatment plans (evidence: `backend/app/Models/Patient.php`)
- Treatment API → Treatment plan: reads and updates (evidence: `backend/app/Http/Controllers/API/TreatmentsController.php`)
- Treatment API → Medication logs: aggregates dose logs (evidence: `backend/app/Http/Controllers/API/TreatmentsController.php`)
- Treatment API → Adherence calculations: calculates adherence (evidence: `backend/app/Http/Controllers/API/TreatmentsController.php`)
- Treatment API → Follow-up schedule: derives follow-ups (evidence: `backend/app/Http/Controllers/API/TreatmentsController.php`)
- Reports API → Adherence calculations: uses adherence (evidence: `backend/app/Http/Controllers/API/ReportsController.php`)
- Reports API → Treatment plan: reads plans (evidence: `backend/app/Http/Controllers/API/ReportsController.php`)
- Reports API → Medication logs: reads dose logs (evidence: `backend/app/Http/Controllers/API/ReportsController.php`)
- Monitoring → Monitoring API: requests monitoring
- Medications → Medication inventory API: requests inventory
- AI assistance → AI records: uses AI records
