# ishikadubey1105/v4catalyst architecture

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

- Interactive diagram: https://gitdiagram.com/ishikadubey1105/v4catalyst
- Repository: https://github.com/ishikadubey1105/v4catalyst

## Overview

Thread is a complaint case-management product focused on accountable handovers: employees maintain case context, tasks and decisions, forward complete cases, and the receiver acknowledges the handover before ownership changes. The React client presents employee and management workflows; its API layer communicates with FastAPI, where rules, access control, auditing and persistence are enforced. The README documents major capabilities whose implementation files were not sampled; those branches are included with directory- or file-level paths, while uncertain internal calls are omitted or marked unverified.

Main entry points: [`frontend/src/App.tsx`](https://github.com/ishikadubey1105/v4catalyst/blob/frontend/frontend/src/App.tsx) (Thread web app), [`backend/app/main.py`](https://github.com/ishikadubey1105/v4catalyst/blob/frontend/backend/app/main.py) (FastAPI application), [`backend/app/routers/auth.py`](https://github.com/ishikadubey1105/v4catalyst/blob/frontend/backend/app/routers/auth.py) (Authentication), [`frontend/src/api/client.ts`](https://github.com/ishikadubey1105/v4catalyst/blob/frontend/frontend/src/api/client.ts) (API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Employee and management UI"]
  node_webapp["Thread web app<br/>[App.tsx]"]
  node_casework["Case workspace<br/>[CaseWorkspace.tsx]"]
  node_forward["Forward case<br/>[ForwardWizard.tsx]"]
  node_review["Handoff review<br/>[HandoffReview.tsx]"]
  node_management["Management views<br/>[Reports.tsx]"]
  node_clientapi["API client<br/>[client.ts]"]
  node_contracts["API contracts<br/>[contracts.ts]"]
end

subgraph group_api["API and workflow"]
  node_server["FastAPI application<br/>[main.py]"]
  node_auth["Authentication<br/>[auth.py]"]
  node_cases["Case operations<br/>[cases.py]"]
  node_handoffs["Handoff operations<br/>[handoffs.py]"]
  node_completeness["Completeness and rules<br/>[rules.py]"]
end

subgraph group_support["Product services"]
  node_ai["AI handover assistant<br/>[ai.py]"]
  node_alerts["Alerts and escalation<br/>[alerts.py]"]
  node_deadlines["Deadline watcher<br/>[deadlines.py]"]
  node_reporting["Management reports<br/>[reports.py]"]
  node_pdf["PDF generation<br/>[report_pdf.py]"]
  node_access["Access and visibility<br/>[deps.py]"]
  node_auditnotify["Audit and notifications<br/>[services.py]"]
end

subgraph group_data["Persistence and domain"]
  node_database[("Relational database<br/>[db.py]")]
  node_domain["Case and handoff records<br/>[models.py]"]
  node_serializer["Response serialization<br/>[serializers.py]"]
end

node_employee(("Employee or manager"))
node_externaldb[("PostgreSQL or SQLite")]
node_groq["Groq LLM"]

node_employee -->|"uses"| node_webapp
node_webapp -->|"routes to"| node_casework
node_webapp -->|"routes to"| node_forward
node_webapp -->|"routes to"| node_review
node_webapp -->|"routes to"| node_management
node_casework -.->|"calls"| node_clientapi
node_forward -.->|"calls"| node_clientapi
node_review -->|"calls"| node_clientapi
node_clientapi -->|"uses"| node_contracts
node_clientapi -->|"sends API requests"| node_server
node_server -->|"registers"| node_auth
node_server -->|"registers"| node_cases
node_server -->|"registers"| node_handoffs
node_server -->|"starts watcher"| node_deadlines
node_cases -->|"uses rules"| node_completeness
node_handoffs -->|"uses rules"| node_completeness
node_auth -->|"resolves user"| node_access
node_auth -->|"logs actions"| node_auditnotify
node_cases -->|"records effects"| node_auditnotify
node_handoffs -->|"records effects"| node_auditnotify
node_cases -->|"reads and writes"| node_domain
node_handoffs -->|"reads and writes"| node_domain
node_auth -->|"reads and writes"| node_domain
node_domain -->|"uses mappings"| node_database
node_database -->|"connects to"| node_externaldb
node_auth -->|"serializes employee"| node_serializer
node_ai -.->|"requests drafts"| node_groq
node_deadlines -.->|"checks deadlines"| node_alerts
node_reporting -.->|"generates PDF"| node_pdf
node_management -.->|"requests reports"| node_reporting
node_employee -.->|"requests assistance"| node_ai
node_employee -.->|"reviews alerts"| node_alerts
node_employee -.->|"views audit trail"| node_auditnotify

click node_webapp "https://github.com/ishikadubey1105/v4catalyst/blob/frontend/frontend/src/App.tsx"
click node_casework "https://github.com/ishikadubey1105/v4catalyst/blob/frontend/frontend/src/pages/CaseWorkspace.tsx"
click node_forward "https://github.com/ishikadubey1105/v4catalyst/blob/frontend/frontend/src/pages/ForwardWizard.tsx"
click node_review "https://github.com/ishikadubey1105/v4catalyst/blob/frontend/frontend/src/pages/HandoffReview.tsx"
click node_management "https://github.com/ishikadubey1105/v4catalyst/blob/frontend/frontend/src/pages/Reports.tsx"
click node_clientapi "https://github.com/ishikadubey1105/v4catalyst/blob/frontend/frontend/src/api/client.ts"
click node_contracts "https://github.com/ishikadubey1105/v4catalyst/blob/frontend/frontend/src/api/contracts.ts"
click node_server "https://github.com/ishikadubey1105/v4catalyst/blob/frontend/backend/app/main.py"
click node_auth "https://github.com/ishikadubey1105/v4catalyst/blob/frontend/backend/app/routers/auth.py"
click node_cases "https://github.com/ishikadubey1105/v4catalyst/blob/frontend/backend/app/routers/cases.py"
click node_handoffs "https://github.com/ishikadubey1105/v4catalyst/blob/frontend/backend/app/routers/handoffs.py"
click node_completeness "https://github.com/ishikadubey1105/v4catalyst/blob/frontend/backend/app/rules.py"
click node_ai "https://github.com/ishikadubey1105/v4catalyst/blob/frontend/backend/app/ai.py"
click node_alerts "https://github.com/ishikadubey1105/v4catalyst/blob/frontend/backend/app/alerts.py"
click node_deadlines "https://github.com/ishikadubey1105/v4catalyst/blob/frontend/backend/app/deadlines.py"
click node_reporting "https://github.com/ishikadubey1105/v4catalyst/blob/frontend/backend/app/reports.py"
click node_pdf "https://github.com/ishikadubey1105/v4catalyst/blob/frontend/backend/app/report_pdf.py"
click node_access "https://github.com/ishikadubey1105/v4catalyst/blob/frontend/backend/app/deps.py"
click node_auditnotify "https://github.com/ishikadubey1105/v4catalyst/blob/frontend/backend/app/services.py"
click node_database "https://github.com/ishikadubey1105/v4catalyst/blob/frontend/backend/app/db.py"
click node_domain "https://github.com/ishikadubey1105/v4catalyst/blob/frontend/backend/app/models.py"
click node_serializer "https://github.com/ishikadubey1105/v4catalyst/blob/frontend/backend/app/serializers.py"

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_webapp,node_casework,node_forward,node_review,node_management,node_clientapi,node_contracts toneBlue
class node_server,node_auth,node_cases,node_handoffs,node_completeness,node_externaldb toneAmber
class node_ai,node_alerts,node_deadlines,node_reporting,node_pdf,node_access,node_auditnotify toneMint
class node_database,node_domain,node_serializer toneRose
class node_employee,node_groq toneIndigo
```

## Components

### Employee and management UI

- [Thread web app](https://github.com/ishikadubey1105/v4catalyst/blob/frontend/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Case workspace](https://github.com/ishikadubey1105/v4catalyst/blob/frontend/frontend/src/pages/CaseWorkspace.tsx): `frontend/src/pages/CaseWorkspace.tsx`
- [Forward case](https://github.com/ishikadubey1105/v4catalyst/blob/frontend/frontend/src/pages/ForwardWizard.tsx): `frontend/src/pages/ForwardWizard.tsx`
- [Handoff review](https://github.com/ishikadubey1105/v4catalyst/blob/frontend/frontend/src/pages/HandoffReview.tsx): `frontend/src/pages/HandoffReview.tsx`
- [Management views](https://github.com/ishikadubey1105/v4catalyst/blob/frontend/frontend/src/pages/Reports.tsx): `frontend/src/pages/Reports.tsx`
- [API client](https://github.com/ishikadubey1105/v4catalyst/blob/frontend/frontend/src/api/client.ts): `frontend/src/api/client.ts`
- [API contracts](https://github.com/ishikadubey1105/v4catalyst/blob/frontend/frontend/src/api/contracts.ts): `frontend/src/api/contracts.ts`

### API and workflow

- [FastAPI application](https://github.com/ishikadubey1105/v4catalyst/blob/frontend/backend/app/main.py): `backend/app/main.py`
- [Authentication](https://github.com/ishikadubey1105/v4catalyst/blob/frontend/backend/app/routers/auth.py): `backend/app/routers/auth.py`
- [Case operations](https://github.com/ishikadubey1105/v4catalyst/blob/frontend/backend/app/routers/cases.py): `backend/app/routers/cases.py`
- [Handoff operations](https://github.com/ishikadubey1105/v4catalyst/blob/frontend/backend/app/routers/handoffs.py): `backend/app/routers/handoffs.py`
- [Completeness and rules](https://github.com/ishikadubey1105/v4catalyst/blob/frontend/backend/app/rules.py): `backend/app/rules.py`

### Product services

- [AI handover assistant](https://github.com/ishikadubey1105/v4catalyst/blob/frontend/backend/app/ai.py): `backend/app/ai.py`
- [Alerts and escalation](https://github.com/ishikadubey1105/v4catalyst/blob/frontend/backend/app/alerts.py): `backend/app/alerts.py`
- [Deadline watcher](https://github.com/ishikadubey1105/v4catalyst/blob/frontend/backend/app/deadlines.py): `backend/app/deadlines.py`
- [Management reports](https://github.com/ishikadubey1105/v4catalyst/blob/frontend/backend/app/reports.py): `backend/app/reports.py`
- [PDF generation](https://github.com/ishikadubey1105/v4catalyst/blob/frontend/backend/app/report_pdf.py): `backend/app/report_pdf.py`
- [Access and visibility](https://github.com/ishikadubey1105/v4catalyst/blob/frontend/backend/app/deps.py): `backend/app/deps.py`
- [Audit and notifications](https://github.com/ishikadubey1105/v4catalyst/blob/frontend/backend/app/services.py): `backend/app/services.py`

### Persistence and domain

- [Relational database](https://github.com/ishikadubey1105/v4catalyst/blob/frontend/backend/app/db.py): `backend/app/db.py`
- [Case and handoff records](https://github.com/ishikadubey1105/v4catalyst/blob/frontend/backend/app/models.py): `backend/app/models.py`
- [Response serialization](https://github.com/ishikadubey1105/v4catalyst/blob/frontend/backend/app/serializers.py): `backend/app/serializers.py`

### Other components

- **Employee or manager**
- **PostgreSQL or SQLite**
- **Groq LLM**

## Connections

- Employee or manager → Thread web app: uses
- Thread web app → Case workspace: routes to (evidence: `frontend/src/App.tsx`)
- Thread web app → Forward case: routes to (evidence: `frontend/src/App.tsx`)
- Thread web app → Handoff review: routes to (evidence: `frontend/src/App.tsx`)
- Thread web app → Management views: routes to (evidence: `frontend/src/App.tsx`)
- Case workspace → API client: calls
- Forward case → API client: calls
- Handoff review → API client: calls (evidence: `frontend/src/pages/HandoffReview.tsx`)
- API client → API contracts: uses (evidence: `frontend/src/api/client.ts`)
- API client → FastAPI application: sends API requests
- FastAPI application → Authentication: registers (evidence: `backend/app/main.py`)
- FastAPI application → Case operations: registers (evidence: `backend/app/main.py`)
- FastAPI application → Handoff operations: registers (evidence: `backend/app/main.py`)
- FastAPI application → Deadline watcher: starts watcher (evidence: `backend/app/main.py`)
- Case operations → Completeness and rules: uses rules (evidence: `backend/app/routers/cases.py`)
- Handoff operations → Completeness and rules: uses rules (evidence: `backend/app/routers/handoffs.py`)
- Authentication → Access and visibility: resolves user (evidence: `backend/app/routers/auth.py`)
- Authentication → Audit and notifications: logs actions (evidence: `backend/app/routers/auth.py`)
- Case operations → Audit and notifications: records effects (evidence: `backend/app/routers/cases.py`)
- Handoff operations → Audit and notifications: records effects (evidence: `backend/app/routers/handoffs.py`)
- Case operations → Case and handoff records: reads and writes (evidence: `backend/app/routers/cases.py`)
- Handoff operations → Case and handoff records: reads and writes (evidence: `backend/app/routers/handoffs.py`)
- Authentication → Case and handoff records: reads and writes (evidence: `backend/app/routers/auth.py`)
- Case and handoff records → Relational database: uses mappings (evidence: `backend/app/models.py`)
- Relational database → PostgreSQL or SQLite: connects to
- Authentication → Response serialization: serializes employee (evidence: `backend/app/routers/auth.py`)
- AI handover assistant → Groq LLM: requests drafts
- Deadline watcher → Alerts and escalation: checks deadlines
- Management reports → PDF generation: generates PDF
- Management views → Management reports: requests reports
- Employee or manager → AI handover assistant: requests assistance
- Employee or manager → Alerts and escalation: reviews alerts
- Employee or manager → Audit and notifications: views audit trail
