# nourenzi/trench-link-guard architecture

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

- Interactive diagram: https://gitdiagram.com/nourenzi/trench-link-guard
- Repository: https://github.com/nourenzi/trench-link-guard

## Overview

Trench-Shield is documented as an Android link-interception app: a link from a third-party app is intercepted, scanned against cloud threat intelligence, then either opened in the browser or blocked with a warning. The README describes these runtime stages but the supplied tree contains no implementation sources, so component paths are null. Relationships shown are only those documented in the README; implementation details and exact call ownership cannot be verified.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interception["Link interception"]
  node_gatekeeper["Intent gatekeeper"]
  node_scan_activity["Scan activity"]
end

subgraph group_scanning["Threat scanning"]
  node_cloud_scanner["Cloud scanner"]
end

subgraph group_routing["Safe and unsafe routing"]
  node_routing_engine["Routing engine"]
  node_warning_activity["Warning activity"]
end

node_third_party_app(("Third-party app"))
node_android_system(("Android system"))
node_threat_api{{"Threat intelligence API"}}
node_default_browser(("Default browser"))

node_third_party_app -->|"sends link"| node_android_system
node_android_system -->|"dispatches intent"| node_gatekeeper
node_gatekeeper -->|"receives link"| node_scan_activity
node_scan_activity -->|"scans URL"| node_cloud_scanner
node_cloud_scanner -->|"checks reputation"| node_threat_api
node_scan_activity -->|"routes result"| node_routing_engine
node_routing_engine -->|"opens clean URL"| node_default_browser
node_routing_engine -->|"blocks malicious URL"| node_warning_activity

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_gatekeeper,node_scan_activity,node_default_browser toneBlue
class node_cloud_scanner toneAmber
class node_routing_engine,node_warning_activity,node_threat_api toneMint
class node_third_party_app,node_android_system toneIndigo
```

## Components

### Link interception

- **Intent gatekeeper**
- **Scan activity**

### Threat scanning

- **Cloud scanner**

### Safe and unsafe routing

- **Routing engine**
- **Warning activity**

### Other components

- **Third-party app**
- **Android system**
- **Threat intelligence API**
- **Default browser**

## Connections

- Third-party app → Android system: sends link (evidence: `README.md`)
- Android system → Intent gatekeeper: dispatches intent (evidence: `README.md`)
- Intent gatekeeper → Scan activity: receives link (evidence: `README.md`)
- Scan activity → Cloud scanner: scans URL (evidence: `README.md`)
- Cloud scanner → Threat intelligence API: checks reputation (evidence: `README.md`)
- Scan activity → Routing engine: routes result (evidence: `README.md`)
- Routing engine → Default browser: opens clean URL (evidence: `README.md`)
- Routing engine → Warning activity: blocks malicious URL (evidence: `README.md`)
