# malini170402/brand-monitoring architecture

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

- Interactive diagram: https://gitdiagram.com/malini170402/brand-monitoring
- Repository: https://github.com/malini170402/brand-monitoring

## Overview

This is a Streamlit brand-monitoring dashboard whose working workflow is settings → deterministic synthetic mentions and competitor estimates → scoring/report construction → interactive report and downloads. The README also describes filtering, sentiment/risk/topic summaries, and competitor benchmarks. Live collection is explicitly unimplemented; no platform data service is connected. Edges reflect calls visible in the excerpts or README; unsampled subsystems are not inferred.

Main entry points: [`brand_monitoring_app.py`](https://github.com/malini170402/brand-monitoring/blob/main/brand_monitoring_app.py) (Dashboard screens), [`backend.py`](https://github.com/malini170402/brand-monitoring/blob/main/backend.py) (Analysis orchestration), [`ui.py`](https://github.com/malini170402/brand-monitoring/blob/main/ui.py) (Shared UI components)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Dashboard workflow"]
  node_dashboard["Dashboard screens"]
  node_settings["Analysis settings"]
  node_report_view["Report and filters"]
  node_exports["CSV and Markdown exports"]
end

subgraph group_analysis["Analysis backend"]
  node_analysis_runner["Analysis orchestration<br/>[backend.py]"]
  node_sample_generator["Synthetic data<br/>[backend.py]"]
  node_live_provider["Live provider hook<br/>[backend.py]"]
  node_scoring["Sentiment and risk scoring<br/>[backend.py]"]
  node_report_builder["Report construction<br/>[backend.py]"]
  node_report_data["Analysis report<br/>[backend.py]"]
end

subgraph group_presentation["Reusable UI"]
  node_ui_helpers["Shared UI components<br/>[ui.py]"]
end

node_user(("Dashboard user"))
node_platform_services(("Social and web platforms"))

node_user -->|"configures"| node_dashboard
node_dashboard -->|"collects"| node_settings
node_dashboard -->|"renders with"| node_ui_helpers
node_dashboard -->|"runs"| node_analysis_runner
node_analysis_runner -->|"generates"| node_sample_generator
node_analysis_runner -->|"attempts"| node_live_provider
node_live_provider -.->|"would collect from"| node_platform_services
node_analysis_runner -->|"scores"| node_scoring
node_analysis_runner -->|"builds"| node_report_builder
node_report_builder -->|"returns"| node_report_data
node_dashboard -->|"displays"| node_report_view
node_dashboard -->|"downloads"| node_exports
node_report_view -->|"renders with"| node_ui_helpers
node_report_view -->|"reads"| node_report_data

click node_dashboard "https://github.com/malini170402/brand-monitoring/blob/main/brand_monitoring_app.py"
click node_settings "https://github.com/malini170402/brand-monitoring/blob/main/brand_monitoring_app.py"
click node_report_view "https://github.com/malini170402/brand-monitoring/blob/main/brand_monitoring_app.py"
click node_exports "https://github.com/malini170402/brand-monitoring/blob/main/brand_monitoring_app.py"
click node_analysis_runner "https://github.com/malini170402/brand-monitoring/blob/main/backend.py"
click node_sample_generator "https://github.com/malini170402/brand-monitoring/blob/main/backend.py"
click node_live_provider "https://github.com/malini170402/brand-monitoring/blob/main/backend.py"
click node_scoring "https://github.com/malini170402/brand-monitoring/blob/main/backend.py"
click node_report_builder "https://github.com/malini170402/brand-monitoring/blob/main/backend.py"
click node_report_data "https://github.com/malini170402/brand-monitoring/blob/main/backend.py"
click node_ui_helpers "https://github.com/malini170402/brand-monitoring/blob/main/ui.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_dashboard,node_settings,node_report_view,node_exports,node_user toneBlue
class node_analysis_runner,node_sample_generator,node_live_provider,node_scoring,node_report_builder,node_report_data toneAmber
class node_ui_helpers toneMint
class node_platform_services toneIndigo
```

## Components

### Dashboard workflow

- [Dashboard screens](https://github.com/malini170402/brand-monitoring/blob/main/brand_monitoring_app.py): `brand_monitoring_app.py`
- [Analysis settings](https://github.com/malini170402/brand-monitoring/blob/main/brand_monitoring_app.py): `brand_monitoring_app.py`
- [Report and filters](https://github.com/malini170402/brand-monitoring/blob/main/brand_monitoring_app.py): `brand_monitoring_app.py`
- [CSV and Markdown exports](https://github.com/malini170402/brand-monitoring/blob/main/brand_monitoring_app.py): `brand_monitoring_app.py`

### Analysis backend

- [Analysis orchestration](https://github.com/malini170402/brand-monitoring/blob/main/backend.py): `backend.py`
- [Synthetic data](https://github.com/malini170402/brand-monitoring/blob/main/backend.py): `backend.py`
- [Live provider hook](https://github.com/malini170402/brand-monitoring/blob/main/backend.py): `backend.py`
- [Sentiment and risk scoring](https://github.com/malini170402/brand-monitoring/blob/main/backend.py): `backend.py`
- [Report construction](https://github.com/malini170402/brand-monitoring/blob/main/backend.py): `backend.py`
- [Analysis report](https://github.com/malini170402/brand-monitoring/blob/main/backend.py): `backend.py`

### Reusable UI

- [Shared UI components](https://github.com/malini170402/brand-monitoring/blob/main/ui.py): `ui.py`

### Other components

- **Dashboard user**
- **Social and web platforms**

## Connections

- Dashboard user → Dashboard screens: configures (evidence: `brand_monitoring_app.py`)
- Dashboard screens → Analysis settings: collects (evidence: `brand_monitoring_app.py`)
- Dashboard screens → Shared UI components: renders with (evidence: `brand_monitoring_app.py`)
- Dashboard screens → Analysis orchestration: runs (evidence: `brand_monitoring_app.py`)
- Analysis orchestration → Synthetic data: generates (evidence: `backend.py`)
- Analysis orchestration → Live provider hook: attempts (evidence: `backend.py`)
- Live provider hook → Social and web platforms: would collect from (evidence: `README.md`)
- Analysis orchestration → Sentiment and risk scoring: scores (evidence: `backend.py`)
- Analysis orchestration → Report construction: builds (evidence: `backend.py`)
- Report construction → Analysis report: returns (evidence: `backend.py`)
- Dashboard screens → Report and filters: displays (evidence: `brand_monitoring_app.py`)
- Dashboard screens → CSV and Markdown exports: downloads (evidence: `brand_monitoring_app.py`)
- Report and filters → Shared UI components: renders with (evidence: `brand_monitoring_app.py`)
- Report and filters → Analysis report: reads (evidence: `brand_monitoring_app.py`)
