# riyas-muhammed/iit_capstone_project architecture

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

- Interactive diagram: https://gitdiagram.com/riyas-muhammed/iit_capstone_project
- Repository: https://github.com/riyas-muhammed/iit_capstone_project

## Overview

Employee Welfare Program is a Streamlit employee-benefits portal with points and spending dashboards, a product marketplace, reimbursement support, and a benefits Q&A assistant. The principal workflow is an employee selecting a portal page; for policy questions, the assistant can obtain policy context through MCP, whose server loads and indexes policy documents before retrieval. Separate MCP tools expose employee records. Invoice agents implement extraction and validation, though the sampled portal only displays a reimbursement page and does not show their integration. Relationships for unsampled marketplace and chat implementations are therefore left unverified.

Main entry points: [`Employee_Welfare_Program/mcp/mcp_server.py`](https://github.com/riyas-muhammed/iit_capstone_project/blob/main/Employee_Welfare_Program/mcp/mcp_server.py) (MCP tools server), [`Employee_Welfare_Program/app/app.py`](https://github.com/riyas-muhammed/iit_capstone_project/blob/main/Employee_Welfare_Program/app/app.py) (Portal navigation), [`Employee_Welfare_Program/app/dashboard.py`](https://github.com/riyas-muhammed/iit_capstone_project/blob/main/Employee_Welfare_Program/app/dashboard.py) (Benefits dashboard), [`Employee_Welfare_Program/agents/invoice_agent.py`](https://github.com/riyas-muhammed/iit_capstone_project/blob/main/Employee_Welfare_Program/agents/invoice_agent.py) (Invoice extraction)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_portal["Employee portal"]
  node_portal_app["Portal navigation<br/>[app.py]"]
  node_dashboard["Benefits dashboard<br/>[dashboard.py]"]
  node_marketplace["Product marketplace<br/>[marketplace.py]"]
  node_reimbursement_page["Reimbursement page<br/>[app.py]"]
  node_invoice_agent["Invoice extraction<br/>[invoice_agent.py]"]
  node_pdf_agent["Invoice validation<br/>[pdf_agent.py]"]
end

subgraph group_assistant["Benefits assistant"]
  node_chat_flow["Chat assistant<br/>[chat.py]"]
  node_chat_agent["Chat agent<br/>[chat_agent.py]"]
  node_chat_prompt["Assistant guidance<br/>[chat_prompt.py]"]
  node_invoice_prompts["Invoice prompts<br/>[prompts.py]"]
  node_mcp["MCP tools server<br/>[mcp_server.py]"]
end

subgraph group_knowledge["Policy retrieval"]
  node_loader["Document loading<br/>[loader.py]"]
  node_splitter["Text chunking<br/>[splitter.py]"]
  node_embedder["Vector indexing<br/>[embedder.py]"]
  node_retriever["Policy retrieval<br/>[retriever.py]"]
  node_llm["Model providers<br/>[llm.py]"]
end

subgraph group_records["Employee records"]
  node_policy["Policy document<br/>[Policy.docx]"]
  node_order_history[("Order history<br/>[Order_History.xlsx]")]
  node_products_db[("Product catalog<br/>[Products_DB.xlsx]")]
  node_cart[("Shopping cart<br/>[cart.json]")]
  node_chat_history[("Chat history<br/>[chat_history.json]")]
  node_config["Program configuration<br/>[config.json]"]
end

node_employee(("Employee"))

node_employee -->|"uses"| node_portal_app
node_portal_app -->|"renders"| node_dashboard
node_portal_app -->|"renders"| node_marketplace
node_portal_app -->|"renders"| node_reimbursement_page
node_portal_app -->|"invokes"| node_chat_flow
node_dashboard -->|"reads"| node_order_history
node_dashboard -->|"reads"| node_config
node_marketplace -.->|"may read"| node_products_db
node_reimbursement_page -.->|"may invoke"| node_invoice_agent
node_chat_flow -.->|"may delegate"| node_chat_agent
node_chat_agent -.->|"may use"| node_chat_prompt
node_chat_agent -.->|"may call tools"| node_mcp
node_mcp -->|"loads policy"| node_loader
node_mcp -->|"chunks text"| node_splitter
node_mcp -->|"builds index"| node_embedder
node_mcp -->|"retrieves context"| node_retriever
node_loader -.->|"loads configured source"| node_policy
node_embedder -->|"gets embeddings"| node_llm
node_retriever -->|"imports provider"| node_llm
node_invoice_agent -->|"uses prompts"| node_invoice_prompts
node_invoice_agent -->|"gets model"| node_llm
node_mcp -->|"reads orders"| node_order_history
node_mcp -->|"reads products"| node_products_db
node_mcp -->|"reads cart"| node_cart
node_mcp -->|"reads settings"| node_config
node_mcp -.->|"may read history"| node_chat_history

click node_portal_app "https://github.com/riyas-muhammed/iit_capstone_project/blob/main/Employee_Welfare_Program/app/app.py"
click node_dashboard "https://github.com/riyas-muhammed/iit_capstone_project/blob/main/Employee_Welfare_Program/app/dashboard.py"
click node_marketplace "https://github.com/riyas-muhammed/iit_capstone_project/blob/main/Employee_Welfare_Program/app/marketplace.py"
click node_reimbursement_page "https://github.com/riyas-muhammed/iit_capstone_project/blob/main/Employee_Welfare_Program/app/app.py"
click node_invoice_agent "https://github.com/riyas-muhammed/iit_capstone_project/blob/main/Employee_Welfare_Program/agents/invoice_agent.py"
click node_pdf_agent "https://github.com/riyas-muhammed/iit_capstone_project/blob/main/Employee_Welfare_Program/agents/pdf_agent.py"
click node_chat_flow "https://github.com/riyas-muhammed/iit_capstone_project/blob/main/Employee_Welfare_Program/agents/chat.py"
click node_chat_agent "https://github.com/riyas-muhammed/iit_capstone_project/blob/main/Employee_Welfare_Program/agents/chat_agent.py"
click node_chat_prompt "https://github.com/riyas-muhammed/iit_capstone_project/blob/main/Employee_Welfare_Program/prompts/chat_prompt.py"
click node_invoice_prompts "https://github.com/riyas-muhammed/iit_capstone_project/blob/main/Employee_Welfare_Program/prompts/prompts.py"
click node_mcp "https://github.com/riyas-muhammed/iit_capstone_project/blob/main/Employee_Welfare_Program/mcp/mcp_server.py"
click node_loader "https://github.com/riyas-muhammed/iit_capstone_project/blob/main/Employee_Welfare_Program/modules/loader.py"
click node_splitter "https://github.com/riyas-muhammed/iit_capstone_project/blob/main/Employee_Welfare_Program/modules/splitter.py"
click node_embedder "https://github.com/riyas-muhammed/iit_capstone_project/blob/main/Employee_Welfare_Program/modules/embedder.py"
click node_retriever "https://github.com/riyas-muhammed/iit_capstone_project/blob/main/Employee_Welfare_Program/modules/retriever.py"
click node_llm "https://github.com/riyas-muhammed/iit_capstone_project/blob/main/Employee_Welfare_Program/modules/llm.py"
click node_policy "https://github.com/riyas-muhammed/iit_capstone_project/blob/main/Employee_Welfare_Program/data/Policy.docx"
click node_order_history "https://github.com/riyas-muhammed/iit_capstone_project/blob/main/Employee_Welfare_Program/data/Order_History.xlsx"
click node_products_db "https://github.com/riyas-muhammed/iit_capstone_project/blob/main/Employee_Welfare_Program/data/Products_DB.xlsx"
click node_cart "https://github.com/riyas-muhammed/iit_capstone_project/blob/main/Employee_Welfare_Program/data/cart.json"
click node_chat_history "https://github.com/riyas-muhammed/iit_capstone_project/blob/main/Employee_Welfare_Program/data/chat_history.json"
click node_config "https://github.com/riyas-muhammed/iit_capstone_project/blob/main/Employee_Welfare_Program/config/config.json"

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_portal_app,node_dashboard,node_marketplace,node_reimbursement_page,node_invoice_agent,node_pdf_agent toneBlue
class node_chat_flow,node_chat_agent,node_chat_prompt,node_invoice_prompts,node_mcp toneAmber
class node_loader,node_splitter,node_embedder,node_retriever,node_llm toneMint
class node_policy,node_order_history,node_products_db,node_cart,node_chat_history,node_config toneRose
class node_employee toneIndigo
```

## Components

### Employee portal

- [Portal navigation](https://github.com/riyas-muhammed/iit_capstone_project/blob/main/Employee_Welfare_Program/app/app.py): `Employee_Welfare_Program/app/app.py`
- [Benefits dashboard](https://github.com/riyas-muhammed/iit_capstone_project/blob/main/Employee_Welfare_Program/app/dashboard.py): `Employee_Welfare_Program/app/dashboard.py`
- [Product marketplace](https://github.com/riyas-muhammed/iit_capstone_project/blob/main/Employee_Welfare_Program/app/marketplace.py): `Employee_Welfare_Program/app/marketplace.py`
- [Reimbursement page](https://github.com/riyas-muhammed/iit_capstone_project/blob/main/Employee_Welfare_Program/app/app.py): `Employee_Welfare_Program/app/app.py`
- [Invoice extraction](https://github.com/riyas-muhammed/iit_capstone_project/blob/main/Employee_Welfare_Program/agents/invoice_agent.py): `Employee_Welfare_Program/agents/invoice_agent.py`
- [Invoice validation](https://github.com/riyas-muhammed/iit_capstone_project/blob/main/Employee_Welfare_Program/agents/pdf_agent.py): `Employee_Welfare_Program/agents/pdf_agent.py`

### Benefits assistant

- [Chat assistant](https://github.com/riyas-muhammed/iit_capstone_project/blob/main/Employee_Welfare_Program/agents/chat.py): `Employee_Welfare_Program/agents/chat.py`
- [Chat agent](https://github.com/riyas-muhammed/iit_capstone_project/blob/main/Employee_Welfare_Program/agents/chat_agent.py): `Employee_Welfare_Program/agents/chat_agent.py`
- [Assistant guidance](https://github.com/riyas-muhammed/iit_capstone_project/blob/main/Employee_Welfare_Program/prompts/chat_prompt.py): `Employee_Welfare_Program/prompts/chat_prompt.py`
- [Invoice prompts](https://github.com/riyas-muhammed/iit_capstone_project/blob/main/Employee_Welfare_Program/prompts/prompts.py): `Employee_Welfare_Program/prompts/prompts.py`
- [MCP tools server](https://github.com/riyas-muhammed/iit_capstone_project/blob/main/Employee_Welfare_Program/mcp/mcp_server.py): `Employee_Welfare_Program/mcp/mcp_server.py`

### Policy retrieval

- [Document loading](https://github.com/riyas-muhammed/iit_capstone_project/blob/main/Employee_Welfare_Program/modules/loader.py): `Employee_Welfare_Program/modules/loader.py`
- [Text chunking](https://github.com/riyas-muhammed/iit_capstone_project/blob/main/Employee_Welfare_Program/modules/splitter.py): `Employee_Welfare_Program/modules/splitter.py`
- [Vector indexing](https://github.com/riyas-muhammed/iit_capstone_project/blob/main/Employee_Welfare_Program/modules/embedder.py): `Employee_Welfare_Program/modules/embedder.py`
- [Policy retrieval](https://github.com/riyas-muhammed/iit_capstone_project/blob/main/Employee_Welfare_Program/modules/retriever.py): `Employee_Welfare_Program/modules/retriever.py`
- [Model providers](https://github.com/riyas-muhammed/iit_capstone_project/blob/main/Employee_Welfare_Program/modules/llm.py): `Employee_Welfare_Program/modules/llm.py`

### Employee records

- [Policy document](https://github.com/riyas-muhammed/iit_capstone_project/blob/main/Employee_Welfare_Program/data/Policy.docx): `Employee_Welfare_Program/data/Policy.docx`
- [Order history](https://github.com/riyas-muhammed/iit_capstone_project/blob/main/Employee_Welfare_Program/data/Order_History.xlsx): `Employee_Welfare_Program/data/Order_History.xlsx`
- [Product catalog](https://github.com/riyas-muhammed/iit_capstone_project/blob/main/Employee_Welfare_Program/data/Products_DB.xlsx): `Employee_Welfare_Program/data/Products_DB.xlsx`
- [Shopping cart](https://github.com/riyas-muhammed/iit_capstone_project/blob/main/Employee_Welfare_Program/data/cart.json): `Employee_Welfare_Program/data/cart.json`
- [Chat history](https://github.com/riyas-muhammed/iit_capstone_project/blob/main/Employee_Welfare_Program/data/chat_history.json): `Employee_Welfare_Program/data/chat_history.json`
- [Program configuration](https://github.com/riyas-muhammed/iit_capstone_project/blob/main/Employee_Welfare_Program/config/config.json): `Employee_Welfare_Program/config/config.json`

### Other components

- **Employee**

## Connections

- Employee → Portal navigation: uses (evidence: `Employee_Welfare_Program/app/app.py`)
- Portal navigation → Benefits dashboard: renders (evidence: `Employee_Welfare_Program/app/app.py`)
- Portal navigation → Product marketplace: renders (evidence: `Employee_Welfare_Program/app/app.py`)
- Portal navigation → Reimbursement page: renders (evidence: `Employee_Welfare_Program/app/app.py`)
- Portal navigation → Chat assistant: invokes (evidence: `Employee_Welfare_Program/app/app.py`)
- Benefits dashboard → Order history: reads (evidence: `Employee_Welfare_Program/app/dashboard.py`)
- Benefits dashboard → Program configuration: reads (evidence: `Employee_Welfare_Program/app/dashboard.py`)
- Product marketplace → Product catalog: may read
- Reimbursement page → Invoice extraction: may invoke
- Chat assistant → Chat agent: may delegate
- Chat agent → Assistant guidance: may use
- Chat agent → MCP tools server: may call tools
- MCP tools server → Document loading: loads policy (evidence: `Employee_Welfare_Program/mcp/mcp_server.py`)
- MCP tools server → Text chunking: chunks text (evidence: `Employee_Welfare_Program/mcp/mcp_server.py`)
- MCP tools server → Vector indexing: builds index (evidence: `Employee_Welfare_Program/mcp/mcp_server.py`)
- MCP tools server → Policy retrieval: retrieves context (evidence: `Employee_Welfare_Program/mcp/mcp_server.py`)
- Document loading → Policy document: loads configured source
- Vector indexing → Model providers: gets embeddings (evidence: `Employee_Welfare_Program/modules/embedder.py`)
- Policy retrieval → Model providers: imports provider (evidence: `Employee_Welfare_Program/modules/retriever.py`)
- Invoice extraction → Invoice prompts: uses prompts (evidence: `Employee_Welfare_Program/agents/invoice_agent.py`)
- Invoice extraction → Model providers: gets model (evidence: `Employee_Welfare_Program/agents/invoice_agent.py`)
- MCP tools server → Order history: reads orders (evidence: `Employee_Welfare_Program/mcp/mcp_server.py`)
- MCP tools server → Product catalog: reads products (evidence: `Employee_Welfare_Program/mcp/mcp_server.py`)
- MCP tools server → Shopping cart: reads cart (evidence: `Employee_Welfare_Program/mcp/mcp_server.py`)
- MCP tools server → Program configuration: reads settings (evidence: `Employee_Welfare_Program/mcp/mcp_server.py`)
- MCP tools server → Chat history: may read history
