# mahanthdu2007-hue/vit-zsh architecture

> Architecture diagram of the GitHub repository mahanthdu2007-hue/vit-zsh, 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/mahanthdu2007-hue/vit-zsh
- Repository: https://github.com/mahanthdu2007-hue/vit-zsh

## Overview

PRISM is a career decision-support platform for Indian students and their parents. Students complete a psychometric assessment and parents provide financial and preference inputs; the backend combines those inputs with career and labour-market data to rank pathways and explain trade-offs. Families can explore What-If changes and ask follow-up questions. The graph preserves the documented assessment, recommendation, explanation, chat, and dashboard branches. Several engine modules are unsampled, so their connections are shown only where the pipeline’s imports or documentation support them.

Main entry points: [`backend/app/services.py`](https://github.com/mahanthdu2007-hue/vit-zsh/blob/main/backend/app/services.py) (Assessment services), [`frontend/src/App.tsx`](https://github.com/mahanthdu2007-hue/vit-zsh/blob/main/frontend/src/App.tsx) (Web app routes), [`frontend/src/api/client.ts`](https://github.com/mahanthdu2007-hue/vit-zsh/blob/main/frontend/src/api/client.ts) (API client), [`frontend/src/pages/Dashboard.tsx`](https://github.com/mahanthdu2007-hue/vit-zsh/blob/main/frontend/src/pages/Dashboard.tsx) (Career dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Family experience"]
  node_app["Web app routes<br/>[App.tsx]"]
  node_assessment["Assessment forms"]
  node_parentform["Family inputs<br/>[ParentForm.tsx]"]
  node_dashboard["Career dashboard<br/>[Dashboard.tsx]"]
  node_whatifui["What-If controls"]
  node_chatui["Chat panel<br/>[ChatPanel.tsx]"]
end

subgraph group_api["API and coordination"]
  node_client["API client<br/>[client.ts]"]
  node_routes["HTTP routes<br/>[routes.py]"]
  node_services["Assessment services<br/>[services.py]"]
  node_schemas["Domain schemas<br/>[schemas.py]"]
end

subgraph group_engine["Decision engine"]
  node_dataset[("Career dataset<br/>[loader.py]")]
  node_system1["Psychometric decisions<br/>[system1.py]"]
  node_pipeline["Ranking pipeline<br/>[pipeline.py]"]
  node_whatif["What-If reranking<br/>[whatif.py]"]
  node_engine_stages["Fit, finance, market"]
end

subgraph group_insight["Explanations and chat"]
  node_explain["Career explanations<br/>[explain.py]"]
  node_chat["PRISM chat<br/>[chat.py]"]
  node_ragindex["Reference index<br/>[index.py]"]
  node_llm["Language model providers<br/>[llm.py]"]
end

subgraph group_state["Assessment state"]
  node_storage[("Assessment storage<br/>[storage.py]")]
end

node_family(("Student and parent"))

node_family -->|"uses"| node_app
node_app -->|"routes to"| node_assessment
node_app -->|"routes to"| node_parentform
node_app -->|"routes to"| node_dashboard
node_assessment -->|"submits inputs"| node_client
node_parentform -->|"uses assessment flow"| node_assessment
node_dashboard -.->|"offers changes"| node_whatifui
node_dashboard -.->|"offers follow-up"| node_chatui
node_whatifui -->|"requests reranking"| node_client
node_chatui -->|"sends questions"| node_client
node_client -.->|"calls API"| node_routes
node_routes -->|"dispatches"| node_services
node_routes -->|"loads questions and profiles"| node_dataset
node_services -->|"loads career data"| node_dataset
node_services -->|"runs decisions"| node_system1
node_services -->|"runs assessment"| node_pipeline
node_services -->|"runs reranking"| node_whatif
node_pipeline -->|"runs stages"| node_engine_stages
node_pipeline -->|"uses decisions"| node_system1
node_services -->|"saves and loads"| node_storage
node_services -->|"generates explanations"| node_explain
node_services -->|"handles chat"| node_chat
node_services -->|"requests generation"| node_llm
node_chat -->|"retrieves context"| node_ragindex
node_explain -->|"retrieves context"| node_ragindex
node_explain -->|"requests generation"| node_llm
node_chat -->|"requests generation"| node_llm
node_services -->|"uses domain types"| node_schemas
node_storage -->|"serializes records"| node_schemas

click node_app "https://github.com/mahanthdu2007-hue/vit-zsh/blob/main/frontend/src/App.tsx"
click node_assessment "https://github.com/mahanthdu2007-hue/vit-zsh/blob/main/frontend/src/pages/StudentAssessment.tsx"
click node_parentform "https://github.com/mahanthdu2007-hue/vit-zsh/blob/main/frontend/src/pages/ParentForm.tsx"
click node_dashboard "https://github.com/mahanthdu2007-hue/vit-zsh/blob/main/frontend/src/pages/Dashboard.tsx"
click node_whatifui "https://github.com/mahanthdu2007-hue/vit-zsh/blob/main/frontend/src/components/whatif/WhatIfControlsForm.tsx"
click node_chatui "https://github.com/mahanthdu2007-hue/vit-zsh/blob/main/frontend/src/components/chat/ChatPanel.tsx"
click node_client "https://github.com/mahanthdu2007-hue/vit-zsh/blob/main/frontend/src/api/client.ts"
click node_routes "https://github.com/mahanthdu2007-hue/vit-zsh/blob/main/backend/app/api/routes.py"
click node_services "https://github.com/mahanthdu2007-hue/vit-zsh/blob/main/backend/app/services.py"
click node_schemas "https://github.com/mahanthdu2007-hue/vit-zsh/blob/main/backend/app/models/schemas.py"
click node_dataset "https://github.com/mahanthdu2007-hue/vit-zsh/blob/main/backend/app/engine/loader.py"
click node_system1 "https://github.com/mahanthdu2007-hue/vit-zsh/blob/main/backend/app/engine/system1.py"
click node_pipeline "https://github.com/mahanthdu2007-hue/vit-zsh/blob/main/backend/app/engine/pipeline.py"
click node_whatif "https://github.com/mahanthdu2007-hue/vit-zsh/blob/main/backend/app/engine/whatif.py"
click node_engine_stages "https://github.com/mahanthdu2007-hue/vit-zsh/tree/main/backend/app/engine"
click node_storage "https://github.com/mahanthdu2007-hue/vit-zsh/blob/main/backend/app/storage.py"
click node_explain "https://github.com/mahanthdu2007-hue/vit-zsh/blob/main/backend/app/rag/explain.py"
click node_chat "https://github.com/mahanthdu2007-hue/vit-zsh/blob/main/backend/app/rag/chat.py"
click node_ragindex "https://github.com/mahanthdu2007-hue/vit-zsh/blob/main/backend/app/rag/index.py"
click node_llm "https://github.com/mahanthdu2007-hue/vit-zsh/blob/main/backend/app/rag/llm.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_app,node_assessment,node_parentform,node_dashboard,node_whatifui,node_chatui toneBlue
class node_client,node_routes,node_services,node_schemas toneAmber
class node_dataset,node_system1,node_pipeline,node_whatif,node_engine_stages toneMint
class node_explain,node_chat,node_ragindex,node_llm toneRose
class node_storage,node_family toneIndigo
```

## Components

### Family experience

- [Web app routes](https://github.com/mahanthdu2007-hue/vit-zsh/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Assessment forms](https://github.com/mahanthdu2007-hue/vit-zsh/blob/main/frontend/src/pages/StudentAssessment.tsx): `frontend/src/pages/StudentAssessment.tsx`
- [Family inputs](https://github.com/mahanthdu2007-hue/vit-zsh/blob/main/frontend/src/pages/ParentForm.tsx): `frontend/src/pages/ParentForm.tsx`
- [Career dashboard](https://github.com/mahanthdu2007-hue/vit-zsh/blob/main/frontend/src/pages/Dashboard.tsx): `frontend/src/pages/Dashboard.tsx`
- [What-If controls](https://github.com/mahanthdu2007-hue/vit-zsh/blob/main/frontend/src/components/whatif/WhatIfControlsForm.tsx): `frontend/src/components/whatif/WhatIfControlsForm.tsx`
- [Chat panel](https://github.com/mahanthdu2007-hue/vit-zsh/blob/main/frontend/src/components/chat/ChatPanel.tsx): `frontend/src/components/chat/ChatPanel.tsx`

### API and coordination

- [API client](https://github.com/mahanthdu2007-hue/vit-zsh/blob/main/frontend/src/api/client.ts): `frontend/src/api/client.ts`
- [HTTP routes](https://github.com/mahanthdu2007-hue/vit-zsh/blob/main/backend/app/api/routes.py): `backend/app/api/routes.py`
- [Assessment services](https://github.com/mahanthdu2007-hue/vit-zsh/blob/main/backend/app/services.py): `backend/app/services.py`
- [Domain schemas](https://github.com/mahanthdu2007-hue/vit-zsh/blob/main/backend/app/models/schemas.py): `backend/app/models/schemas.py`

### Decision engine

- [Career dataset](https://github.com/mahanthdu2007-hue/vit-zsh/blob/main/backend/app/engine/loader.py): `backend/app/engine/loader.py`
- [Psychometric decisions](https://github.com/mahanthdu2007-hue/vit-zsh/blob/main/backend/app/engine/system1.py): `backend/app/engine/system1.py`
- [Ranking pipeline](https://github.com/mahanthdu2007-hue/vit-zsh/blob/main/backend/app/engine/pipeline.py): `backend/app/engine/pipeline.py`
- [What-If reranking](https://github.com/mahanthdu2007-hue/vit-zsh/blob/main/backend/app/engine/whatif.py): `backend/app/engine/whatif.py`
- [Fit, finance, market](https://github.com/mahanthdu2007-hue/vit-zsh/tree/main/backend/app/engine): `backend/app/engine`

### Explanations and chat

- [Career explanations](https://github.com/mahanthdu2007-hue/vit-zsh/blob/main/backend/app/rag/explain.py): `backend/app/rag/explain.py`
- [PRISM chat](https://github.com/mahanthdu2007-hue/vit-zsh/blob/main/backend/app/rag/chat.py): `backend/app/rag/chat.py`
- [Reference index](https://github.com/mahanthdu2007-hue/vit-zsh/blob/main/backend/app/rag/index.py): `backend/app/rag/index.py`
- [Language model providers](https://github.com/mahanthdu2007-hue/vit-zsh/blob/main/backend/app/rag/llm.py): `backend/app/rag/llm.py`

### Assessment state

- [Assessment storage](https://github.com/mahanthdu2007-hue/vit-zsh/blob/main/backend/app/storage.py): `backend/app/storage.py`

### Other components

- **Student and parent**

## Connections

- Student and parent → Web app routes: uses (evidence: `README.md`)
- Web app routes → Assessment forms: routes to (evidence: `frontend/src/App.tsx`)
- Web app routes → Family inputs: routes to (evidence: `frontend/src/App.tsx`)
- Web app routes → Career dashboard: routes to (evidence: `frontend/src/App.tsx`)
- Assessment forms → API client: submits inputs (evidence: `frontend/src/pages/StudentAssessment.tsx`)
- Family inputs → Assessment forms: uses assessment flow (evidence: `frontend/src/pages/ParentForm.tsx`)
- Career dashboard → What-If controls: offers changes
- Career dashboard → Chat panel: offers follow-up
- What-If controls → API client: requests reranking
- Chat panel → API client: sends questions (evidence: `frontend/src/components/chat/ChatPanel.tsx`)
- API client → HTTP routes: calls API
- HTTP routes → Assessment services: dispatches (evidence: `backend/app/api/routes.py`)
- HTTP routes → Career dataset: loads questions and profiles (evidence: `backend/app/api/routes.py`)
- Assessment services → Career dataset: loads career data (evidence: `backend/app/services.py`)
- Assessment services → Psychometric decisions: runs decisions (evidence: `backend/app/services.py`)
- Assessment services → Ranking pipeline: runs assessment (evidence: `backend/app/services.py`)
- Assessment services → What-If reranking: runs reranking (evidence: `backend/app/services.py`)
- Ranking pipeline → Fit, finance, market: runs stages (evidence: `backend/app/engine/pipeline.py`)
- Ranking pipeline → Psychometric decisions: uses decisions (evidence: `backend/app/engine/pipeline.py`)
- Assessment services → Assessment storage: saves and loads (evidence: `backend/app/services.py`)
- Assessment services → Career explanations: generates explanations (evidence: `backend/app/services.py`)
- Assessment services → PRISM chat: handles chat (evidence: `backend/app/services.py`)
- Assessment services → Language model providers: requests generation (evidence: `backend/app/services.py`)
- PRISM chat → Reference index: retrieves context (evidence: `backend/app/rag/chat.py`)
- Career explanations → Reference index: retrieves context (evidence: `backend/app/rag/explain.py`)
- Career explanations → Language model providers: requests generation (evidence: `backend/app/rag/explain.py`)
- PRISM chat → Language model providers: requests generation (evidence: `backend/app/rag/chat.py`)
- Assessment services → Domain schemas: uses domain types (evidence: `backend/app/services.py`)
- Assessment storage → Domain schemas: serializes records (evidence: `backend/app/storage.py`)
