# tanishkempegowda/veriq-bootstrap architecture

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

- Interactive diagram: https://gitdiagram.com/tanishkempegowda/veriq-bootstrap
- Repository: https://github.com/tanishkempegowda/veriq-bootstrap

## Overview

VERIQ is a Streamlit compliance-audit application: auditors extract requirements from policy PDFs, compare evidence against selected rules, log findings, and retain or replay cases through Hindsight. The dashboard summarizes structured audit records. The page implementations often call Groq and Hindsight directly; separate service modules also exist, but the sampled pages do not import them. The graph follows those observed calls and README capabilities; unsampled behavior is not inferred.

Main entry points: [`pages/2_Gap_Detection.py`](https://github.com/tanishkempegowda/veriq-bootstrap/blob/main/pages/2_Gap_Detection.py) (Gap Detection), [`database/db.py`](https://github.com/tanishkempegowda/veriq-bootstrap/blob/main/database/db.py) (SQLite Access), [`pages/1_Document_Analysis.py`](https://github.com/tanishkempegowda/veriq-bootstrap/blob/main/pages/1_Document_Analysis.py) (Policy Analysis), [`app.py`](https://github.com/tanishkempegowda/veriq-bootstrap/blob/main/app.py) (Compliance Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Audit Workflow"]
  node_document["Policy Analysis"]
  node_policy_pdf["PDF Text Extraction"]
  node_gap["Gap Detection<br/>[2_Gap_Detection.py]"]
  node_evidence["Evidence Extraction<br/>[2_Gap_Detection.py]"]
  node_memory_replay["Memory Replay<br/>[3_Memory_Replay.py]"]
end

subgraph group_ai["AI Services"]
  node_groq{{"Groq LLM"}}
  node_hindsight[("Hindsight Memory")]
end

subgraph group_state["Audit State"]
  node_db_api["SQLite Access<br/>[db.py]"]
  node_audit_db[("Audit Records<br/>[db.py]")]
end

subgraph group_ui["Application UI"]
  node_dashboard["Compliance Dashboard<br/>[app.py]"]
end

node_auditor(("Auditor"))

node_auditor -->|"opens"| node_dashboard
node_dashboard -->|"queries counts"| node_db_api
node_document -->|"extracts text"| node_policy_pdf
node_document -->|"extracts rules"| node_groq
node_document -->|"saves policy"| node_db_api
node_db_api -->|"reads and writes"| node_audit_db
node_gap -->|"loads policies"| node_db_api
node_gap -->|"extracts evidence"| node_evidence
node_gap -->|"assesses evidence"| node_groq
node_gap -->|"logs findings"| node_db_api
node_gap -->|"retains finding"| node_hindsight
node_memory_replay -->|"recalls cases"| node_hindsight

click node_dashboard "https://github.com/tanishkempegowda/veriq-bootstrap/blob/main/app.py"
click node_document "https://github.com/tanishkempegowda/veriq-bootstrap/blob/main/pages/1_Document_Analysis.py"
click node_policy_pdf "https://github.com/tanishkempegowda/veriq-bootstrap/blob/main/pages/1_Document_Analysis.py"
click node_gap "https://github.com/tanishkempegowda/veriq-bootstrap/blob/main/pages/2_Gap_Detection.py"
click node_evidence "https://github.com/tanishkempegowda/veriq-bootstrap/blob/main/pages/2_Gap_Detection.py"
click node_memory_replay "https://github.com/tanishkempegowda/veriq-bootstrap/blob/main/pages/3_Memory_Replay.py"
click node_db_api "https://github.com/tanishkempegowda/veriq-bootstrap/blob/main/database/db.py"
click node_audit_db "https://github.com/tanishkempegowda/veriq-bootstrap/blob/main/database/db.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_document,node_policy_pdf,node_gap,node_evidence,node_memory_replay toneBlue
class node_groq,node_hindsight toneAmber
class node_db_api,node_audit_db toneMint
class node_dashboard toneRose
class node_auditor toneIndigo
```

## Components

### Audit Workflow

- [Policy Analysis](https://github.com/tanishkempegowda/veriq-bootstrap/blob/main/pages/1_Document_Analysis.py): `pages/1_Document_Analysis.py`
- [PDF Text Extraction](https://github.com/tanishkempegowda/veriq-bootstrap/blob/main/pages/1_Document_Analysis.py): `pages/1_Document_Analysis.py`
- [Gap Detection](https://github.com/tanishkempegowda/veriq-bootstrap/blob/main/pages/2_Gap_Detection.py): `pages/2_Gap_Detection.py`
- [Evidence Extraction](https://github.com/tanishkempegowda/veriq-bootstrap/blob/main/pages/2_Gap_Detection.py): `pages/2_Gap_Detection.py`
- [Memory Replay](https://github.com/tanishkempegowda/veriq-bootstrap/blob/main/pages/3_Memory_Replay.py): `pages/3_Memory_Replay.py`

### AI Services

- **Groq LLM**
- **Hindsight Memory**

### Audit State

- [SQLite Access](https://github.com/tanishkempegowda/veriq-bootstrap/blob/main/database/db.py): `database/db.py`
- [Audit Records](https://github.com/tanishkempegowda/veriq-bootstrap/blob/main/database/db.py): `database/db.py`

### Application UI

- [Compliance Dashboard](https://github.com/tanishkempegowda/veriq-bootstrap/blob/main/app.py): `app.py`

### Other components

- **Auditor**

## Connections

- Auditor → Compliance Dashboard: opens (evidence: `README.md`)
- Compliance Dashboard → SQLite Access: queries counts (evidence: `app.py`)
- Policy Analysis → PDF Text Extraction: extracts text (evidence: `pages/1_Document_Analysis.py`)
- Policy Analysis → Groq LLM: extracts rules (evidence: `pages/1_Document_Analysis.py`)
- Policy Analysis → SQLite Access: saves policy (evidence: `pages/1_Document_Analysis.py`)
- SQLite Access → Audit Records: reads and writes (evidence: `database/db.py`)
- Gap Detection → SQLite Access: loads policies (evidence: `pages/2_Gap_Detection.py`)
- Gap Detection → Evidence Extraction: extracts evidence (evidence: `pages/2_Gap_Detection.py`)
- Gap Detection → Groq LLM: assesses evidence (evidence: `pages/2_Gap_Detection.py`)
- Gap Detection → SQLite Access: logs findings (evidence: `pages/2_Gap_Detection.py`)
- Gap Detection → Hindsight Memory: retains finding (evidence: `pages/2_Gap_Detection.py`)
- Memory Replay → Hindsight Memory: recalls cases (evidence: `pages/3_Memory_Replay.py`)
