# databoar/data-boar architecture

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

- Interactive diagram: https://gitdiagram.com/databoar/data-boar
- Repository: https://github.com/databoar/data-boar

## Overview

Data Boar discovers sensitive data across configured enterprise sources, classifies findings, persists session evidence, and presents governance-oriented reports through a CLI or dashboard. The principal scan path is represented by the documented engine responsibilities; connector and scanner internals were not fully sampled, so uncertain internal handoffs are kept broad. README capabilities such as rich-media scanning, risk recommendations, and compliance exports are retained as distinct branches. The map excludes delivery and test tooling.

Main entry points: [`core/engine.py`](https://github.com/databoar/data-boar/blob/main/core/engine.py) (Audit engine), [`core/database.py`](https://github.com/databoar/data-boar/blob/main/core/database.py) (Audit results store), [`report/generator.py`](https://github.com/databoar/data-boar/blob/main/report/generator.py) (Report generation), [`main.py`](https://github.com/databoar/data-boar/blob/main/main.py) (CLI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User interfaces"]
  node_cli["CLI<br/>[main.py]"]
  node_dashboard["Dashboard API<br/>[routes.py]"]
  node_passkeys["WebAuthn sign-in<br/>[webauthn_routes.py]"]
end

subgraph group_scan["Discovery and scanning"]
  node_engine["Audit engine<br/>[engine.py]"]
  node_config["Config loading<br/>[loader.py]"]
  node_orchestrator["Discovery orchestration"]
  node_scanner["Data scanner<br/>[scanner.py]"]
  node_detector["Sensitivity detection<br/>[detector.py]"]
  node_media["Media extraction<br/>[text_extractor.py]"]
end

subgraph group_sources["Data sources"]
  node_registry["Connector registry"]
  node_connectors["Source connectors"]
end

subgraph group_governance["Risk and reporting"]
  node_recommendations["Risk recommendations<br/>[recommendations.py]"]
  node_reporting["Report generation<br/>[generator.py]"]
  node_governance_reports["Governance exports"]
  node_dashboard_model["Dashboard model"]
end

subgraph group_state["Audit state"]
  node_store[("Audit results store<br/>[database.py]")]
  node_audit_log["Scan audit log<br/>[scan_audit_log.py]"]
end

node_operator(("Operator"))
node_sources_external[("Configured data sources")]

node_operator -->|"runs scans"| node_cli
node_operator -->|"uses dashboard"| node_dashboard
node_cli -->|"loads settings"| node_config
node_dashboard -->|"starts scans"| node_engine
node_cli -->|"starts scans"| node_engine
node_engine -->|"uses settings"| node_config
node_engine -->|"dispatches targets"| node_orchestrator
node_engine -->|"uses scanner"| node_scanner
node_orchestrator -->|"resolves connectors"| node_registry
node_registry -->|"selects connector"| node_connectors
node_connectors -->|"reads metadata"| node_sources_external
node_scanner -->|"classifies content"| node_detector
node_scanner -->|"extracts media text"| node_media
node_engine -->|"persists findings"| node_store
node_engine -->|"records scan activity"| node_audit_log
node_reporting -->|"reads findings"| node_store
node_reporting -->|"adds guidance"| node_recommendations
node_reporting -->|"renders governance outputs"| node_governance_reports
node_dashboard -->|"presents scan data"| node_dashboard_model
node_dashboard_model -->|"reads session data"| node_store
node_passkeys -->|"stores credentials"| node_store

click node_cli "https://github.com/databoar/data-boar/blob/main/main.py"
click node_dashboard "https://github.com/databoar/data-boar/blob/main/api/routes.py"
click node_engine "https://github.com/databoar/data-boar/blob/main/core/engine.py"
click node_config "https://github.com/databoar/data-boar/blob/main/config/loader.py"
click node_orchestrator "https://github.com/databoar/data-boar/blob/main/core/discovery_orchestrator.py"
click node_scanner "https://github.com/databoar/data-boar/blob/main/core/scanner.py"
click node_detector "https://github.com/databoar/data-boar/blob/main/core/detector.py"
click node_media "https://github.com/databoar/data-boar/blob/main/file_scan/text_extractor.py"
click node_registry "https://github.com/databoar/data-boar/blob/main/core/connector_registry.py"
click node_connectors "https://github.com/databoar/data-boar/tree/main/connectors"
click node_recommendations "https://github.com/databoar/data-boar/blob/main/core/recommendations.py"
click node_reporting "https://github.com/databoar/data-boar/blob/main/report/generator.py"
click node_governance_reports "https://github.com/databoar/data-boar/blob/main/report/governance_report.py"
click node_dashboard_model "https://github.com/databoar/data-boar/blob/main/app/grc_dashboard_model.py"
click node_store "https://github.com/databoar/data-boar/blob/main/core/database.py"
click node_audit_log "https://github.com/databoar/data-boar/blob/main/core/scan_audit_log.py"
click node_passkeys "https://github.com/databoar/data-boar/blob/main/api/webauthn_routes.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_cli,node_dashboard,node_passkeys toneBlue
class node_engine,node_config,node_orchestrator,node_scanner,node_detector,node_media,node_sources_external toneAmber
class node_registry,node_connectors toneMint
class node_recommendations,node_reporting,node_governance_reports,node_dashboard_model toneRose
class node_store,node_audit_log,node_operator toneIndigo
```

## Components

### User interfaces

- [CLI](https://github.com/databoar/data-boar/blob/main/main.py): `main.py`
- [Dashboard API](https://github.com/databoar/data-boar/blob/main/api/routes.py): `api/routes.py`
- [WebAuthn sign-in](https://github.com/databoar/data-boar/blob/main/api/webauthn_routes.py): `api/webauthn_routes.py`

### Discovery and scanning

- [Audit engine](https://github.com/databoar/data-boar/blob/main/core/engine.py): `core/engine.py`
- [Config loading](https://github.com/databoar/data-boar/blob/main/config/loader.py): `config/loader.py`
- [Discovery orchestration](https://github.com/databoar/data-boar/blob/main/core/discovery_orchestrator.py): `core/discovery_orchestrator.py`
- [Data scanner](https://github.com/databoar/data-boar/blob/main/core/scanner.py): `core/scanner.py`
- [Sensitivity detection](https://github.com/databoar/data-boar/blob/main/core/detector.py): `core/detector.py`
- [Media extraction](https://github.com/databoar/data-boar/blob/main/file_scan/text_extractor.py): `file_scan/text_extractor.py`

### Data sources

- [Connector registry](https://github.com/databoar/data-boar/blob/main/core/connector_registry.py): `core/connector_registry.py`
- [Source connectors](https://github.com/databoar/data-boar/tree/main/connectors): `connectors`

### Risk and reporting

- [Risk recommendations](https://github.com/databoar/data-boar/blob/main/core/recommendations.py): `core/recommendations.py`
- [Report generation](https://github.com/databoar/data-boar/blob/main/report/generator.py): `report/generator.py`
- [Governance exports](https://github.com/databoar/data-boar/blob/main/report/governance_report.py): `report/governance_report.py`
- [Dashboard model](https://github.com/databoar/data-boar/blob/main/app/grc_dashboard_model.py): `app/grc_dashboard_model.py`

### Audit state

- [Audit results store](https://github.com/databoar/data-boar/blob/main/core/database.py): `core/database.py`
- [Scan audit log](https://github.com/databoar/data-boar/blob/main/core/scan_audit_log.py): `core/scan_audit_log.py`

### Other components

- **Operator**
- **Configured data sources**

## Connections

- Operator → CLI: runs scans
- Operator → Dashboard API: uses dashboard
- CLI → Config loading: loads settings
- Dashboard API → Audit engine: starts scans
- CLI → Audit engine: starts scans
- Audit engine → Config loading: uses settings
- Audit engine → Discovery orchestration: dispatches targets
- Audit engine → Data scanner: uses scanner
- Discovery orchestration → Connector registry: resolves connectors
- Connector registry → Source connectors: selects connector
- Source connectors → Configured data sources: reads metadata
- Data scanner → Sensitivity detection: classifies content
- Data scanner → Media extraction: extracts media text
- Audit engine → Audit results store: persists findings
- Audit engine → Scan audit log: records scan activity
- Report generation → Audit results store: reads findings
- Report generation → Risk recommendations: adds guidance
- Report generation → Governance exports: renders governance outputs
- Dashboard API → Dashboard model: presents scan data
- Dashboard model → Audit results store: reads session data
- WebAuthn sign-in → Audit results store: stores credentials
