# chaitanya2850/containershield_updated architecture

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

- Interactive diagram: https://gitdiagram.com/chaitanya2850/containershield_updated
- Repository: https://github.com/chaitanya2850/containershield_updated

## Overview

ContainerShield is a Docker security-analysis dashboard frontend. Users inspect Docker containers and images, launch image or Java source scans, review stored findings, and investigate runtime and attack-surface risks; the assistant queries existing findings rather than starting scans. The graph captures documented analysis capabilities even though their backend implementation is outside this repository excerpt. Evidence is limited to README statements and frontend files listed as read or excerpted in the source index.

Main entry points: [`frontend/src/App.jsx`](https://github.com/chaitanya2850/containershield_updated/blob/main/frontend/src/App.jsx) (Routed application), [`frontend/src/services/dockerService.js`](https://github.com/chaitanya2850/containershield_updated/blob/main/frontend/src/services/dockerService.js) (Docker access), [`frontend/src/services/scanService.js`](https://github.com/chaitanya2850/containershield_updated/blob/main/frontend/src/services/scanService.js) (Scan access), [`frontend/src/pages/NewScan.jsx`](https://github.com/chaitanya2850/containershield_updated/blob/main/frontend/src/pages/NewScan.jsx) (Image scan intake)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application shell"]
  node_app["Routed application<br/>[App.jsx]"]
  node_api["HTTP client<br/>[api.js]"]
end

subgraph group_inspection["Docker inspection"]
  node_dashboard["Security dashboard<br/>[Dashboard.jsx]"]
  node_containers["Container inventory<br/>[Containers.jsx]"]
  node_container_details["Container details"]
  node_images["Image inventory<br/>[Images.jsx]"]
  node_image_details["Image details<br/>[ImageDetails.jsx]"]
  node_docker_service["Docker access<br/>[dockerService.js]"]
end

subgraph group_scanning["Security scanning"]
  node_new_scan["Image scan intake<br/>[NewScan.jsx]"]
  node_scan_history["Scan history<br/>[ScanHistory.jsx]"]
  node_scan_details["Image findings<br/>[ScanDetails.jsx]"]
  node_scan_service["Scan access<br/>[scanService.js]"]
  node_source_scanner["Java source scan<br/>[SourceScanner.jsx]"]
  node_source_details["Source findings"]
end

subgraph group_risk["Risk analysis"]
  node_runtime["Runtime configuration audit"]
  node_security_analysis["Attack surface and risk"]
  node_attack_service["Risk analysis access"]
end

subgraph group_investigation["Investigation"]
  node_assistant["AI investigation<br/>[Assistant.jsx]"]
  node_chat_service["Assistant access<br/>[chatService.js]"]
end

node_user(("Security operator"))
node_backend["ContainerShield backend"]
node_docker["Docker daemon"]
node_trivy["Trivy scanner"]
node_semgrep["Semgrep analyzer"]
node_ollama["Ollama model"]
node_postgres[("PostgreSQL findings store")]

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_containers
node_app -->|"routes to"| node_container_details
node_app -->|"routes to"| node_images
node_app -->|"routes to"| node_image_details
node_app -->|"routes to"| node_new_scan
node_app -->|"routes to"| node_scan_history
node_app -->|"routes to"| node_scan_details
node_app -->|"routes to"| node_source_scanner
node_app -->|"routes to"| node_source_details
node_app -->|"routes to"| node_runtime
node_app -->|"routes to"| node_security_analysis
node_app -->|"routes to"| node_assistant
node_dashboard -->|"requests inventory"| node_docker_service
node_containers -->|"requests containers"| node_docker_service
node_container_details -->|"requests details"| node_docker_service
node_image_details -->|"requests findings"| node_scan_service
node_new_scan -->|"selects images"| node_docker_service
node_new_scan -->|"requests image scan"| node_trivy
node_scan_history -->|"loads history"| node_scan_service
node_scan_details -->|"loads findings"| node_scan_service
node_source_scanner -->|"requests source analysis"| node_semgrep
node_runtime -.->|"requests audit"| node_backend
node_security_analysis -->|"loads risk analysis"| node_attack_service
node_assistant -->|"asks question"| node_chat_service
node_assistant -->|"loads stored scans"| node_scan_service
node_docker_service -->|"sends requests"| node_api
node_scan_service -->|"sends requests"| node_api
node_attack_service -->|"sends requests"| node_api
node_docker_service -->|"requests Docker data"| node_backend
node_scan_service -->|"requests scan data"| node_backend
node_attack_service -->|"requests risk results"| node_backend
node_chat_service -.->|"requests investigation"| node_backend
node_backend -->|"inspects resources"| node_docker
node_backend -->|"scans images"| node_trivy
node_backend -->|"analyzes Java"| node_semgrep
node_backend -->|"sends finding context"| node_ollama
node_backend -->|"persists findings"| node_postgres

click node_app "https://github.com/chaitanya2850/containershield_updated/blob/main/frontend/src/App.jsx"
click node_dashboard "https://github.com/chaitanya2850/containershield_updated/blob/main/frontend/src/pages/Dashboard.jsx"
click node_containers "https://github.com/chaitanya2850/containershield_updated/blob/main/frontend/src/pages/Containers.jsx"
click node_container_details "https://github.com/chaitanya2850/containershield_updated/blob/main/frontend/src/pages/ContainerDetails.jsx"
click node_images "https://github.com/chaitanya2850/containershield_updated/blob/main/frontend/src/pages/Images.jsx"
click node_image_details "https://github.com/chaitanya2850/containershield_updated/blob/main/frontend/src/pages/ImageDetails.jsx"
click node_docker_service "https://github.com/chaitanya2850/containershield_updated/blob/main/frontend/src/services/dockerService.js"
click node_new_scan "https://github.com/chaitanya2850/containershield_updated/blob/main/frontend/src/pages/NewScan.jsx"
click node_scan_history "https://github.com/chaitanya2850/containershield_updated/blob/main/frontend/src/pages/ScanHistory.jsx"
click node_scan_details "https://github.com/chaitanya2850/containershield_updated/blob/main/frontend/src/pages/ScanDetails.jsx"
click node_scan_service "https://github.com/chaitanya2850/containershield_updated/blob/main/frontend/src/services/scanService.js"
click node_source_scanner "https://github.com/chaitanya2850/containershield_updated/blob/main/frontend/src/pages/SourceScanner.jsx"
click node_source_details "https://github.com/chaitanya2850/containershield_updated/blob/main/frontend/src/pages/SourceScanDetails.jsx"
click node_runtime "https://github.com/chaitanya2850/containershield_updated/blob/main/frontend/src/pages/RuntimeSecurity.jsx"
click node_security_analysis "https://github.com/chaitanya2850/containershield_updated/blob/main/frontend/src/pages/SecurityAnalysis.jsx"
click node_attack_service "https://github.com/chaitanya2850/containershield_updated/blob/main/frontend/src/services/attackSurfaceService.js"
click node_assistant "https://github.com/chaitanya2850/containershield_updated/blob/main/frontend/src/pages/Assistant.jsx"
click node_chat_service "https://github.com/chaitanya2850/containershield_updated/blob/main/frontend/src/services/chatService.js"
click node_api "https://github.com/chaitanya2850/containershield_updated/blob/main/frontend/src/services/api.js"

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_api toneBlue
class node_dashboard,node_containers,node_container_details,node_images,node_image_details,node_docker_service,node_postgres toneAmber
class node_new_scan,node_scan_history,node_scan_details,node_scan_service,node_source_scanner,node_source_details toneMint
class node_runtime,node_security_analysis,node_attack_service toneRose
class node_assistant,node_chat_service,node_user,node_backend,node_docker,node_trivy,node_semgrep,node_ollama toneIndigo
```

## Components

### Application shell

- [Routed application](https://github.com/chaitanya2850/containershield_updated/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [HTTP client](https://github.com/chaitanya2850/containershield_updated/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`

### Docker inspection

- [Security dashboard](https://github.com/chaitanya2850/containershield_updated/blob/main/frontend/src/pages/Dashboard.jsx): `frontend/src/pages/Dashboard.jsx`
- [Container inventory](https://github.com/chaitanya2850/containershield_updated/blob/main/frontend/src/pages/Containers.jsx): `frontend/src/pages/Containers.jsx`
- [Container details](https://github.com/chaitanya2850/containershield_updated/blob/main/frontend/src/pages/ContainerDetails.jsx): `frontend/src/pages/ContainerDetails.jsx`
- [Image inventory](https://github.com/chaitanya2850/containershield_updated/blob/main/frontend/src/pages/Images.jsx): `frontend/src/pages/Images.jsx`
- [Image details](https://github.com/chaitanya2850/containershield_updated/blob/main/frontend/src/pages/ImageDetails.jsx): `frontend/src/pages/ImageDetails.jsx`
- [Docker access](https://github.com/chaitanya2850/containershield_updated/blob/main/frontend/src/services/dockerService.js): `frontend/src/services/dockerService.js`

### Security scanning

- [Image scan intake](https://github.com/chaitanya2850/containershield_updated/blob/main/frontend/src/pages/NewScan.jsx): `frontend/src/pages/NewScan.jsx`
- [Scan history](https://github.com/chaitanya2850/containershield_updated/blob/main/frontend/src/pages/ScanHistory.jsx): `frontend/src/pages/ScanHistory.jsx`
- [Image findings](https://github.com/chaitanya2850/containershield_updated/blob/main/frontend/src/pages/ScanDetails.jsx): `frontend/src/pages/ScanDetails.jsx`
- [Scan access](https://github.com/chaitanya2850/containershield_updated/blob/main/frontend/src/services/scanService.js): `frontend/src/services/scanService.js`
- [Java source scan](https://github.com/chaitanya2850/containershield_updated/blob/main/frontend/src/pages/SourceScanner.jsx): `frontend/src/pages/SourceScanner.jsx`
- [Source findings](https://github.com/chaitanya2850/containershield_updated/blob/main/frontend/src/pages/SourceScanDetails.jsx): `frontend/src/pages/SourceScanDetails.jsx`

### Risk analysis

- [Runtime configuration audit](https://github.com/chaitanya2850/containershield_updated/blob/main/frontend/src/pages/RuntimeSecurity.jsx): `frontend/src/pages/RuntimeSecurity.jsx`
- [Attack surface and risk](https://github.com/chaitanya2850/containershield_updated/blob/main/frontend/src/pages/SecurityAnalysis.jsx): `frontend/src/pages/SecurityAnalysis.jsx`
- [Risk analysis access](https://github.com/chaitanya2850/containershield_updated/blob/main/frontend/src/services/attackSurfaceService.js): `frontend/src/services/attackSurfaceService.js`

### Investigation

- [AI investigation](https://github.com/chaitanya2850/containershield_updated/blob/main/frontend/src/pages/Assistant.jsx): `frontend/src/pages/Assistant.jsx`
- [Assistant access](https://github.com/chaitanya2850/containershield_updated/blob/main/frontend/src/services/chatService.js): `frontend/src/services/chatService.js`

### Other components

- **Security operator**
- **ContainerShield backend**
- **Docker daemon**
- **Trivy scanner**
- **Semgrep analyzer**
- **Ollama model**
- **PostgreSQL findings store**

## Connections

- Security operator → Routed application: uses (evidence: `frontend/src/App.jsx`)
- Routed application → Security dashboard: routes to (evidence: `frontend/src/App.jsx`)
- Routed application → Container inventory: routes to (evidence: `frontend/src/App.jsx`)
- Routed application → Container details: routes to (evidence: `frontend/src/App.jsx`)
- Routed application → Image inventory: routes to (evidence: `frontend/src/App.jsx`)
- Routed application → Image details: routes to (evidence: `frontend/src/App.jsx`)
- Routed application → Image scan intake: routes to (evidence: `frontend/src/App.jsx`)
- Routed application → Scan history: routes to (evidence: `frontend/src/App.jsx`)
- Routed application → Image findings: routes to (evidence: `frontend/src/App.jsx`)
- Routed application → Java source scan: routes to (evidence: `frontend/src/App.jsx`)
- Routed application → Source findings: routes to (evidence: `frontend/src/App.jsx`)
- Routed application → Runtime configuration audit: routes to (evidence: `frontend/src/App.jsx`)
- Routed application → Attack surface and risk: routes to (evidence: `frontend/src/App.jsx`)
- Routed application → AI investigation: routes to (evidence: `frontend/src/App.jsx`)
- Security dashboard → Docker access: requests inventory (evidence: `frontend/src/pages/Dashboard.jsx`)
- Container inventory → Docker access: requests containers (evidence: `frontend/src/pages/Containers.jsx`)
- Container details → Docker access: requests details (evidence: `frontend/src/pages/ContainerDetails.jsx`)
- Image details → Scan access: requests findings (evidence: `frontend/src/pages/ImageDetails.jsx`)
- Image scan intake → Docker access: selects images (evidence: `frontend/src/pages/NewScan.jsx`)
- Image scan intake → Trivy scanner: requests image scan (evidence: `README.md`)
- Scan history → Scan access: loads history (evidence: `frontend/src/pages/ScanHistory.jsx`)
- Image findings → Scan access: loads findings (evidence: `frontend/src/pages/ScanDetails.jsx`)
- Java source scan → Semgrep analyzer: requests source analysis (evidence: `README.md`)
- Runtime configuration audit → ContainerShield backend: requests audit
- Attack surface and risk → Risk analysis access: loads risk analysis (evidence: `frontend/src/pages/SecurityAnalysis.jsx`)
- AI investigation → Assistant access: asks question (evidence: `frontend/src/pages/Assistant.jsx`)
- AI investigation → Scan access: loads stored scans (evidence: `frontend/src/pages/Assistant.jsx`)
- Docker access → HTTP client: sends requests (evidence: `frontend/src/services/dockerService.js`)
- Scan access → HTTP client: sends requests (evidence: `frontend/src/services/scanService.js`)
- Risk analysis access → HTTP client: sends requests (evidence: `frontend/src/services/attackSurfaceService.js`)
- Docker access → ContainerShield backend: requests Docker data (evidence: `frontend/src/services/dockerService.js`)
- Scan access → ContainerShield backend: requests scan data (evidence: `frontend/src/services/scanService.js`)
- Risk analysis access → ContainerShield backend: requests risk results (evidence: `frontend/src/services/attackSurfaceService.js`)
- Assistant access → ContainerShield backend: requests investigation
- ContainerShield backend → Docker daemon: inspects resources (evidence: `README.md`)
- ContainerShield backend → Trivy scanner: scans images (evidence: `README.md`)
- ContainerShield backend → Semgrep analyzer: analyzes Java (evidence: `README.md`)
- ContainerShield backend → Ollama model: sends finding context (evidence: `README.md`)
- ContainerShield backend → PostgreSQL findings store: persists findings (evidence: `README.md`)
