# mysanithiya/agentra-rajaratauniversityofsrilanka architecture

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

- Interactive diagram: https://gitdiagram.com/mysanithiya/agentra-rajaratauniversityofsrilanka
- Repository: https://github.com/mysanithiya/agentra-rajaratauniversityofsrilanka

## Overview

PhishGuard AI accepts email content and/or a URL, runs the applicable analysis agents in parallel, combines their findings into a risk assessment, and presents investigation results in a web dashboard. The graph shows the documented frontend-to-API workflow and the backend calls visible in sampled source. Frontend history and informational pages are included as product capabilities, but their internal data flows are not inferred.

Main entry points: [`project/orchestration/graph.py`](https://github.com/mysanithiya/agentra-rajaratauniversityofsrilanka/blob/main/project/orchestration/graph.py) (Agent workflow), [`project/Frontend/src/pages/Dashboard.tsx`](https://github.com/mysanithiya/agentra-rajaratauniversityofsrilanka/blob/main/project/Frontend/src/pages/Dashboard.tsx) (Analysis dashboard), [`project/agents/threat_intelligence_agent.py`](https://github.com/mysanithiya/agentra-rajaratauniversityofsrilanka/blob/main/project/agents/threat_intelligence_agent.py) (Threat intelligence), [`project/agents/threat_intelligence/sources/urlhaus.py`](https://github.com/mysanithiya/agentra-rajaratauniversityofsrilanka/blob/main/project/agents/threat_intelligence/sources/urlhaus.py) (URLhaus lookup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web application"]
  node_app["Application shell<br/>[App.tsx]"]
  node_dashboard["Analysis dashboard<br/>[Dashboard.tsx]"]
  node_input["Analysis input<br/>[AnalysisInput.tsx]"]
  node_loading["Analysis loading"]
  node_resultcard["Result display"]
  node_history["Scan history<br/>[ScanHistory.tsx]"]
  node_about["About page<br/>[About.tsx]"]
  node_api_client["API client<br/>[api.ts]"]
end

subgraph group_api["API and orchestration"]
  node_api["Analysis API<br/>[main.py]"]
  node_workflow["Agent workflow<br/>[graph.py]"]
  node_state["Workflow state<br/>[state.py]"]
end

subgraph group_analysis["Analysis agents"]
  node_email["Email analysis"]
  node_url["URL analysis"]
end

subgraph group_intel["Threat intelligence"]
  node_intel_agent["Threat intelligence"]
  node_validator["URL validation<br/>[url_validator.py]"]
  node_urlhaus["URLhaus lookup<br/>[urlhaus.py]"]
  node_threatfox["ThreatFox lookup<br/>[threatfox.py]"]
end

subgraph group_results["Results and schemas"]
  node_risk["Risk assessment"]
  node_agent_schema["Agent result schema<br/>[agent_result.py]"]
  node_risk_schema["Risk result schema"]
end

node_user(("Analyst"))
node_urlhaus_service["URLhaus"]
node_threatfox_service["ThreatFox"]

node_user -->|"submits input"| node_dashboard
node_app -->|"renders"| node_dashboard
node_dashboard -.->|"accepts input"| node_input
node_dashboard -->|"requests analysis"| node_api_client
node_dashboard -.->|"shows progress"| node_loading
node_dashboard -->|"displays findings"| node_resultcard
node_dashboard -.->|"offers history"| node_history
node_app -.->|"offers information"| node_about
node_api_client -->|"calls endpoint"| node_api
node_api -->|"invokes"| node_workflow
node_workflow -->|"calls"| node_email
node_workflow -->|"calls"| node_url
node_workflow -->|"calls"| node_intel_agent
node_workflow -->|"calls"| node_risk
node_workflow -->|"uses state"| node_state
node_intel_agent -->|"queries"| node_urlhaus
node_intel_agent -->|"queries"| node_threatfox
node_urlhaus -->|"validates URL"| node_validator
node_threatfox -->|"validates URL"| node_validator
node_urlhaus -.->|"checks indicators"| node_urlhaus_service
node_threatfox -->|"checks indicators"| node_threatfox_service
node_risk -->|"validates results"| node_agent_schema
node_risk -->|"returns assessment"| node_risk_schema
node_workflow -->|"validates findings"| node_agent_schema

click node_app "https://github.com/mysanithiya/agentra-rajaratauniversityofsrilanka/blob/main/project/Frontend/src/App.tsx"
click node_dashboard "https://github.com/mysanithiya/agentra-rajaratauniversityofsrilanka/blob/main/project/Frontend/src/pages/Dashboard.tsx"
click node_input "https://github.com/mysanithiya/agentra-rajaratauniversityofsrilanka/blob/main/project/Frontend/src/components/analysis/AnalysisInput.tsx"
click node_loading "https://github.com/mysanithiya/agentra-rajaratauniversityofsrilanka/blob/main/project/Frontend/src/components/analysis/AnalysisLoading.tsx"
click node_resultcard "https://github.com/mysanithiya/agentra-rajaratauniversityofsrilanka/blob/main/project/Frontend/src/components/analysis/AnalysisResultCard.tsx"
click node_history "https://github.com/mysanithiya/agentra-rajaratauniversityofsrilanka/blob/main/project/Frontend/src/pages/ScanHistory.tsx"
click node_about "https://github.com/mysanithiya/agentra-rajaratauniversityofsrilanka/blob/main/project/Frontend/src/pages/About.tsx"
click node_api_client "https://github.com/mysanithiya/agentra-rajaratauniversityofsrilanka/blob/main/project/Frontend/src/services/api.ts"
click node_api "https://github.com/mysanithiya/agentra-rajaratauniversityofsrilanka/blob/main/project/main.py"
click node_workflow "https://github.com/mysanithiya/agentra-rajaratauniversityofsrilanka/blob/main/project/orchestration/graph.py"
click node_state "https://github.com/mysanithiya/agentra-rajaratauniversityofsrilanka/blob/main/project/orchestration/state.py"
click node_email "https://github.com/mysanithiya/agentra-rajaratauniversityofsrilanka/blob/main/project/agents/email_analysis_agent.py"
click node_url "https://github.com/mysanithiya/agentra-rajaratauniversityofsrilanka/blob/main/project/agents/url_analysis_agent.py"
click node_intel_agent "https://github.com/mysanithiya/agentra-rajaratauniversityofsrilanka/blob/main/project/agents/threat_intelligence_agent.py"
click node_validator "https://github.com/mysanithiya/agentra-rajaratauniversityofsrilanka/blob/main/project/agents/threat_intelligence/url_validator.py"
click node_urlhaus "https://github.com/mysanithiya/agentra-rajaratauniversityofsrilanka/blob/main/project/agents/threat_intelligence/sources/urlhaus.py"
click node_threatfox "https://github.com/mysanithiya/agentra-rajaratauniversityofsrilanka/blob/main/project/agents/threat_intelligence/sources/threatfox.py"
click node_risk "https://github.com/mysanithiya/agentra-rajaratauniversityofsrilanka/blob/main/project/agents/risk_assessment/risk_assessment_agent.py"
click node_agent_schema "https://github.com/mysanithiya/agentra-rajaratauniversityofsrilanka/blob/main/project/schemas/agent_result.py"
click node_risk_schema "https://github.com/mysanithiya/agentra-rajaratauniversityofsrilanka/blob/main/project/schemas/risk_assessment_result.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_dashboard,node_input,node_loading,node_resultcard,node_history,node_about,node_api_client toneBlue
class node_api,node_workflow,node_state toneAmber
class node_email,node_url toneMint
class node_intel_agent,node_validator,node_urlhaus,node_threatfox toneRose
class node_risk,node_agent_schema,node_risk_schema,node_user,node_urlhaus_service,node_threatfox_service toneIndigo
```

## Components

### Web application

- [Application shell](https://github.com/mysanithiya/agentra-rajaratauniversityofsrilanka/blob/main/project/Frontend/src/App.tsx): `project/Frontend/src/App.tsx`
- [Analysis dashboard](https://github.com/mysanithiya/agentra-rajaratauniversityofsrilanka/blob/main/project/Frontend/src/pages/Dashboard.tsx): `project/Frontend/src/pages/Dashboard.tsx`
- [Analysis input](https://github.com/mysanithiya/agentra-rajaratauniversityofsrilanka/blob/main/project/Frontend/src/components/analysis/AnalysisInput.tsx): `project/Frontend/src/components/analysis/AnalysisInput.tsx`
- [Analysis loading](https://github.com/mysanithiya/agentra-rajaratauniversityofsrilanka/blob/main/project/Frontend/src/components/analysis/AnalysisLoading.tsx): `project/Frontend/src/components/analysis/AnalysisLoading.tsx`
- [Result display](https://github.com/mysanithiya/agentra-rajaratauniversityofsrilanka/blob/main/project/Frontend/src/components/analysis/AnalysisResultCard.tsx): `project/Frontend/src/components/analysis/AnalysisResultCard.tsx`
- [Scan history](https://github.com/mysanithiya/agentra-rajaratauniversityofsrilanka/blob/main/project/Frontend/src/pages/ScanHistory.tsx): `project/Frontend/src/pages/ScanHistory.tsx`
- [About page](https://github.com/mysanithiya/agentra-rajaratauniversityofsrilanka/blob/main/project/Frontend/src/pages/About.tsx): `project/Frontend/src/pages/About.tsx`
- [API client](https://github.com/mysanithiya/agentra-rajaratauniversityofsrilanka/blob/main/project/Frontend/src/services/api.ts): `project/Frontend/src/services/api.ts`

### API and orchestration

- [Analysis API](https://github.com/mysanithiya/agentra-rajaratauniversityofsrilanka/blob/main/project/main.py): `project/main.py`
- [Agent workflow](https://github.com/mysanithiya/agentra-rajaratauniversityofsrilanka/blob/main/project/orchestration/graph.py): `project/orchestration/graph.py`
- [Workflow state](https://github.com/mysanithiya/agentra-rajaratauniversityofsrilanka/blob/main/project/orchestration/state.py): `project/orchestration/state.py`

### Analysis agents

- [Email analysis](https://github.com/mysanithiya/agentra-rajaratauniversityofsrilanka/blob/main/project/agents/email_analysis_agent.py): `project/agents/email_analysis_agent.py`
- [URL analysis](https://github.com/mysanithiya/agentra-rajaratauniversityofsrilanka/blob/main/project/agents/url_analysis_agent.py): `project/agents/url_analysis_agent.py`

### Threat intelligence

- [Threat intelligence](https://github.com/mysanithiya/agentra-rajaratauniversityofsrilanka/blob/main/project/agents/threat_intelligence_agent.py): `project/agents/threat_intelligence_agent.py`
- [URL validation](https://github.com/mysanithiya/agentra-rajaratauniversityofsrilanka/blob/main/project/agents/threat_intelligence/url_validator.py): `project/agents/threat_intelligence/url_validator.py`
- [URLhaus lookup](https://github.com/mysanithiya/agentra-rajaratauniversityofsrilanka/blob/main/project/agents/threat_intelligence/sources/urlhaus.py): `project/agents/threat_intelligence/sources/urlhaus.py`
- [ThreatFox lookup](https://github.com/mysanithiya/agentra-rajaratauniversityofsrilanka/blob/main/project/agents/threat_intelligence/sources/threatfox.py): `project/agents/threat_intelligence/sources/threatfox.py`

### Results and schemas

- [Risk assessment](https://github.com/mysanithiya/agentra-rajaratauniversityofsrilanka/blob/main/project/agents/risk_assessment/risk_assessment_agent.py): `project/agents/risk_assessment/risk_assessment_agent.py`
- [Agent result schema](https://github.com/mysanithiya/agentra-rajaratauniversityofsrilanka/blob/main/project/schemas/agent_result.py): `project/schemas/agent_result.py`
- [Risk result schema](https://github.com/mysanithiya/agentra-rajaratauniversityofsrilanka/blob/main/project/schemas/risk_assessment_result.py): `project/schemas/risk_assessment_result.py`

### Other components

- **Analyst**
- **URLhaus**
- **ThreatFox**

## Connections

- Analyst → Analysis dashboard: submits input (evidence: `README.md`)
- Application shell → Analysis dashboard: renders (evidence: `project/Frontend/src/App.tsx`)
- Analysis dashboard → Analysis input: accepts input
- Analysis dashboard → API client: requests analysis (evidence: `README.md`)
- Analysis dashboard → Analysis loading: shows progress
- Analysis dashboard → Result display: displays findings (evidence: `README.md`)
- Analysis dashboard → Scan history: offers history
- Application shell → About page: offers information
- API client → Analysis API: calls endpoint (evidence: `README.md`)
- Analysis API → Agent workflow: invokes (evidence: `project/main.py`)
- Agent workflow → Email analysis: calls (evidence: `project/orchestration/graph.py`)
- Agent workflow → URL analysis: calls (evidence: `project/orchestration/graph.py`)
- Agent workflow → Threat intelligence: calls (evidence: `project/orchestration/graph.py`)
- Agent workflow → Risk assessment: calls (evidence: `project/orchestration/graph.py`)
- Agent workflow → Workflow state: uses state (evidence: `project/orchestration/graph.py`)
- Threat intelligence → URLhaus lookup: queries (evidence: `project/agents/threat_intelligence_agent.py`)
- Threat intelligence → ThreatFox lookup: queries (evidence: `project/agents/threat_intelligence_agent.py`)
- URLhaus lookup → URL validation: validates URL (evidence: `project/agents/threat_intelligence/sources/urlhaus.py`)
- ThreatFox lookup → URL validation: validates URL (evidence: `project/agents/threat_intelligence/sources/threatfox.py`)
- URLhaus lookup → URLhaus: checks indicators (evidence: `README.md`)
- ThreatFox lookup → ThreatFox: checks indicators (evidence: `README.md`)
- Risk assessment → Agent result schema: validates results (evidence: `project/agents/risk_assessment/risk_assessment_agent.py`)
- Risk assessment → Risk result schema: returns assessment (evidence: `project/agents/risk_assessment/risk_assessment_agent.py`)
- Agent workflow → Agent result schema: validates findings (evidence: `project/orchestration/graph.py`)
