# ragulgandhi-s/nexora architecture

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

- Interactive diagram: https://gitdiagram.com/ragulgandhi-s/nexora
- Repository: https://github.com/ragulgandhi-s/nexora

## Overview

ScamCheck is a student-focused job and internship scam assessment app. Users submit opportunity text or a screenshot; the backend extracts details, checks company/contact consistency, scores warnings, and builds a trust graph. The frontend presents evidence, safety labeling, recommendations, and an interactive warning simulator. The README documents OCR and the main product capabilities; some connections to unsampled OCR and UI modules are therefore shown only where documented or left unlinked. The frontend excerpts show a local analysis path, while the API client and result page show backend calls; the excerpts do not establish how these paths are selected at runtime.

Main entry points: [`backend/app/routes/analyze.py`](https://github.com/ragulgandhi-s/nexora/blob/main/backend/app/routes/analyze.py) (Opportunity analysis route), [`frontend/src/pages/Result.jsx`](https://github.com/ragulgandhi-s/nexora/blob/main/frontend/src/pages/Result.jsx) (Assessment results page), [`frontend/src/services/api.js`](https://github.com/ragulgandhi-s/nexora/blob/main/frontend/src/services/api.js) (HTTP API client), [`backend/app/routes/upload.py`](https://github.com/ragulgandhi-s/nexora/blob/main/backend/app/routes/upload.py) (File intake route)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["User interface"]
  node_app["Application shell<br/>[App.jsx]"]
  node_entry["React entry<br/>[main.jsx]"]
  node_home["Opportunity input<br/>[Home.jsx]"]
  node_input["Text and upload controls"]
  node_uploadui["Screenshot upload"]
end

subgraph group_api["API and intake"]
  node_client["HTTP API client<br/>[api.js]"]
  node_server["FastAPI application<br/>[main.py]"]
  node_analyze["Opportunity analysis route<br/>[analyze.py]"]
  node_upload["File intake route<br/>[upload.py]"]
  node_simulate["Simulation route<br/>[simulate.py]"]
end

subgraph group_analysis["Assessment engine"]
  node_ocr["Screenshot text extraction<br/>[text_extractor.py]"]
  node_extractor["Opportunity entity extraction<br/>[extractor.py]"]
  node_risk["Risk scoring<br/>[risk_engine.py]"]
  node_graphbuild["Trust graph construction<br/>[graph_builder.py]"]
end

subgraph group_verification["Verification"]
  node_emailcheck["Email verification<br/>[email_check.py]"]
  node_urlcheck["Website verification<br/>[url_check.py]"]
  node_companycheck["Company verification<br/>[company_check.py]"]
  node_consistency["Cross-field consistency<br/>[consistency.py]"]
end

subgraph group_presentation["Results and simulation"]
  node_result["Assessment results page<br/>[Result.jsx]"]
  node_trustui["Trust graph display<br/>[TrustGraph.jsx]"]
  node_scoreui["Risk score display<br/>[RiskScore.jsx]"]
  node_labelui["Safety label<br/>[SafetyLabel.jsx]"]
  node_factors["Warnings and evidence<br/>[RiskFactors.jsx]"]
  node_evidence["Evidence card<br/>[EvidenceCard.jsx]"]
  node_simui["Risk simulator<br/>[RiskSimulator.jsx]"]
  node_plan["Action plan<br/>[ActionPlan.jsx]"]
end

node_user(("Opportunity seeker"))

node_user -->|"submits opportunity"| node_app
node_entry -->|"renders"| node_app
node_app -.->|"presents intake"| node_home
node_home -.->|"collects text"| node_input
node_home -.->|"offers upload"| node_uploadui
node_client -->|"POSTs text"| node_analyze
node_client -.->|"uploads file"| node_upload
node_client -->|"requests simulation"| node_simulate
node_server -->|"registers router"| node_analyze
node_server -->|"registers router"| node_upload
node_server -->|"registers router"| node_simulate
node_upload -->|"analyzes extracted text"| node_analyze
node_upload -.->|"extracts image text"| node_ocr
node_analyze -->|"extracts entities"| node_extractor
node_analyze -->|"verifies email"| node_emailcheck
node_analyze -->|"verifies website"| node_urlcheck
node_analyze -->|"checks company"| node_companycheck
node_analyze -->|"checks consistency"| node_consistency
node_analyze -->|"scores warnings"| node_risk
node_analyze -->|"builds trust graph"| node_graphbuild
node_result -->|"requests simulation"| node_client
node_result -->|"renders graph"| node_trustui
node_result -->|"renders score"| node_scoreui
node_result -->|"renders label"| node_labelui
node_result -->|"renders warnings"| node_factors
node_result -->|"renders evidence"| node_evidence
node_result -->|"renders simulator"| node_simui
node_result -->|"renders recommendations"| node_plan

click node_app "https://github.com/ragulgandhi-s/nexora/blob/main/frontend/src/App.jsx"
click node_entry "https://github.com/ragulgandhi-s/nexora/blob/main/frontend/src/main.jsx"
click node_home "https://github.com/ragulgandhi-s/nexora/blob/main/frontend/src/pages/Home.jsx"
click node_input "https://github.com/ragulgandhi-s/nexora/blob/main/frontend/src/components/OpportunityInput.jsx"
click node_uploadui "https://github.com/ragulgandhi-s/nexora/blob/main/frontend/src/components/UploadScreenshot.jsx"
click node_client "https://github.com/ragulgandhi-s/nexora/blob/main/frontend/src/services/api.js"
click node_server "https://github.com/ragulgandhi-s/nexora/blob/main/backend/app/main.py"
click node_analyze "https://github.com/ragulgandhi-s/nexora/blob/main/backend/app/routes/analyze.py"
click node_upload "https://github.com/ragulgandhi-s/nexora/blob/main/backend/app/routes/upload.py"
click node_simulate "https://github.com/ragulgandhi-s/nexora/blob/main/backend/app/routes/simulate.py"
click node_ocr "https://github.com/ragulgandhi-s/nexora/blob/main/backend/app/ocr/text_extractor.py"
click node_extractor "https://github.com/ragulgandhi-s/nexora/blob/main/backend/app/ai/extractor.py"
click node_emailcheck "https://github.com/ragulgandhi-s/nexora/blob/main/backend/app/verification/email_check.py"
click node_urlcheck "https://github.com/ragulgandhi-s/nexora/blob/main/backend/app/verification/url_check.py"
click node_companycheck "https://github.com/ragulgandhi-s/nexora/blob/main/backend/app/verification/company_check.py"
click node_consistency "https://github.com/ragulgandhi-s/nexora/blob/main/backend/app/trust_graph/consistency.py"
click node_risk "https://github.com/ragulgandhi-s/nexora/blob/main/backend/app/ai/risk_engine.py"
click node_graphbuild "https://github.com/ragulgandhi-s/nexora/blob/main/backend/app/trust_graph/graph_builder.py"
click node_result "https://github.com/ragulgandhi-s/nexora/blob/main/frontend/src/pages/Result.jsx"
click node_trustui "https://github.com/ragulgandhi-s/nexora/blob/main/frontend/src/components/TrustGraph.jsx"
click node_scoreui "https://github.com/ragulgandhi-s/nexora/blob/main/frontend/src/components/RiskScore.jsx"
click node_labelui "https://github.com/ragulgandhi-s/nexora/blob/main/frontend/src/components/SafetyLabel.jsx"
click node_factors "https://github.com/ragulgandhi-s/nexora/blob/main/frontend/src/components/RiskFactors.jsx"
click node_evidence "https://github.com/ragulgandhi-s/nexora/blob/main/frontend/src/components/EvidenceCard.jsx"
click node_simui "https://github.com/ragulgandhi-s/nexora/blob/main/frontend/src/components/RiskSimulator.jsx"
click node_plan "https://github.com/ragulgandhi-s/nexora/blob/main/frontend/src/components/ActionPlan.jsx"

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_entry,node_home,node_input,node_uploadui toneBlue
class node_client,node_server,node_analyze,node_upload,node_simulate toneAmber
class node_ocr,node_extractor,node_risk,node_graphbuild toneMint
class node_emailcheck,node_urlcheck,node_companycheck,node_consistency toneRose
class node_result,node_trustui,node_scoreui,node_labelui,node_factors,node_evidence,node_simui,node_plan,node_user toneIndigo
```

## Components

### User interface

- [Application shell](https://github.com/ragulgandhi-s/nexora/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [React entry](https://github.com/ragulgandhi-s/nexora/blob/main/frontend/src/main.jsx): `frontend/src/main.jsx`
- [Opportunity input](https://github.com/ragulgandhi-s/nexora/blob/main/frontend/src/pages/Home.jsx): `frontend/src/pages/Home.jsx`
- [Text and upload controls](https://github.com/ragulgandhi-s/nexora/blob/main/frontend/src/components/OpportunityInput.jsx): `frontend/src/components/OpportunityInput.jsx`
- [Screenshot upload](https://github.com/ragulgandhi-s/nexora/blob/main/frontend/src/components/UploadScreenshot.jsx): `frontend/src/components/UploadScreenshot.jsx`

### API and intake

- [HTTP API client](https://github.com/ragulgandhi-s/nexora/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`
- [FastAPI application](https://github.com/ragulgandhi-s/nexora/blob/main/backend/app/main.py): `backend/app/main.py`
- [Opportunity analysis route](https://github.com/ragulgandhi-s/nexora/blob/main/backend/app/routes/analyze.py): `backend/app/routes/analyze.py`
- [File intake route](https://github.com/ragulgandhi-s/nexora/blob/main/backend/app/routes/upload.py): `backend/app/routes/upload.py`
- [Simulation route](https://github.com/ragulgandhi-s/nexora/blob/main/backend/app/routes/simulate.py): `backend/app/routes/simulate.py`

### Assessment engine

- [Screenshot text extraction](https://github.com/ragulgandhi-s/nexora/blob/main/backend/app/ocr/text_extractor.py): `backend/app/ocr/text_extractor.py`
- [Opportunity entity extraction](https://github.com/ragulgandhi-s/nexora/blob/main/backend/app/ai/extractor.py): `backend/app/ai/extractor.py`
- [Risk scoring](https://github.com/ragulgandhi-s/nexora/blob/main/backend/app/ai/risk_engine.py): `backend/app/ai/risk_engine.py`
- [Trust graph construction](https://github.com/ragulgandhi-s/nexora/blob/main/backend/app/trust_graph/graph_builder.py): `backend/app/trust_graph/graph_builder.py`

### Verification

- [Email verification](https://github.com/ragulgandhi-s/nexora/blob/main/backend/app/verification/email_check.py): `backend/app/verification/email_check.py`
- [Website verification](https://github.com/ragulgandhi-s/nexora/blob/main/backend/app/verification/url_check.py): `backend/app/verification/url_check.py`
- [Company verification](https://github.com/ragulgandhi-s/nexora/blob/main/backend/app/verification/company_check.py): `backend/app/verification/company_check.py`
- [Cross-field consistency](https://github.com/ragulgandhi-s/nexora/blob/main/backend/app/trust_graph/consistency.py): `backend/app/trust_graph/consistency.py`

### Results and simulation

- [Assessment results page](https://github.com/ragulgandhi-s/nexora/blob/main/frontend/src/pages/Result.jsx): `frontend/src/pages/Result.jsx`
- [Trust graph display](https://github.com/ragulgandhi-s/nexora/blob/main/frontend/src/components/TrustGraph.jsx): `frontend/src/components/TrustGraph.jsx`
- [Risk score display](https://github.com/ragulgandhi-s/nexora/blob/main/frontend/src/components/RiskScore.jsx): `frontend/src/components/RiskScore.jsx`
- [Safety label](https://github.com/ragulgandhi-s/nexora/blob/main/frontend/src/components/SafetyLabel.jsx): `frontend/src/components/SafetyLabel.jsx`
- [Warnings and evidence](https://github.com/ragulgandhi-s/nexora/blob/main/frontend/src/components/RiskFactors.jsx): `frontend/src/components/RiskFactors.jsx`
- [Evidence card](https://github.com/ragulgandhi-s/nexora/blob/main/frontend/src/components/EvidenceCard.jsx): `frontend/src/components/EvidenceCard.jsx`
- [Risk simulator](https://github.com/ragulgandhi-s/nexora/blob/main/frontend/src/components/RiskSimulator.jsx): `frontend/src/components/RiskSimulator.jsx`
- [Action plan](https://github.com/ragulgandhi-s/nexora/blob/main/frontend/src/components/ActionPlan.jsx): `frontend/src/components/ActionPlan.jsx`

### Other components

- **Opportunity seeker**

## Connections

- Opportunity seeker → Application shell: submits opportunity (evidence: `frontend/src/App.jsx`)
- React entry → Application shell: renders (evidence: `frontend/src/main.jsx`)
- Application shell → Opportunity input: presents intake
- Opportunity input → Text and upload controls: collects text
- Opportunity input → Screenshot upload: offers upload
- HTTP API client → Opportunity analysis route: POSTs text (evidence: `frontend/src/services/api.js`)
- HTTP API client → File intake route: uploads file
- HTTP API client → Simulation route: requests simulation (evidence: `frontend/src/services/api.js`)
- FastAPI application → Opportunity analysis route: registers router (evidence: `backend/app/main.py`)
- FastAPI application → File intake route: registers router (evidence: `backend/app/main.py`)
- FastAPI application → Simulation route: registers router (evidence: `backend/app/main.py`)
- File intake route → Opportunity analysis route: analyzes extracted text (evidence: `backend/app/routes/upload.py`)
- File intake route → Screenshot text extraction: extracts image text
- Opportunity analysis route → Opportunity entity extraction: extracts entities (evidence: `backend/app/routes/analyze.py`)
- Opportunity analysis route → Email verification: verifies email (evidence: `backend/app/routes/analyze.py`)
- Opportunity analysis route → Website verification: verifies website (evidence: `backend/app/routes/analyze.py`)
- Opportunity analysis route → Company verification: checks company (evidence: `backend/app/routes/analyze.py`)
- Opportunity analysis route → Cross-field consistency: checks consistency (evidence: `backend/app/routes/analyze.py`)
- Opportunity analysis route → Risk scoring: scores warnings (evidence: `backend/app/routes/analyze.py`)
- Opportunity analysis route → Trust graph construction: builds trust graph (evidence: `backend/app/routes/analyze.py`)
- Assessment results page → HTTP API client: requests simulation (evidence: `frontend/src/pages/Result.jsx`)
- Assessment results page → Trust graph display: renders graph (evidence: `frontend/src/pages/Result.jsx`)
- Assessment results page → Risk score display: renders score (evidence: `frontend/src/pages/Result.jsx`)
- Assessment results page → Safety label: renders label (evidence: `frontend/src/pages/Result.jsx`)
- Assessment results page → Warnings and evidence: renders warnings (evidence: `frontend/src/pages/Result.jsx`)
- Assessment results page → Evidence card: renders evidence (evidence: `frontend/src/pages/Result.jsx`)
- Assessment results page → Risk simulator: renders simulator (evidence: `frontend/src/pages/Result.jsx`)
- Assessment results page → Action plan: renders recommendations (evidence: `frontend/src/pages/Result.jsx`)
