# aswinhan/medisync architecture

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

- Interactive diagram: https://gitdiagram.com/aswinhan/medisync
- Repository: https://github.com/aswinhan/medisync

## Overview

MediSync combines a practitioner credentialing workspace with a modular .NET backend. The visible UI gathers practitioner, education, license, work-history, attestation, PSV, and verification data; its current submit handler only logs the payload and displays an alert. Separately, the backend practitioner handler builds a Salesforce composite request, records a submission, dispatches it, and records success or failure. Backend module implementations and UI-to-API wiring were not sampled, so those connections are not inferred.

Main entry points: [`ui/src/features/practitioner/Workspace.tsx`](https://github.com/aswinhan/medisync/blob/master/ui/src/features/practitioner/Workspace.tsx) (Practitioner workspace), [`src/Modules/Practitioner/Modules.Practitioner.Features/Applications/SubmitPractitioner/SubmitPractitionerHandler.cs`](https://github.com/aswinhan/medisync/blob/master/src/Modules/Practitioner/Modules.Practitioner.Features/Applications/SubmitPractitioner/SubmitPractitionerHandler.cs) (Submission handler), [`ui/src/components/practitioner`](https://github.com/aswinhan/medisync/tree/master/ui/src/components/practitioner) (Practitioner sections), [`ui/src/App.tsx`](https://github.com/aswinhan/medisync/blob/master/ui/src/App.tsx) (Application shell)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Practitioner workspace"]
  node_app["Application shell<br/>[App.tsx]"]
  node_workspace["Practitioner workspace<br/>[Workspace.tsx]"]
  node_form["Form state"]
  node_schema["Form validation<br/>[schema.ts]"]
  node_formsections["Practitioner sections"]
  node_psvsections["PSV and verification"]
  node_formcontrols["Form controls<br/>[FormControls.tsx]"]
  node_options["Credentialing options<br/>[options.ts]"]
  node_layout["Workspace navigation"]
  node_theme["Theme provider<br/>[ThemeProvider.tsx]"]
end

subgraph group_backend["Practitioner submission"]
  node_submit["Submission handler"]
  node_command["Submission command"]
  node_salesforceapi["Salesforce module API"]
  node_submissionapi["Submissions module API"]
end

subgraph group_shared["Shared platform"]
  node_validation["Validation behavior"]
  node_result["Result and errors<br/>[Results]"]
  node_apierrors["API error handling"]
  node_apiresults["Endpoint result mapping"]
  node_auditing["Auditing interceptor"]
  node_datetime["Date-time provider"]
end

subgraph group_modules["Domain modules"]
  node_documents["Documents module"]
  node_organization["Organization module"]
  node_practitionerdomain["Practitioner domain<br/>[Entities]"]
  node_salesforcemodule["Salesforce integration module"]
  node_submissionsmodule["Submissions module"]
  node_host["Application host<br/>[Program.cs]"]
end

node_user(("Practitioner"))
node_salesforce["Salesforce service"]
node_submissionstore[("Submission store")]

node_user -->|"uses"| node_app
node_app -->|"wraps"| node_theme
node_app -->|"renders"| node_workspace
node_workspace -->|"initializes"| node_form
node_form -->|"validates with"| node_schema
node_workspace -->|"renders"| node_formsections
node_workspace -->|"renders"| node_psvsections
node_workspace -->|"renders"| node_layout
node_formsections -->|"uses"| node_formcontrols
node_formsections -->|"reads options"| node_options
node_formsections -->|"uses fields"| node_schema
node_submit -->|"builds request"| node_salesforceapi
node_submit -->|"records submission"| node_submissionapi
node_submit -->|"executes request"| node_salesforceapi
node_salesforceapi -.->|"dispatches to"| node_salesforce
node_submissionapi -.->|"persists to"| node_submissionstore
node_submit -->|"handles"| node_command
node_validation -->|"returns failures"| node_result
node_apiresults -->|"maps results"| node_result
node_apierrors -->|"uses errors"| node_result
node_auditing -->|"reads time"| node_datetime
node_auditing -.->|"audits entities"| node_practitionerdomain

click node_app "https://github.com/aswinhan/medisync/blob/master/ui/src/App.tsx"
click node_workspace "https://github.com/aswinhan/medisync/blob/master/ui/src/features/practitioner/Workspace.tsx"
click node_form "https://github.com/aswinhan/medisync/blob/master/ui/src/features/practitioner/usePractitionerForm.ts"
click node_schema "https://github.com/aswinhan/medisync/blob/master/ui/src/features/practitioner/schema.ts"
click node_formsections "https://github.com/aswinhan/medisync/tree/master/ui/src/components/practitioner"
click node_psvsections "https://github.com/aswinhan/medisync/tree/master/ui/src/components/practitioner"
click node_formcontrols "https://github.com/aswinhan/medisync/blob/master/ui/src/components/ui/FormControls.tsx"
click node_options "https://github.com/aswinhan/medisync/blob/master/ui/src/constants/options.ts"
click node_layout "https://github.com/aswinhan/medisync/tree/master/ui/src/components/layout"
click node_theme "https://github.com/aswinhan/medisync/blob/master/ui/src/components/theme/ThemeProvider.tsx"
click node_submit "https://github.com/aswinhan/medisync/blob/master/src/Modules/Practitioner/Modules.Practitioner.Features/Applications/SubmitPractitioner/SubmitPractitionerHandler.cs"
click node_command "https://github.com/aswinhan/medisync/blob/master/src/Modules/Practitioner/Modules.Practitioner.Features/Applications/SubmitPractitioner/SubmitPractitionerCommand.cs"
click node_salesforceapi "https://github.com/aswinhan/medisync/blob/master/src/Modules/Practitioner/Modules.Practitioner.Features/Applications/SubmitPractitioner/SubmitPractitionerHandler.cs"
click node_submissionapi "https://github.com/aswinhan/medisync/blob/master/src/Modules/Practitioner/Modules.Practitioner.Features/Applications/SubmitPractitioner/SubmitPractitionerHandler.cs"
click node_validation "https://github.com/aswinhan/medisync/blob/master/src/Common/Modules.Common.Application/Behaviors/ValidationBehavior.cs"
click node_result "https://github.com/aswinhan/medisync/tree/master/src/Common/Modules.Common.Domain/Results"
click node_apierrors "https://github.com/aswinhan/medisync/blob/master/src/Common/Modules.Common.API/ErrorHandling/GlobalExceptionHandler.cs"
click node_apiresults "https://github.com/aswinhan/medisync/blob/master/src/Common/Modules.Common.API/Extensions/EndpointResultsExtensions.cs"
click node_auditing "https://github.com/aswinhan/medisync/blob/master/src/Common/Modules.Common.Infrastructure/Database/AuditableInterceptor.cs"
click node_datetime "https://github.com/aswinhan/medisync/blob/master/src/Common/Modules.Common.Infrastructure/Time/DateTimeProvider.cs"
click node_documents "https://github.com/aswinhan/medisync/tree/master/src/Modules/Documents"
click node_organization "https://github.com/aswinhan/medisync/tree/master/src/Modules/Organization"
click node_practitionerdomain "https://github.com/aswinhan/medisync/tree/master/src/Modules/Practitioner/Modules.Practitioner.Domain/Entities"
click node_salesforcemodule "https://github.com/aswinhan/medisync/tree/master/src/Modules/SalesforceIntegration"
click node_submissionsmodule "https://github.com/aswinhan/medisync/tree/master/src/Modules/Submissions"
click node_host "https://github.com/aswinhan/medisync/blob/master/src/MediSync.Host/Program.cs"

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_workspace,node_form,node_schema,node_formsections,node_psvsections,node_formcontrols,node_options,node_layout,node_theme toneBlue
class node_submit,node_command,node_salesforceapi,node_submissionapi,node_submissionstore toneAmber
class node_validation,node_result,node_apierrors,node_apiresults,node_auditing,node_datetime toneMint
class node_documents,node_organization,node_practitionerdomain,node_salesforcemodule,node_submissionsmodule,node_host toneRose
class node_user,node_salesforce toneIndigo
```

## Components

### Practitioner workspace

- [Application shell](https://github.com/aswinhan/medisync/blob/master/ui/src/App.tsx): `ui/src/App.tsx`
- [Practitioner workspace](https://github.com/aswinhan/medisync/blob/master/ui/src/features/practitioner/Workspace.tsx): `ui/src/features/practitioner/Workspace.tsx`
- [Form state](https://github.com/aswinhan/medisync/blob/master/ui/src/features/practitioner/usePractitionerForm.ts): `ui/src/features/practitioner/usePractitionerForm.ts`
- [Form validation](https://github.com/aswinhan/medisync/blob/master/ui/src/features/practitioner/schema.ts): `ui/src/features/practitioner/schema.ts`
- [Practitioner sections](https://github.com/aswinhan/medisync/tree/master/ui/src/components/practitioner): `ui/src/components/practitioner`
- [PSV and verification](https://github.com/aswinhan/medisync/tree/master/ui/src/components/practitioner): `ui/src/components/practitioner`
- [Form controls](https://github.com/aswinhan/medisync/blob/master/ui/src/components/ui/FormControls.tsx): `ui/src/components/ui/FormControls.tsx`
- [Credentialing options](https://github.com/aswinhan/medisync/blob/master/ui/src/constants/options.ts): `ui/src/constants/options.ts`
- [Workspace navigation](https://github.com/aswinhan/medisync/tree/master/ui/src/components/layout): `ui/src/components/layout`
- [Theme provider](https://github.com/aswinhan/medisync/blob/master/ui/src/components/theme/ThemeProvider.tsx): `ui/src/components/theme/ThemeProvider.tsx`

### Practitioner submission

- [Submission handler](https://github.com/aswinhan/medisync/blob/master/src/Modules/Practitioner/Modules.Practitioner.Features/Applications/SubmitPractitioner/SubmitPractitionerHandler.cs): `src/Modules/Practitioner/Modules.Practitioner.Features/Applications/SubmitPractitioner/SubmitPractitionerHandler.cs`
- [Submission command](https://github.com/aswinhan/medisync/blob/master/src/Modules/Practitioner/Modules.Practitioner.Features/Applications/SubmitPractitioner/SubmitPractitionerCommand.cs): `src/Modules/Practitioner/Modules.Practitioner.Features/Applications/SubmitPractitioner/SubmitPractitionerCommand.cs`
- [Salesforce module API](https://github.com/aswinhan/medisync/blob/master/src/Modules/Practitioner/Modules.Practitioner.Features/Applications/SubmitPractitioner/SubmitPractitionerHandler.cs): `src/Modules/Practitioner/Modules.Practitioner.Features/Applications/SubmitPractitioner/SubmitPractitionerHandler.cs`
- [Submissions module API](https://github.com/aswinhan/medisync/blob/master/src/Modules/Practitioner/Modules.Practitioner.Features/Applications/SubmitPractitioner/SubmitPractitionerHandler.cs): `src/Modules/Practitioner/Modules.Practitioner.Features/Applications/SubmitPractitioner/SubmitPractitionerHandler.cs`

### Shared platform

- [Validation behavior](https://github.com/aswinhan/medisync/blob/master/src/Common/Modules.Common.Application/Behaviors/ValidationBehavior.cs): `src/Common/Modules.Common.Application/Behaviors/ValidationBehavior.cs`
- [Result and errors](https://github.com/aswinhan/medisync/tree/master/src/Common/Modules.Common.Domain/Results): `src/Common/Modules.Common.Domain/Results`
- [API error handling](https://github.com/aswinhan/medisync/blob/master/src/Common/Modules.Common.API/ErrorHandling/GlobalExceptionHandler.cs): `src/Common/Modules.Common.API/ErrorHandling/GlobalExceptionHandler.cs`
- [Endpoint result mapping](https://github.com/aswinhan/medisync/blob/master/src/Common/Modules.Common.API/Extensions/EndpointResultsExtensions.cs): `src/Common/Modules.Common.API/Extensions/EndpointResultsExtensions.cs`
- [Auditing interceptor](https://github.com/aswinhan/medisync/blob/master/src/Common/Modules.Common.Infrastructure/Database/AuditableInterceptor.cs): `src/Common/Modules.Common.Infrastructure/Database/AuditableInterceptor.cs`
- [Date-time provider](https://github.com/aswinhan/medisync/blob/master/src/Common/Modules.Common.Infrastructure/Time/DateTimeProvider.cs): `src/Common/Modules.Common.Infrastructure/Time/DateTimeProvider.cs`

### Domain modules

- [Documents module](https://github.com/aswinhan/medisync/tree/master/src/Modules/Documents): `src/Modules/Documents`
- [Organization module](https://github.com/aswinhan/medisync/tree/master/src/Modules/Organization): `src/Modules/Organization`
- [Practitioner domain](https://github.com/aswinhan/medisync/tree/master/src/Modules/Practitioner/Modules.Practitioner.Domain/Entities): `src/Modules/Practitioner/Modules.Practitioner.Domain/Entities`
- [Salesforce integration module](https://github.com/aswinhan/medisync/tree/master/src/Modules/SalesforceIntegration): `src/Modules/SalesforceIntegration`
- [Submissions module](https://github.com/aswinhan/medisync/tree/master/src/Modules/Submissions): `src/Modules/Submissions`
- [Application host](https://github.com/aswinhan/medisync/blob/master/src/MediSync.Host/Program.cs): `src/MediSync.Host/Program.cs`

### Other components

- **Practitioner**
- **Salesforce service**
- **Submission store**

## Connections

- Practitioner → Application shell: uses
- Application shell → Theme provider: wraps (evidence: `ui/src/App.tsx`)
- Application shell → Practitioner workspace: renders (evidence: `ui/src/App.tsx`)
- Practitioner workspace → Form state: initializes (evidence: `ui/src/features/practitioner/Workspace.tsx`)
- Form state → Form validation: validates with (evidence: `ui/src/features/practitioner/usePractitionerForm.ts`)
- Practitioner workspace → Practitioner sections: renders (evidence: `ui/src/features/practitioner/Workspace.tsx`)
- Practitioner workspace → PSV and verification: renders (evidence: `ui/src/features/practitioner/Workspace.tsx`)
- Practitioner workspace → Workspace navigation: renders (evidence: `ui/src/features/practitioner/Workspace.tsx`)
- Practitioner sections → Form controls: uses (evidence: `ui/src/components/practitioner/PractitionerAttestationsSection.tsx`)
- Practitioner sections → Credentialing options: reads options (evidence: `ui/src/components/practitioner/PractitionerAttestationsSection.tsx`)
- Practitioner sections → Form validation: uses fields (evidence: `ui/src/components/practitioner/PractitionerAttestationsSection.tsx`)
- Submission handler → Salesforce module API: builds request (evidence: `src/Modules/Practitioner/Modules.Practitioner.Features/Applications/SubmitPractitioner/SubmitPractitionerHandler.cs`)
- Submission handler → Submissions module API: records submission (evidence: `src/Modules/Practitioner/Modules.Practitioner.Features/Applications/SubmitPractitioner/SubmitPractitionerHandler.cs`)
- Submission handler → Salesforce module API: executes request (evidence: `src/Modules/Practitioner/Modules.Practitioner.Features/Applications/SubmitPractitioner/SubmitPractitionerHandler.cs`)
- Salesforce module API → Salesforce service: dispatches to
- Submissions module API → Submission store: persists to
- Submission handler → Submission command: handles (evidence: `src/Modules/Practitioner/Modules.Practitioner.Features/Applications/SubmitPractitioner/SubmitPractitionerHandler.cs`)
- Validation behavior → Result and errors: returns failures (evidence: `src/Common/Modules.Common.Application/Behaviors/ValidationBehavior.cs`)
- Endpoint result mapping → Result and errors: maps results (evidence: `src/Common/Modules.Common.API/Extensions/EndpointResultsExtensions.cs`)
- API error handling → Result and errors: uses errors (evidence: `src/Common/Modules.Common.API/ErrorHandling/GlobalExceptionHandler.cs`)
- Auditing interceptor → Date-time provider: reads time (evidence: `src/Common/Modules.Common.Infrastructure/Database/AuditableInterceptor.cs`)
- Auditing interceptor → Practitioner domain: audits entities
