# devanshiwork1404/concall-pipeline architecture

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

- Interactive diagram: https://gitdiagram.com/devanshiwork1404/concall-pipeline
- Repository: https://github.com/devanshiwork1404/concall-pipeline

## Overview

Concall Pipeline monitors exchange announcements, turns transcript PDFs into text, generates evidence-checked summaries, and serves results through REST and WebSocket endpoints with a minimal UI. The graph follows that workflow and includes the documented backfill capability. Some modules, including the event bus and PDF extractor, were not excerpted, so relationships not established by the README or shown source are omitted.

Main entry points: [`src/index.js`](https://github.com/devanshiwork1404/concall-pipeline/blob/main/src/index.js) (REST and WebSocket), [`src/pipeline.js`](https://github.com/devanshiwork1404/concall-pipeline/blob/main/src/pipeline.js) (Filing Pipeline), [`src/poller.js`](https://github.com/devanshiwork1404/concall-pipeline/blob/main/src/poller.js) (Poll and Deduplicate), [`src/summarize.js`](https://github.com/devanshiwork1404/concall-pipeline/blob/main/src/summarize.js) (Gemini Summarization)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Filing Ingestion"]
  node_nse["NSE Feed<br/>[nse.js]"]
  node_bse["BSE Feed<br/>[bse.js]"]
  node_watchlist["Company Watchlist<br/>[watchlist.js]"]
  node_poller["Poll and Deduplicate<br/>[poller.js]"]
  node_backfill["Transcript Backfill<br/>[backfill.js]"]
  node_httpclient["HTTP Client<br/>[http.js]"]
end

subgraph group_process["Transcript Processing"]
  node_bus["In-Process Event Bus<br/>[bus.js]"]
  node_pipeline["Filing Pipeline<br/>[pipeline.js]"]
  node_extract["PDF Text Extraction<br/>[extract.js]"]
  node_textstore[("Transcript Files")]
end

subgraph group_summarize["Verified Summaries"]
  node_summarizer["Gemini Summarization<br/>[summarize.js]"]
  node_verify["Quote Verification<br/>[summarize.js]"]
  node_gemini["Gemini API"]
end

subgraph group_serve["Serving and State"]
  node_summarystore[("Summary Files")]
  node_server["REST and WebSocket<br/>[index.js]"]
  node_ui["Web UI<br/>[index.html]"]
end

node_exchangeuser(("Exchange Announcements"))
node_subscriber(("UI and Subscribers"))

node_poller -->|"polls"| node_nse
node_poller -->|"polls"| node_bse
node_poller -->|"filters filings"| node_watchlist
node_backfill -->|"fetches filings"| node_nse
node_backfill -->|"fetches filings"| node_bse
node_backfill -->|"uses companies"| node_watchlist
node_nse -->|"requests feed"| node_httpclient
node_bse -->|"requests feed"| node_httpclient
node_exchangeuser -.->|"publishes announcements"| node_nse
node_exchangeuser -.->|"publishes announcements"| node_bse
node_poller -->|"emits filings"| node_bus
node_bus -->|"dispatches filings"| node_pipeline
node_backfill -->|"processes candidates"| node_pipeline
node_pipeline -->|"downloads PDF"| node_httpclient
node_pipeline -->|"extracts text"| node_extract
node_pipeline -->|"caches transcripts"| node_textstore
node_pipeline -->|"emits extracted text"| node_bus
node_summarizer -->|"requests summaries"| node_gemini
node_summarizer -->|"verifies claims"| node_verify
node_summarizer -->|"reads transcripts"| node_textstore
node_summarizer -->|"writes summaries"| node_summarystore
node_server -->|"starts polling"| node_poller
node_server -->|"starts summarizer"| node_summarizer
node_server -->|"broadcasts events"| node_bus
node_server -->|"reads summaries"| node_summarystore
node_server -->|"reads documents"| node_textstore
node_server -->|"serves UI"| node_ui
node_subscriber -->|"requests and subscribes"| node_server

click node_nse "https://github.com/devanshiwork1404/concall-pipeline/blob/main/src/sources/nse.js"
click node_bse "https://github.com/devanshiwork1404/concall-pipeline/blob/main/src/sources/bse.js"
click node_watchlist "https://github.com/devanshiwork1404/concall-pipeline/blob/main/src/watchlist.js"
click node_poller "https://github.com/devanshiwork1404/concall-pipeline/blob/main/src/poller.js"
click node_backfill "https://github.com/devanshiwork1404/concall-pipeline/blob/main/src/backfill.js"
click node_httpclient "https://github.com/devanshiwork1404/concall-pipeline/blob/main/src/http.js"
click node_bus "https://github.com/devanshiwork1404/concall-pipeline/blob/main/src/bus.js"
click node_pipeline "https://github.com/devanshiwork1404/concall-pipeline/blob/main/src/pipeline.js"
click node_extract "https://github.com/devanshiwork1404/concall-pipeline/blob/main/src/extract.js"
click node_summarizer "https://github.com/devanshiwork1404/concall-pipeline/blob/main/src/summarize.js"
click node_verify "https://github.com/devanshiwork1404/concall-pipeline/blob/main/src/summarize.js"
click node_server "https://github.com/devanshiwork1404/concall-pipeline/blob/main/src/index.js"
click node_ui "https://github.com/devanshiwork1404/concall-pipeline/blob/main/public/index.html"

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_nse,node_bse,node_watchlist,node_poller,node_backfill,node_httpclient,node_subscriber toneBlue
class node_bus,node_pipeline,node_extract,node_textstore toneAmber
class node_summarizer,node_verify,node_gemini toneMint
class node_summarystore,node_server,node_ui toneRose
class node_exchangeuser toneIndigo
```

## Components

### Filing Ingestion

- [NSE Feed](https://github.com/devanshiwork1404/concall-pipeline/blob/main/src/sources/nse.js): `src/sources/nse.js`
- [BSE Feed](https://github.com/devanshiwork1404/concall-pipeline/blob/main/src/sources/bse.js): `src/sources/bse.js`
- [Company Watchlist](https://github.com/devanshiwork1404/concall-pipeline/blob/main/src/watchlist.js): `src/watchlist.js`
- [Poll and Deduplicate](https://github.com/devanshiwork1404/concall-pipeline/blob/main/src/poller.js): `src/poller.js`
- [Transcript Backfill](https://github.com/devanshiwork1404/concall-pipeline/blob/main/src/backfill.js): `src/backfill.js`
- [HTTP Client](https://github.com/devanshiwork1404/concall-pipeline/blob/main/src/http.js): `src/http.js`

### Transcript Processing

- [In-Process Event Bus](https://github.com/devanshiwork1404/concall-pipeline/blob/main/src/bus.js): `src/bus.js`
- [Filing Pipeline](https://github.com/devanshiwork1404/concall-pipeline/blob/main/src/pipeline.js): `src/pipeline.js`
- [PDF Text Extraction](https://github.com/devanshiwork1404/concall-pipeline/blob/main/src/extract.js): `src/extract.js`
- **Transcript Files**

### Verified Summaries

- [Gemini Summarization](https://github.com/devanshiwork1404/concall-pipeline/blob/main/src/summarize.js): `src/summarize.js`
- [Quote Verification](https://github.com/devanshiwork1404/concall-pipeline/blob/main/src/summarize.js): `src/summarize.js`
- **Gemini API**

### Serving and State

- **Summary Files**
- [REST and WebSocket](https://github.com/devanshiwork1404/concall-pipeline/blob/main/src/index.js): `src/index.js`
- [Web UI](https://github.com/devanshiwork1404/concall-pipeline/blob/main/public/index.html): `public/index.html`

### Other components

- **Exchange Announcements**
- **UI and Subscribers**

## Connections

- Poll and Deduplicate → NSE Feed: polls (evidence: `src/poller.js`)
- Poll and Deduplicate → BSE Feed: polls (evidence: `src/poller.js`)
- Poll and Deduplicate → Company Watchlist: filters filings (evidence: `src/poller.js`)
- Transcript Backfill → NSE Feed: fetches filings (evidence: `src/backfill.js`)
- Transcript Backfill → BSE Feed: fetches filings (evidence: `src/backfill.js`)
- Transcript Backfill → Company Watchlist: uses companies (evidence: `src/backfill.js`)
- NSE Feed → HTTP Client: requests feed (evidence: `src/sources/nse.js`)
- BSE Feed → HTTP Client: requests feed (evidence: `src/sources/bse.js`)
- Exchange Announcements → NSE Feed: publishes announcements (evidence: `README.md`)
- Exchange Announcements → BSE Feed: publishes announcements (evidence: `README.md`)
- Poll and Deduplicate → In-Process Event Bus: emits filings (evidence: `src/poller.js`)
- In-Process Event Bus → Filing Pipeline: dispatches filings (evidence: `src/pipeline.js`)
- Transcript Backfill → Filing Pipeline: processes candidates (evidence: `src/backfill.js`)
- Filing Pipeline → HTTP Client: downloads PDF (evidence: `src/pipeline.js`)
- Filing Pipeline → PDF Text Extraction: extracts text (evidence: `src/pipeline.js`)
- Filing Pipeline → Transcript Files: caches transcripts (evidence: `src/pipeline.js`)
- Filing Pipeline → In-Process Event Bus: emits extracted text (evidence: `src/pipeline.js`)
- Gemini Summarization → Gemini API: requests summaries (evidence: `README.md`)
- Gemini Summarization → Quote Verification: verifies claims (evidence: `src/summarize.js`)
- Gemini Summarization → Transcript Files: reads transcripts (evidence: `README.md`)
- Gemini Summarization → Summary Files: writes summaries (evidence: `README.md`)
- REST and WebSocket → Poll and Deduplicate: starts polling (evidence: `src/index.js`)
- REST and WebSocket → Gemini Summarization: starts summarizer (evidence: `src/index.js`)
- REST and WebSocket → In-Process Event Bus: broadcasts events (evidence: `src/index.js`)
- REST and WebSocket → Summary Files: reads summaries (evidence: `src/index.js`)
- REST and WebSocket → Transcript Files: reads documents (evidence: `src/index.js`)
- REST and WebSocket → Web UI: serves UI (evidence: `src/index.js`)
- UI and Subscribers → REST and WebSocket: requests and subscribes (evidence: `README.md`)
