# wormless-framework/wormless-front architecture

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

- Interactive diagram: https://gitdiagram.com/wormless-framework/wormless-front
- Repository: https://github.com/wormless-framework/wormless-front

## Overview

Wormless Front is a React interface for the Wormless security-analysis API. Users sign in, then upload a file for analysis or submit a Git repository for triage and optionally a deeper scan; both analysis paths lead to a detailed forensic report. SOC users also have a role-restricted dashboard. The graph covers the visible routing, authentication, analysis, and report UI plus the API boundary. Unsampled dashboard and navigation details are limited to relationships documented by the source index.

Main entry points: [`src/App.tsx`](https://github.com/wormless-framework/wormless-front/blob/main/src/App.tsx) (Route shell), [`src/pages/UploadPage.tsx`](https://github.com/wormless-framework/wormless-front/blob/main/src/pages/UploadPage.tsx) (Upload page), [`src/pages/RelatorioDetalhado.tsx`](https://github.com/wormless-framework/wormless-front/blob/main/src/pages/RelatorioDetalhado.tsx) (Detailed report), [`src/pages/Login.tsx`](https://github.com/wormless-framework/wormless-front/blob/main/src/pages/Login.tsx) (Login page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and navigation"]
  node_app["Route shell<br/>[App.tsx]"]
  node_authguard["Role guard<br/>[RequireAuth.tsx]"]
  node_authcontext["Auth state<br/>[AuthContext.tsx]"]
  node_login["Login page<br/>[Login.tsx]"]
  node_authapi["Login service<br/>[auth.ts]"]
  node_httpclient["HTTP client<br/>[client.ts]"]
  node_dashboard["SOC dashboard<br/>[Dashboard.tsx]"]
end

subgraph group_analysis["Threat analysis"]
  node_upload["Upload page<br/>[UploadPage.tsx]"]
  node_dropzone["File dropzone<br/>[Dropzone.tsx]"]
  node_repo_triage["Repository triage<br/>[UploadPage.tsx]"]
  node_deep_scan["Repository deep scan<br/>[UploadPage.tsx]"]
  node_suspect_card["Suspect file card"]
end

subgraph group_reporting["Forensic reporting"]
  node_report_page["Detailed report"]
  node_severity["Severity badge<br/>[SeverityBadge.tsx]"]
  node_evidence["Evidence card<br/>[EvidenceCard.tsx]"]
end

subgraph group_shared["Shared interface"]
  node_header["Header<br/>[Header.tsx]"]
  node_sidebar["Sidebar<br/>[Sidebar.tsx]"]
  node_button["Action button<br/>[Button.tsx]"]
end

node_user(("User"))
node_wormlessapi["Wormless API"]

node_user -->|"enters credentials"| node_login
node_login -->|"submits login"| node_authapi
node_authapi -->|"sends request"| node_httpclient
node_httpclient -->|"calls API"| node_wormlessapi
node_login -->|"sets role"| node_authcontext
node_app -->|"guards routes"| node_authguard
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_upload
node_app -->|"routes to"| node_report_page
node_authguard -->|"checks role"| node_authcontext
node_app -->|"renders"| node_header
node_app -->|"renders"| node_sidebar
node_header -->|"reads auth state"| node_authcontext
node_sidebar -->|"reads auth state"| node_authcontext
node_upload -->|"renders"| node_dropzone
node_upload -->|"uploads file"| node_wormlessapi
node_upload -->|"submits repository"| node_repo_triage
node_repo_triage -->|"requests triage"| node_wormlessapi
node_repo_triage -->|"renders findings"| node_suspect_card
node_suspect_card -->|"starts scan"| node_deep_scan
node_deep_scan -->|"requests deep scan"| node_wormlessapi
node_upload -->|"navigates to report"| node_report_page
node_report_page -->|"fetches report"| node_wormlessapi
node_report_page -->|"renders severity"| node_severity
node_report_page -->|"renders evidence"| node_evidence
node_login -->|"renders"| node_button
node_upload -->|"renders"| node_button
node_report_page -->|"renders"| node_button

click node_app "https://github.com/wormless-framework/wormless-front/blob/main/src/App.tsx"
click node_authguard "https://github.com/wormless-framework/wormless-front/blob/main/src/components/RequireAuth.tsx"
click node_authcontext "https://github.com/wormless-framework/wormless-front/blob/main/src/context/AuthContext.tsx"
click node_login "https://github.com/wormless-framework/wormless-front/blob/main/src/pages/Login.tsx"
click node_authapi "https://github.com/wormless-framework/wormless-front/blob/main/src/api/auth.ts"
click node_httpclient "https://github.com/wormless-framework/wormless-front/blob/main/src/api/client.ts"
click node_dashboard "https://github.com/wormless-framework/wormless-front/blob/main/src/pages/Dashboard.tsx"
click node_header "https://github.com/wormless-framework/wormless-front/blob/main/src/components/Header.tsx"
click node_sidebar "https://github.com/wormless-framework/wormless-front/blob/main/src/components/Sidebar.tsx"
click node_upload "https://github.com/wormless-framework/wormless-front/blob/main/src/pages/UploadPage.tsx"
click node_dropzone "https://github.com/wormless-framework/wormless-front/blob/main/src/components/Dropzone.tsx"
click node_repo_triage "https://github.com/wormless-framework/wormless-front/blob/main/src/pages/UploadPage.tsx"
click node_deep_scan "https://github.com/wormless-framework/wormless-front/blob/main/src/pages/UploadPage.tsx"
click node_suspect_card "https://github.com/wormless-framework/wormless-front/blob/main/src/components/ArquivoSuspeitoCard.tsx"
click node_report_page "https://github.com/wormless-framework/wormless-front/blob/main/src/pages/RelatorioDetalhado.tsx"
click node_severity "https://github.com/wormless-framework/wormless-front/blob/main/src/components/SeverityBadge.tsx"
click node_evidence "https://github.com/wormless-framework/wormless-front/blob/main/src/components/EvidenceCard.tsx"
click node_button "https://github.com/wormless-framework/wormless-front/blob/main/src/components/Button.tsx"

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_authguard,node_authcontext,node_login,node_authapi,node_httpclient,node_dashboard,node_user toneBlue
class node_upload,node_dropzone,node_repo_triage,node_deep_scan,node_suspect_card toneAmber
class node_report_page,node_severity,node_evidence,node_wormlessapi toneMint
class node_header,node_sidebar,node_button toneRose
```

## Components

### Access and navigation

- [Route shell](https://github.com/wormless-framework/wormless-front/blob/main/src/App.tsx): `src/App.tsx`
- [Role guard](https://github.com/wormless-framework/wormless-front/blob/main/src/components/RequireAuth.tsx): `src/components/RequireAuth.tsx`
- [Auth state](https://github.com/wormless-framework/wormless-front/blob/main/src/context/AuthContext.tsx): `src/context/AuthContext.tsx`
- [Login page](https://github.com/wormless-framework/wormless-front/blob/main/src/pages/Login.tsx): `src/pages/Login.tsx`
- [Login service](https://github.com/wormless-framework/wormless-front/blob/main/src/api/auth.ts): `src/api/auth.ts`
- [HTTP client](https://github.com/wormless-framework/wormless-front/blob/main/src/api/client.ts): `src/api/client.ts`
- [SOC dashboard](https://github.com/wormless-framework/wormless-front/blob/main/src/pages/Dashboard.tsx): `src/pages/Dashboard.tsx`

### Threat analysis

- [Upload page](https://github.com/wormless-framework/wormless-front/blob/main/src/pages/UploadPage.tsx): `src/pages/UploadPage.tsx`
- [File dropzone](https://github.com/wormless-framework/wormless-front/blob/main/src/components/Dropzone.tsx): `src/components/Dropzone.tsx`
- [Repository triage](https://github.com/wormless-framework/wormless-front/blob/main/src/pages/UploadPage.tsx): `src/pages/UploadPage.tsx`
- [Repository deep scan](https://github.com/wormless-framework/wormless-front/blob/main/src/pages/UploadPage.tsx): `src/pages/UploadPage.tsx`
- [Suspect file card](https://github.com/wormless-framework/wormless-front/blob/main/src/components/ArquivoSuspeitoCard.tsx): `src/components/ArquivoSuspeitoCard.tsx`

### Forensic reporting

- [Detailed report](https://github.com/wormless-framework/wormless-front/blob/main/src/pages/RelatorioDetalhado.tsx): `src/pages/RelatorioDetalhado.tsx`
- [Severity badge](https://github.com/wormless-framework/wormless-front/blob/main/src/components/SeverityBadge.tsx): `src/components/SeverityBadge.tsx`
- [Evidence card](https://github.com/wormless-framework/wormless-front/blob/main/src/components/EvidenceCard.tsx): `src/components/EvidenceCard.tsx`

### Shared interface

- [Header](https://github.com/wormless-framework/wormless-front/blob/main/src/components/Header.tsx): `src/components/Header.tsx`
- [Sidebar](https://github.com/wormless-framework/wormless-front/blob/main/src/components/Sidebar.tsx): `src/components/Sidebar.tsx`
- [Action button](https://github.com/wormless-framework/wormless-front/blob/main/src/components/Button.tsx): `src/components/Button.tsx`

### Other components

- **User**
- **Wormless API**

## Connections

- User → Login page: enters credentials (evidence: `src/pages/Login.tsx`)
- Login page → Login service: submits login (evidence: `src/pages/Login.tsx`)
- Login service → HTTP client: sends request (evidence: `src/api/auth.ts`)
- HTTP client → Wormless API: calls API (evidence: `src/api/client.ts`)
- Login page → Auth state: sets role (evidence: `src/pages/Login.tsx`)
- Route shell → Role guard: guards routes (evidence: `src/App.tsx`)
- Route shell → Login page: routes to (evidence: `src/App.tsx`)
- Route shell → SOC dashboard: routes to (evidence: `src/App.tsx`)
- Route shell → Upload page: routes to (evidence: `src/App.tsx`)
- Route shell → Detailed report: routes to (evidence: `src/App.tsx`)
- Role guard → Auth state: checks role (evidence: `src/components/RequireAuth.tsx`)
- Route shell → Header: renders (evidence: `src/App.tsx`)
- Route shell → Sidebar: renders (evidence: `src/App.tsx`)
- Header → Auth state: reads auth state (evidence: `src/components/Header.tsx`)
- Sidebar → Auth state: reads auth state (evidence: `src/components/Sidebar.tsx`)
- Upload page → File dropzone: renders (evidence: `src/pages/UploadPage.tsx`)
- Upload page → Wormless API: uploads file (evidence: `src/pages/UploadPage.tsx`)
- Upload page → Repository triage: submits repository (evidence: `src/pages/UploadPage.tsx`)
- Repository triage → Wormless API: requests triage (evidence: `src/pages/UploadPage.tsx`)
- Repository triage → Suspect file card: renders findings (evidence: `src/pages/UploadPage.tsx`)
- Suspect file card → Repository deep scan: starts scan (evidence: `src/pages/UploadPage.tsx`)
- Repository deep scan → Wormless API: requests deep scan (evidence: `src/pages/UploadPage.tsx`)
- Upload page → Detailed report: navigates to report (evidence: `src/pages/UploadPage.tsx`)
- Detailed report → Wormless API: fetches report (evidence: `src/pages/RelatorioDetalhado.tsx`)
- Detailed report → Severity badge: renders severity (evidence: `src/pages/RelatorioDetalhado.tsx`)
- Detailed report → Evidence card: renders evidence (evidence: `src/pages/RelatorioDetalhado.tsx`)
- Login page → Action button: renders (evidence: `src/pages/Login.tsx`)
- Upload page → Action button: renders (evidence: `src/pages/UploadPage.tsx`)
- Detailed report → Action button: renders (evidence: `src/pages/RelatorioDetalhado.tsx`)
