# hemachandran-d45/pacca-vision architecture

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

- Interactive diagram: https://gitdiagram.com/hemachandran-d45/pacca-vision
- Repository: https://github.com/hemachandran-d45/pacca-vision

## Overview

PACCA Vision is an operations UI for document-processing solutions. The primary live workflow uploads a document directly to Azure Blob Storage, where an event-driven external Senderra pipeline processes it; the UI polls for results and supports human review, while this app persists review actions in Cosmos DB. The graph also preserves documented model controls, analytics, observability, solution management, and fixture-driven operations screens. Most screen-to-handler wiring is not excerpted, so those links are shown only where the README documents them.

Main entry points: [`server/senderra/api.ts`](https://github.com/hemachandran-d45/pacca-vision/blob/main/server/senderra/api.ts) (Senderra API), [`client/src/pages`](https://github.com/hemachandran-d45/pacca-vision/tree/main/client/src/pages) (Live work screens), [`server/senderra/cosmos.ts`](https://github.com/hemachandran-d45/pacca-vision/blob/main/server/senderra/cosmos.ts) (Document and review data), [`server/senderra/kqlEngine.ts`](https://github.com/hemachandran-d45/pacca-vision/blob/main/server/senderra/kqlEngine.ts) (Pipeline query engine)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspace["Operations workspace"]
  node_clientapp["Client shell<br/>[App.tsx]"]
  node_livepages["Live work screens"]
  node_opsviews["Operations screens"]
  node_modelui["Model controls<br/>[ModelSettings.tsx]"]
  node_solutionui["Solution workspace<br/>[SolutionsV2.tsx]"]
end

subgraph group_live["Live document operations"]
  node_senderraapi["Senderra API<br/>[api.ts]"]
  node_upload["Blob upload access<br/>[blob.ts]"]
  node_blobstore[("Azure intake storage")]
  node_pipeline{{"Senderra IDP pipeline"}}
  node_cosmos[("Document and review data<br/>[cosmos.ts]")]
  node_analytics["Analytics aggregates<br/>[analytics.ts]"]
  node_gaps["Pipeline gap detection<br/>[pipelineGaps.ts]"]
  node_kql["Pipeline query engine<br/>[kqlEngine.ts]"]
end

subgraph group_services["Server services"]
  node_auth["Identity and roles<br/>[auth.ts]"]
  node_users[("User accounts<br/>[users.ts]")]
  node_config["Service configuration<br/>[config.ts]"]
  node_models["Model settings service<br/>[models.ts]"]
  node_observability["Observability services"]
  node_ivr["IVR integration<br/>[ivr.ts]"]
end

subgraph group_platform["Solution platform"]
  node_solutionsapi["Solution catalog API<br/>[solutionsV2Api.ts]"]
  node_fileshare[("Azure solution assets<br/>[azureFileShare.ts]")]
  node_solutionauthoring["Solution generation API<br/>[solutionsApi.ts]"]
  node_chatcompletion["Prompt completion<br/>[chatCompletions.ts]"]
end

node_operator(("Workspace user"))

node_operator -->|"uses"| node_clientapp
node_clientapp -.->|"presents"| node_livepages
node_clientapp -.->|"presents"| node_opsviews
node_operator -->|"uploads and reviews"| node_livepages
node_livepages -->|"requests documents"| node_senderraapi
node_senderraapi -->|"mints upload SAS"| node_upload
node_livepages -->|"uploads directly"| node_blobstore
node_blobstore -->|"triggers processing"| node_pipeline
node_pipeline -->|"writes OCR artifacts"| node_blobstore
node_pipeline -->|"writes results"| node_cosmos
node_senderraapi -->|"reads documents and writes reviews"| node_cosmos
node_senderraapi -->|"computes analytics"| node_analytics
node_senderraapi -->|"handles model controls"| node_models
node_livepages -->|"configures models"| node_modelui
node_modelui -->|"requests model changes"| node_senderraapi
node_senderraapi -->|"checks session and roles"| node_auth
node_senderraapi -->|"authenticates accounts"| node_users
node_senderraapi -->|"reads settings"| node_config
node_kql -->|"queries records"| node_cosmos
node_kql -->|"detects gaps"| node_gaps
node_kql -->|"lists uploads"| node_blobstore
node_gaps -->|"reads pipeline records"| node_cosmos
node_gaps -->|"compares uploads"| node_blobstore
node_operator -->|"switches models"| node_modelui
node_operator -->|"manages solutions"| node_solutionui
node_solutionui -.->|"manages catalog"| node_solutionsapi
node_solutionsapi -->|"publishes assets"| node_fileshare
node_operator -.->|"creates solutions"| node_solutionauthoring
node_solutionauthoring -->|"requests completion"| node_chatcompletion
node_operator -.->|"uses observability"| node_observability
node_operator -.->|"uses IVR outreach"| node_ivr

click node_clientapp "https://github.com/hemachandran-d45/pacca-vision/blob/main/client/src/App.tsx"
click node_livepages "https://github.com/hemachandran-d45/pacca-vision/tree/main/client/src/pages"
click node_opsviews "https://github.com/hemachandran-d45/pacca-vision/tree/main/client/src/pages"
click node_modelui "https://github.com/hemachandran-d45/pacca-vision/blob/main/client/src/senderra/ModelSettings.tsx"
click node_solutionui "https://github.com/hemachandran-d45/pacca-vision/blob/main/client/src/senderra/SolutionsV2.tsx"
click node_senderraapi "https://github.com/hemachandran-d45/pacca-vision/blob/main/server/senderra/api.ts"
click node_upload "https://github.com/hemachandran-d45/pacca-vision/blob/main/server/senderra/blob.ts"
click node_cosmos "https://github.com/hemachandran-d45/pacca-vision/blob/main/server/senderra/cosmos.ts"
click node_analytics "https://github.com/hemachandran-d45/pacca-vision/blob/main/server/senderra/analytics.ts"
click node_gaps "https://github.com/hemachandran-d45/pacca-vision/blob/main/server/senderra/pipelineGaps.ts"
click node_kql "https://github.com/hemachandran-d45/pacca-vision/blob/main/server/senderra/kqlEngine.ts"
click node_auth "https://github.com/hemachandran-d45/pacca-vision/blob/main/server/auth.ts"
click node_users "https://github.com/hemachandran-d45/pacca-vision/blob/main/server/senderra/users.ts"
click node_config "https://github.com/hemachandran-d45/pacca-vision/blob/main/server/senderra/config.ts"
click node_models "https://github.com/hemachandran-d45/pacca-vision/blob/main/server/senderra/models.ts"
click node_observability "https://github.com/hemachandran-d45/pacca-vision/blob/main/server/senderra/observabilityChat.ts"
click node_ivr "https://github.com/hemachandran-d45/pacca-vision/blob/main/server/senderra/ivr.ts"
click node_solutionsapi "https://github.com/hemachandran-d45/pacca-vision/blob/main/server/solutionsV2Api.ts"
click node_fileshare "https://github.com/hemachandran-d45/pacca-vision/blob/main/server/azureFileShare.ts"
click node_solutionauthoring "https://github.com/hemachandran-d45/pacca-vision/blob/main/server/solutionsApi.ts"
click node_chatcompletion "https://github.com/hemachandran-d45/pacca-vision/blob/main/server/chatCompletions.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_clientapp,node_livepages,node_opsviews,node_modelui,node_solutionui,node_operator toneBlue
class node_senderraapi,node_upload,node_blobstore,node_pipeline,node_cosmos,node_analytics,node_gaps,node_kql toneAmber
class node_auth,node_users,node_config,node_models,node_observability,node_ivr toneMint
class node_solutionsapi,node_fileshare,node_solutionauthoring,node_chatcompletion toneRose
```

## Components

### Operations workspace

- [Client shell](https://github.com/hemachandran-d45/pacca-vision/blob/main/client/src/App.tsx): `client/src/App.tsx`
- [Live work screens](https://github.com/hemachandran-d45/pacca-vision/tree/main/client/src/pages): `client/src/pages`
- [Operations screens](https://github.com/hemachandran-d45/pacca-vision/tree/main/client/src/pages): `client/src/pages`
- [Model controls](https://github.com/hemachandran-d45/pacca-vision/blob/main/client/src/senderra/ModelSettings.tsx): `client/src/senderra/ModelSettings.tsx`
- [Solution workspace](https://github.com/hemachandran-d45/pacca-vision/blob/main/client/src/senderra/SolutionsV2.tsx): `client/src/senderra/SolutionsV2.tsx`

### Live document operations

- [Senderra API](https://github.com/hemachandran-d45/pacca-vision/blob/main/server/senderra/api.ts): `server/senderra/api.ts`
- [Blob upload access](https://github.com/hemachandran-d45/pacca-vision/blob/main/server/senderra/blob.ts): `server/senderra/blob.ts`
- **Azure intake storage**
- **Senderra IDP pipeline**
- [Document and review data](https://github.com/hemachandran-d45/pacca-vision/blob/main/server/senderra/cosmos.ts): `server/senderra/cosmos.ts`
- [Analytics aggregates](https://github.com/hemachandran-d45/pacca-vision/blob/main/server/senderra/analytics.ts): `server/senderra/analytics.ts`
- [Pipeline gap detection](https://github.com/hemachandran-d45/pacca-vision/blob/main/server/senderra/pipelineGaps.ts): `server/senderra/pipelineGaps.ts`
- [Pipeline query engine](https://github.com/hemachandran-d45/pacca-vision/blob/main/server/senderra/kqlEngine.ts): `server/senderra/kqlEngine.ts`

### Server services

- [Identity and roles](https://github.com/hemachandran-d45/pacca-vision/blob/main/server/auth.ts): `server/auth.ts`
- [User accounts](https://github.com/hemachandran-d45/pacca-vision/blob/main/server/senderra/users.ts): `server/senderra/users.ts`
- [Service configuration](https://github.com/hemachandran-d45/pacca-vision/blob/main/server/senderra/config.ts): `server/senderra/config.ts`
- [Model settings service](https://github.com/hemachandran-d45/pacca-vision/blob/main/server/senderra/models.ts): `server/senderra/models.ts`
- [Observability services](https://github.com/hemachandran-d45/pacca-vision/blob/main/server/senderra/observabilityChat.ts): `server/senderra/observabilityChat.ts`
- [IVR integration](https://github.com/hemachandran-d45/pacca-vision/blob/main/server/senderra/ivr.ts): `server/senderra/ivr.ts`

### Solution platform

- [Solution catalog API](https://github.com/hemachandran-d45/pacca-vision/blob/main/server/solutionsV2Api.ts): `server/solutionsV2Api.ts`
- [Azure solution assets](https://github.com/hemachandran-d45/pacca-vision/blob/main/server/azureFileShare.ts): `server/azureFileShare.ts`
- [Solution generation API](https://github.com/hemachandran-d45/pacca-vision/blob/main/server/solutionsApi.ts): `server/solutionsApi.ts`
- [Prompt completion](https://github.com/hemachandran-d45/pacca-vision/blob/main/server/chatCompletions.ts): `server/chatCompletions.ts`

### Other components

- **Workspace user**

## Connections

- Workspace user → Client shell: uses (evidence: `client/src/App.tsx`)
- Client shell → Live work screens: presents (evidence: `client/src/App.tsx`)
- Client shell → Operations screens: presents (evidence: `client/src/App.tsx`)
- Workspace user → Live work screens: uploads and reviews
- Live work screens → Senderra API: requests documents
- Senderra API → Blob upload access: mints upload SAS (evidence: `server/senderra/api.ts`)
- Live work screens → Azure intake storage: uploads directly
- Azure intake storage → Senderra IDP pipeline: triggers processing
- Senderra IDP pipeline → Azure intake storage: writes OCR artifacts
- Senderra IDP pipeline → Document and review data: writes results
- Senderra API → Document and review data: reads documents and writes reviews (evidence: `server/senderra/api.ts`)
- Senderra API → Analytics aggregates: computes analytics (evidence: `server/senderra/api.ts`)
- Senderra API → Model settings service: handles model controls (evidence: `server/senderra/api.ts`)
- Live work screens → Model controls: configures models
- Model controls → Senderra API: requests model changes
- Senderra API → Identity and roles: checks session and roles (evidence: `server/senderra/api.ts`)
- Senderra API → User accounts: authenticates accounts (evidence: `server/senderra/api.ts`)
- Senderra API → Service configuration: reads settings (evidence: `server/senderra/api.ts`)
- Pipeline query engine → Document and review data: queries records (evidence: `server/senderra/kqlEngine.ts`)
- Pipeline query engine → Pipeline gap detection: detects gaps (evidence: `server/senderra/kqlEngine.ts`)
- Pipeline query engine → Azure intake storage: lists uploads (evidence: `server/senderra/kqlEngine.ts`)
- Pipeline gap detection → Document and review data: reads pipeline records (evidence: `server/senderra/pipelineGaps.ts`)
- Pipeline gap detection → Azure intake storage: compares uploads (evidence: `server/senderra/pipelineGaps.ts`)
- Workspace user → Model controls: switches models
- Workspace user → Solution workspace: manages solutions
- Solution workspace → Solution catalog API: manages catalog
- Solution catalog API → Azure solution assets: publishes assets (evidence: `server/solutionsV2Api.ts`)
- Workspace user → Solution generation API: creates solutions
- Solution generation API → Prompt completion: requests completion (evidence: `server/solutionsApi.ts`)
- Workspace user → Observability services: uses observability
- Workspace user → IVR integration: uses IVR outreach
