# marcrgm/entilytics architecture

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

- Interactive diagram: https://gitdiagram.com/marcrgm/entilytics
- Repository: https://github.com/marcrgm/entilytics

## Overview

EntiLytics is a Solara news-analysis application: users provide article text or fetch RSS items, then inspect extracted entities, importance rankings, an extractive summary, and a co-occurrence relationship graph. Accounts, saved analyses, and personal annotations are persisted in PostgreSQL. The README documents the analysis stages; sampled excerpts show UI workers, OAuth handling, and database persistence. Some analysis-worker calls are in omitted source, so those links are marked unverified rather than inferred as confirmed calls.

Main entry points: [`ui/logic.py`](https://github.com/marcrgm/entilytics/blob/main/ui/logic.py) (Analysis workers), [`ui/app.py`](https://github.com/marcrgm/entilytics/blob/main/ui/app.py) (Solara app), [`ui/components.py`](https://github.com/marcrgm/entilytics/blob/main/ui/components.py) (Dashboard screens), [`features/flair_ner.py`](https://github.com/marcrgm/entilytics/blob/main/features/flair_ner.py) (Entity extraction)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User interface"]
  node_app["Solara app<br/>[app.py]"]
  node_screens["Dashboard screens<br/>[components.py]"]
  node_workflow["Analysis workers<br/>[logic.py]"]
  node_appstate["Reactive state<br/>[state.py]"]
end

subgraph group_analysis["Article analysis"]
  node_rss["RSS retrieval<br/>[rss_handler.py]"]
  node_ner["Entity extraction<br/>[flair_ner.py]"]
  node_ranking["Entity ranking"]
  node_summary["Extractive summary"]
  node_mapping["Relationship graph"]
end

subgraph group_identity["Identity and persistence"]
  node_authui["OAuth UI handling<br/>[components.py]"]
  node_auth["Google OAuth<br/>[auth_handler.py]"]
  node_persistence["Article and account data<br/>[database.py]"]
end

subgraph group_presentation["UI support"]
  node_theme["Theme configuration<br/>[theme.py]"]
end

node_user(("News analyst"))
node_google(("Google identity"))
node_postgres[("PostgreSQL")]

node_user -->|"uses"| node_app
node_app -->|"renders"| node_screens
node_screens -->|"starts workers"| node_workflow
node_screens -.->|"updates state"| node_appstate
node_workflow -.->|"fetches feed"| node_rss
node_workflow -.->|"extracts entities"| node_ner
node_workflow -.->|"ranks entities"| node_ranking
node_workflow -.->|"creates summary"| node_summary
node_workflow -.->|"builds graph"| node_mapping
node_ner -->|"supplies entities"| node_ranking
node_ranking -->|"guides selection"| node_summary
node_ner -->|"supplies entities"| node_mapping
node_user -->|"signs in"| node_authui
node_authui -->|"exchanges code"| node_auth
node_auth -->|"requests profile"| node_google
node_workflow -->|"saves analysis"| node_persistence
node_authui -->|"stores session"| node_persistence
node_persistence -->|"reads and writes"| node_postgres
node_app -->|"uses styles"| node_theme

click node_app "https://github.com/marcrgm/entilytics/blob/main/ui/app.py"
click node_screens "https://github.com/marcrgm/entilytics/blob/main/ui/components.py"
click node_workflow "https://github.com/marcrgm/entilytics/blob/main/ui/logic.py"
click node_appstate "https://github.com/marcrgm/entilytics/blob/main/ui/state.py"
click node_rss "https://github.com/marcrgm/entilytics/blob/main/features/rss_handler.py"
click node_ner "https://github.com/marcrgm/entilytics/blob/main/features/flair_ner.py"
click node_ranking "https://github.com/marcrgm/entilytics/blob/main/features/entity_ranking_and_summarization.py"
click node_summary "https://github.com/marcrgm/entilytics/blob/main/features/entity_ranking_and_summarization.py"
click node_mapping "https://github.com/marcrgm/entilytics/blob/main/features/relationship_mapping.py"
click node_authui "https://github.com/marcrgm/entilytics/blob/main/ui/components.py"
click node_auth "https://github.com/marcrgm/entilytics/blob/main/features/auth_handler.py"
click node_persistence "https://github.com/marcrgm/entilytics/blob/main/features/database.py"
click node_theme "https://github.com/marcrgm/entilytics/blob/main/ui/theme.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_app,node_screens,node_workflow,node_appstate toneBlue
class node_rss,node_ner,node_ranking,node_summary,node_mapping,node_postgres toneAmber
class node_authui,node_auth,node_persistence toneMint
class node_theme toneRose
class node_user,node_google toneIndigo
```

## Components

### User interface

- [Solara app](https://github.com/marcrgm/entilytics/blob/main/ui/app.py): `ui/app.py`
- [Dashboard screens](https://github.com/marcrgm/entilytics/blob/main/ui/components.py): `ui/components.py`
- [Analysis workers](https://github.com/marcrgm/entilytics/blob/main/ui/logic.py): `ui/logic.py`
- [Reactive state](https://github.com/marcrgm/entilytics/blob/main/ui/state.py): `ui/state.py`

### Article analysis

- [RSS retrieval](https://github.com/marcrgm/entilytics/blob/main/features/rss_handler.py): `features/rss_handler.py`
- [Entity extraction](https://github.com/marcrgm/entilytics/blob/main/features/flair_ner.py): `features/flair_ner.py`
- [Entity ranking](https://github.com/marcrgm/entilytics/blob/main/features/entity_ranking_and_summarization.py): `features/entity_ranking_and_summarization.py`
- [Extractive summary](https://github.com/marcrgm/entilytics/blob/main/features/entity_ranking_and_summarization.py): `features/entity_ranking_and_summarization.py`
- [Relationship graph](https://github.com/marcrgm/entilytics/blob/main/features/relationship_mapping.py): `features/relationship_mapping.py`

### Identity and persistence

- [OAuth UI handling](https://github.com/marcrgm/entilytics/blob/main/ui/components.py): `ui/components.py`
- [Google OAuth](https://github.com/marcrgm/entilytics/blob/main/features/auth_handler.py): `features/auth_handler.py`
- [Article and account data](https://github.com/marcrgm/entilytics/blob/main/features/database.py): `features/database.py`

### UI support

- [Theme configuration](https://github.com/marcrgm/entilytics/blob/main/ui/theme.py): `ui/theme.py`

### Other components

- **News analyst**
- **Google identity**
- **PostgreSQL**

## Connections

- News analyst → Solara app: uses (evidence: `README.md`)
- Solara app → Dashboard screens: renders (evidence: `ui/app.py`)
- Dashboard screens → Analysis workers: starts workers (evidence: `ui/components.py`)
- Dashboard screens → Reactive state: updates state (evidence: `ui/components.py`)
- Analysis workers → RSS retrieval: fetches feed (evidence: `ui/logic.py`)
- Analysis workers → Entity extraction: extracts entities (evidence: `ui/logic.py`)
- Analysis workers → Entity ranking: ranks entities (evidence: `ui/logic.py`)
- Analysis workers → Extractive summary: creates summary (evidence: `ui/logic.py`)
- Analysis workers → Relationship graph: builds graph (evidence: `ui/logic.py`)
- Entity extraction → Entity ranking: supplies entities (evidence: `README.md`)
- Entity ranking → Extractive summary: guides selection (evidence: `README.md`)
- Entity extraction → Relationship graph: supplies entities (evidence: `README.md`)
- News analyst → OAuth UI handling: signs in (evidence: `README.md`)
- OAuth UI handling → Google OAuth: exchanges code (evidence: `ui/components.py`)
- Google OAuth → Google identity: requests profile (evidence: `features/auth_handler.py`)
- Analysis workers → Article and account data: saves analysis (evidence: `ui/logic.py`)
- OAuth UI handling → Article and account data: stores session (evidence: `ui/components.py`)
- Article and account data → PostgreSQL: reads and writes (evidence: `features/database.py`)
- Solara app → Theme configuration: uses styles (evidence: `ui/app.py`)
