# facundodlf/siac architecture

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

- Interactive diagram: https://gitdiagram.com/facundodlf/siac
- Repository: https://github.com/facundodlf/siac

## Overview

SIAC is a Spanish-language clinical-management web app. The evidenced patient workflow is: browse and search patients, open a patient profile, review consultation history, and compose a new consultation; the current save action emits data but does not persist it in the shown profile. Login uses Supabase authentication, while the patient pages use mock data. The tree also exposes dashboard, agenda, billing, and configuration areas, but their implementation and connections are not established by the sampled source. The graph reflects those evidence limits.

Main entry points: [`pages/login.vue`](https://github.com/facundodlf/siac/blob/main/pages/login.vue) (Sign in), [`pages/pacientes/index.vue`](https://github.com/facundodlf/siac/blob/main/pages/pacientes/index.vue) (Patient directory route), [`widgets/patients-directory/ui/PatientsDirectory.vue`](https://github.com/facundodlf/siac/blob/main/widgets/patients-directory/ui/PatientsDirectory.vue) (Patient search), [`pages/pacientes/[id].vue`](https://github.com/facundodlf/siac/blob/main/pages/pacientes/%5Bid%5D.vue) (Patient profile route)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["App shell and access"]
  node_login["Sign in<br/>[login.vue]"]
  node_app_shell["App navigation<br/>[default.vue]"]
  node_tenant_config["Tenant branding<br/>[tenant.ts]"]
end

subgraph group_clinical["Patient care"]
  node_patient_list_route["Patient directory route<br/>[index.vue]"]
  node_patient_directory["Patient search"]
  node_patient_detail_route["Patient profile route<br/>[&#91;id&#93;.vue]"]
  node_patient_profile["Patient history"]
  node_consultation_form["New consultation form"]
  node_rich_text["Clinical text editor<br/>[RichTextEditor.vue]"]
  node_table_ui["Table primitives<br/>[Table.vue]"]
end

subgraph group_dashboard["Dashboard"]
  node_home["Home route<br/>[index.vue]"]
  node_dashboard_overview["Dashboard overview"]
  node_dashboard_hero["Dashboard hero<br/>[DashboardHero.vue]"]
  node_agenda["Appointments<br/>[agenda.vue]"]
  node_billing["Billing<br/>[facturacion.vue]"]
  node_settings["Configuration<br/>[configuracion.vue]"]
end

subgraph group_domain["Domain and data"]
  node_mock_data["Sample clinical data<br/>[mock-data.ts]"]
  node_appointment_type["Appointment model<br/>[types.ts]"]
  node_consultation_type["Consultation model<br/>[types.ts]"]
  node_patient_type["Patient model<br/>[types.ts]"]
  node_tenant_type["Tenant model<br/>[types.ts]"]
  node_user_type["User model<br/>[types.ts]"]
  node_prisma_client["Prisma utility<br/>[prisma.ts]"]
end

node_clinician(("Clinical staff"))
node_auth_service{{"Supabase Auth"}}

node_clinician -->|"signs in"| node_login
node_login -->|"authenticates with"| node_auth_service
node_login -->|"reads branding"| node_tenant_config
node_app_shell -->|"reads branding"| node_tenant_config
node_clinician -.->|"opens directory"| node_patient_list_route
node_patient_list_route -->|"loads patients"| node_mock_data
node_patient_list_route -->|"passes patients"| node_patient_directory
node_patient_directory -->|"renders rows"| node_table_ui
node_patient_directory -->|"links to profile"| node_patient_detail_route
node_patient_detail_route -->|"loads records"| node_mock_data
node_patient_detail_route -->|"passes profile data"| node_patient_profile
node_patient_profile -->|"opens form"| node_consultation_form
node_consultation_form -->|"edits evolution"| node_rich_text
node_home -.->|"renders overview"| node_dashboard_overview
node_dashboard_overview -->|"renders hero"| node_dashboard_hero

click node_login "https://github.com/facundodlf/siac/blob/main/pages/login.vue"
click node_app_shell "https://github.com/facundodlf/siac/blob/main/layouts/default.vue"
click node_tenant_config "https://github.com/facundodlf/siac/blob/main/shared/config/tenant.ts"
click node_home "https://github.com/facundodlf/siac/blob/main/pages/index.vue"
click node_dashboard_overview "https://github.com/facundodlf/siac/blob/main/widgets/dashboard/ui/DashboardOverview.vue"
click node_dashboard_hero "https://github.com/facundodlf/siac/blob/main/widgets/dashboard/ui/DashboardHero.vue"
click node_agenda "https://github.com/facundodlf/siac/blob/main/pages/agenda.vue"
click node_billing "https://github.com/facundodlf/siac/blob/main/pages/facturacion.vue"
click node_settings "https://github.com/facundodlf/siac/blob/main/pages/configuracion.vue"
click node_patient_list_route "https://github.com/facundodlf/siac/blob/main/pages/pacientes/index.vue"
click node_patient_directory "https://github.com/facundodlf/siac/blob/main/widgets/patients-directory/ui/PatientsDirectory.vue"
click node_patient_detail_route "https://github.com/facundodlf/siac/blob/main/pages/pacientes/%5Bid%5D.vue"
click node_patient_profile "https://github.com/facundodlf/siac/blob/main/features/patient/ui/PatientProfileView.vue"
click node_consultation_form "https://github.com/facundodlf/siac/blob/main/features/consultation/ui/NewConsultationDialog.vue"
click node_rich_text "https://github.com/facundodlf/siac/blob/main/shared/ui/RichTextEditor.vue"
click node_table_ui "https://github.com/facundodlf/siac/blob/main/shared/ui/Table.vue"
click node_mock_data "https://github.com/facundodlf/siac/blob/main/shared/lib/mock-data.ts"
click node_appointment_type "https://github.com/facundodlf/siac/blob/main/entities/appointment/model/types.ts"
click node_consultation_type "https://github.com/facundodlf/siac/blob/main/entities/consultation/model/types.ts"
click node_patient_type "https://github.com/facundodlf/siac/blob/main/entities/patient/model/types.ts"
click node_tenant_type "https://github.com/facundodlf/siac/blob/main/entities/tenant/model/types.ts"
click node_user_type "https://github.com/facundodlf/siac/blob/main/entities/user/model/types.ts"
click node_prisma_client "https://github.com/facundodlf/siac/blob/main/server/utils/prisma.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_login,node_app_shell,node_tenant_config toneBlue
class node_patient_list_route,node_patient_directory,node_patient_detail_route,node_patient_profile,node_consultation_form,node_rich_text,node_table_ui toneAmber
class node_home,node_dashboard_overview,node_dashboard_hero,node_agenda,node_billing,node_settings toneMint
class node_mock_data,node_appointment_type,node_consultation_type,node_patient_type,node_tenant_type,node_user_type,node_prisma_client toneRose
class node_clinician,node_auth_service toneIndigo
```

## Components

### App shell and access

- [Sign in](https://github.com/facundodlf/siac/blob/main/pages/login.vue): `pages/login.vue`
- [App navigation](https://github.com/facundodlf/siac/blob/main/layouts/default.vue): `layouts/default.vue`
- [Tenant branding](https://github.com/facundodlf/siac/blob/main/shared/config/tenant.ts): `shared/config/tenant.ts`

### Patient care

- [Patient directory route](https://github.com/facundodlf/siac/blob/main/pages/pacientes/index.vue): `pages/pacientes/index.vue`
- [Patient search](https://github.com/facundodlf/siac/blob/main/widgets/patients-directory/ui/PatientsDirectory.vue): `widgets/patients-directory/ui/PatientsDirectory.vue`
- [Patient profile route](https://github.com/facundodlf/siac/blob/main/pages/pacientes/%5Bid%5D.vue): `pages/pacientes/[id].vue`
- [Patient history](https://github.com/facundodlf/siac/blob/main/features/patient/ui/PatientProfileView.vue): `features/patient/ui/PatientProfileView.vue`
- [New consultation form](https://github.com/facundodlf/siac/blob/main/features/consultation/ui/NewConsultationDialog.vue): `features/consultation/ui/NewConsultationDialog.vue`
- [Clinical text editor](https://github.com/facundodlf/siac/blob/main/shared/ui/RichTextEditor.vue): `shared/ui/RichTextEditor.vue`
- [Table primitives](https://github.com/facundodlf/siac/blob/main/shared/ui/Table.vue): `shared/ui/Table.vue`

### Dashboard

- [Home route](https://github.com/facundodlf/siac/blob/main/pages/index.vue): `pages/index.vue`
- [Dashboard overview](https://github.com/facundodlf/siac/blob/main/widgets/dashboard/ui/DashboardOverview.vue): `widgets/dashboard/ui/DashboardOverview.vue`
- [Dashboard hero](https://github.com/facundodlf/siac/blob/main/widgets/dashboard/ui/DashboardHero.vue): `widgets/dashboard/ui/DashboardHero.vue`
- [Appointments](https://github.com/facundodlf/siac/blob/main/pages/agenda.vue): `pages/agenda.vue`
- [Billing](https://github.com/facundodlf/siac/blob/main/pages/facturacion.vue): `pages/facturacion.vue`
- [Configuration](https://github.com/facundodlf/siac/blob/main/pages/configuracion.vue): `pages/configuracion.vue`

### Domain and data

- [Sample clinical data](https://github.com/facundodlf/siac/blob/main/shared/lib/mock-data.ts): `shared/lib/mock-data.ts`
- [Appointment model](https://github.com/facundodlf/siac/blob/main/entities/appointment/model/types.ts): `entities/appointment/model/types.ts`
- [Consultation model](https://github.com/facundodlf/siac/blob/main/entities/consultation/model/types.ts): `entities/consultation/model/types.ts`
- [Patient model](https://github.com/facundodlf/siac/blob/main/entities/patient/model/types.ts): `entities/patient/model/types.ts`
- [Tenant model](https://github.com/facundodlf/siac/blob/main/entities/tenant/model/types.ts): `entities/tenant/model/types.ts`
- [User model](https://github.com/facundodlf/siac/blob/main/entities/user/model/types.ts): `entities/user/model/types.ts`
- [Prisma utility](https://github.com/facundodlf/siac/blob/main/server/utils/prisma.ts): `server/utils/prisma.ts`

### Other components

- **Clinical staff**
- **Supabase Auth**

## Connections

- Clinical staff → Sign in: signs in (evidence: `pages/login.vue`)
- Sign in → Supabase Auth: authenticates with (evidence: `pages/login.vue`)
- Sign in → Tenant branding: reads branding (evidence: `pages/login.vue`)
- App navigation → Tenant branding: reads branding (evidence: `layouts/default.vue`)
- Clinical staff → Patient directory route: opens directory
- Patient directory route → Sample clinical data: loads patients (evidence: `pages/pacientes/index.vue`)
- Patient directory route → Patient search: passes patients (evidence: `pages/pacientes/index.vue`)
- Patient search → Table primitives: renders rows (evidence: `widgets/patients-directory/ui/PatientsDirectory.vue`)
- Patient search → Patient profile route: links to profile (evidence: `widgets/patients-directory/ui/PatientsDirectory.vue`)
- Patient profile route → Sample clinical data: loads records (evidence: `pages/pacientes/[id].vue`)
- Patient profile route → Patient history: passes profile data (evidence: `pages/pacientes/[id].vue`)
- Patient history → New consultation form: opens form (evidence: `features/patient/ui/PatientProfileView.vue`)
- New consultation form → Clinical text editor: edits evolution (evidence: `features/consultation/ui/NewConsultationDialog.vue`)
- Home route → Dashboard overview: renders overview
- Dashboard overview → Dashboard hero: renders hero (evidence: `widgets/dashboard/ui/DashboardOverview.vue`)
