# madhupadishala/literature-screening-production architecture

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

- Interactive diagram: https://gitdiagram.com/madhupadishala/literature-screening-production
- Repository: https://github.com/madhupadishala/literature-screening-production

## Overview

This repository supports literature search and screening alongside pharmacovigilance intake, review, and case management, with knowledge administration and reporting. The visible search-strategy engine builds a query and invokes PubMed; sampled services also show evidence extraction, review persistence, and case versioning. The tree indicates additional product areas, but excerpts do not establish most route-to-service wiring, so those connections are left out. The README provides no further architecture detail.

Main entry points: [`frontend/lib/knowledge/ingestion/knowledge-ingestion-service.ts`](https://github.com/madhupadishala/literature-screening-production/blob/main/frontend/lib/knowledge/ingestion/knowledge-ingestion-service.ts) (Knowledge ingestion), [`frontend/lib/literature/search/search-strategy-engine.ts`](https://github.com/madhupadishala/literature-screening-production/blob/main/frontend/lib/literature/search/search-strategy-engine.ts) (Search strategy), [`backend/orchestrators/llm_client.py`](https://github.com/madhupadishala/literature-screening-production/blob/main/backend/orchestrators/llm_client.py) (Structured LLM client), [`frontend/lib/safety/intake/intake-review-service.ts`](https://github.com/madhupadishala/literature-screening-production/blob/main/frontend/lib/safety/intake/intake-review-service.ts) (Intake review)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_lit["Literature workflow"]
  node_search_ui["Literature search<br/>[page.tsx]"]
  node_search_engine["Search strategy"]
  node_screening_ui["Screening workspace<br/>[page.tsx]"]
  node_hits_ui["Hits review<br/>[page.tsx]"]
  node_hits_review[("Hits review store")]
  node_review_mutation["Literature review"]
  node_llm_client["Structured LLM client<br/>[llm_client.py]"]
end

subgraph group_safety["Safety operations"]
  node_intake_ui["Safety intake<br/>[page.tsx]"]
  node_intake_service["Intake review"]
  node_document_extractor["Document extraction"]
  node_case_ui["Safety cases<br/>[page.tsx]"]
  node_case_review["Case review"]
  node_case_version["Case versioning"]
end

subgraph group_knowledge["Knowledge services"]
  node_knowledge_ingestion["Knowledge ingestion"]
  node_knowledge_reader["Knowledge reader"]
  node_knowledge_discovery["File discovery"]
  node_knowledge_manifest["Ingestion manifest"]
  node_knowledge_admin["Knowledge administration<br/>[page.tsx]"]
end

subgraph group_platform["Administration and reporting"]
  node_reports["Reports<br/>[page.tsx]"]
  node_admin["Platform administration<br/>[page.tsx]"]
end

node_reviewer(("Reviewer"))
node_pubmed["PubMed"]
node_groq["Groq LLM"]

node_reviewer -->|"starts search"| node_search_ui
node_reviewer -->|"opens workspace"| node_screening_ui
node_reviewer -->|"reviews hits"| node_hits_ui
node_reviewer -->|"submits intake"| node_intake_ui
node_reviewer -->|"reviews cases"| node_case_ui
node_reviewer -->|"manages knowledge"| node_knowledge_admin
node_reviewer -->|"views reports"| node_reports
node_reviewer -->|"administers platform"| node_admin
node_search_engine -->|"searches"| node_pubmed
node_intake_service -->|"extracts text"| node_document_extractor
node_knowledge_ingestion -->|"reads content"| node_knowledge_reader
node_knowledge_ingestion -->|"discovers files"| node_knowledge_discovery
node_knowledge_ingestion -->|"loads and saves"| node_knowledge_manifest
node_llm_client -->|"requests completion"| node_groq

click node_search_ui "https://github.com/madhupadishala/literature-screening-production/blob/main/frontend/app/literature-search/page.tsx"
click node_search_engine "https://github.com/madhupadishala/literature-screening-production/blob/main/frontend/lib/literature/search/search-strategy-engine.ts"
click node_screening_ui "https://github.com/madhupadishala/literature-screening-production/blob/main/frontend/app/screening/page.tsx"
click node_hits_ui "https://github.com/madhupadishala/literature-screening-production/blob/main/frontend/app/hits/page.tsx"
click node_hits_review "https://github.com/madhupadishala/literature-screening-production/blob/main/frontend/lib/literature/hits/hits-review-repository.ts"
click node_intake_ui "https://github.com/madhupadishala/literature-screening-production/blob/main/frontend/app/intake/page.tsx"
click node_intake_service "https://github.com/madhupadishala/literature-screening-production/blob/main/frontend/lib/safety/intake/intake-review-service.ts"
click node_document_extractor "https://github.com/madhupadishala/literature-screening-production/blob/main/frontend/lib/safety/intake/intake-review-service.ts"
click node_case_ui "https://github.com/madhupadishala/literature-screening-production/blob/main/frontend/app/cases/page.tsx"
click node_case_review "https://github.com/madhupadishala/literature-screening-production/blob/main/frontend/lib/safety/case-review/case-review-service.ts"
click node_case_version "https://github.com/madhupadishala/literature-screening-production/blob/main/frontend/lib/safety/case-review/case-review-service.ts"
click node_review_mutation "https://github.com/madhupadishala/literature-screening-production/blob/main/frontend/lib/literature/review/review-mutation-service.ts"
click node_knowledge_ingestion "https://github.com/madhupadishala/literature-screening-production/blob/main/frontend/lib/knowledge/ingestion/knowledge-ingestion-service.ts"
click node_knowledge_reader "https://github.com/madhupadishala/literature-screening-production/blob/main/frontend/lib/knowledge/ingestion/knowledge-content-reader.ts"
click node_knowledge_discovery "https://github.com/madhupadishala/literature-screening-production/blob/main/frontend/lib/knowledge/ingestion/knowledge-file-discovery.ts"
click node_knowledge_manifest "https://github.com/madhupadishala/literature-screening-production/blob/main/frontend/lib/knowledge/ingestion/knowledge-ingestion-manifest.ts"
click node_knowledge_admin "https://github.com/madhupadishala/literature-screening-production/blob/main/frontend/app/admin/knowledge-base/page.tsx"
click node_reports "https://github.com/madhupadishala/literature-screening-production/blob/main/frontend/app/reports/page.tsx"
click node_admin "https://github.com/madhupadishala/literature-screening-production/blob/main/frontend/app/admin/page.tsx"
click node_llm_client "https://github.com/madhupadishala/literature-screening-production/blob/main/backend/orchestrators/llm_client.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_search_ui,node_search_engine,node_screening_ui,node_hits_ui,node_hits_review,node_review_mutation,node_llm_client,node_reviewer toneBlue
class node_intake_ui,node_intake_service,node_document_extractor,node_case_ui,node_case_review,node_case_version toneAmber
class node_knowledge_ingestion,node_knowledge_reader,node_knowledge_discovery,node_knowledge_manifest,node_knowledge_admin toneMint
class node_reports,node_admin toneRose
class node_pubmed,node_groq toneIndigo
```

## Components

### Literature workflow

- [Literature search](https://github.com/madhupadishala/literature-screening-production/blob/main/frontend/app/literature-search/page.tsx): `frontend/app/literature-search/page.tsx`
- [Search strategy](https://github.com/madhupadishala/literature-screening-production/blob/main/frontend/lib/literature/search/search-strategy-engine.ts): `frontend/lib/literature/search/search-strategy-engine.ts`
- [Screening workspace](https://github.com/madhupadishala/literature-screening-production/blob/main/frontend/app/screening/page.tsx): `frontend/app/screening/page.tsx`
- [Hits review](https://github.com/madhupadishala/literature-screening-production/blob/main/frontend/app/hits/page.tsx): `frontend/app/hits/page.tsx`
- [Hits review store](https://github.com/madhupadishala/literature-screening-production/blob/main/frontend/lib/literature/hits/hits-review-repository.ts): `frontend/lib/literature/hits/hits-review-repository.ts`
- [Literature review](https://github.com/madhupadishala/literature-screening-production/blob/main/frontend/lib/literature/review/review-mutation-service.ts): `frontend/lib/literature/review/review-mutation-service.ts`
- [Structured LLM client](https://github.com/madhupadishala/literature-screening-production/blob/main/backend/orchestrators/llm_client.py): `backend/orchestrators/llm_client.py`

### Safety operations

- [Safety intake](https://github.com/madhupadishala/literature-screening-production/blob/main/frontend/app/intake/page.tsx): `frontend/app/intake/page.tsx`
- [Intake review](https://github.com/madhupadishala/literature-screening-production/blob/main/frontend/lib/safety/intake/intake-review-service.ts): `frontend/lib/safety/intake/intake-review-service.ts`
- [Document extraction](https://github.com/madhupadishala/literature-screening-production/blob/main/frontend/lib/safety/intake/intake-review-service.ts): `frontend/lib/safety/intake/intake-review-service.ts`
- [Safety cases](https://github.com/madhupadishala/literature-screening-production/blob/main/frontend/app/cases/page.tsx): `frontend/app/cases/page.tsx`
- [Case review](https://github.com/madhupadishala/literature-screening-production/blob/main/frontend/lib/safety/case-review/case-review-service.ts): `frontend/lib/safety/case-review/case-review-service.ts`
- [Case versioning](https://github.com/madhupadishala/literature-screening-production/blob/main/frontend/lib/safety/case-review/case-review-service.ts): `frontend/lib/safety/case-review/case-review-service.ts`

### Knowledge services

- [Knowledge ingestion](https://github.com/madhupadishala/literature-screening-production/blob/main/frontend/lib/knowledge/ingestion/knowledge-ingestion-service.ts): `frontend/lib/knowledge/ingestion/knowledge-ingestion-service.ts`
- [Knowledge reader](https://github.com/madhupadishala/literature-screening-production/blob/main/frontend/lib/knowledge/ingestion/knowledge-content-reader.ts): `frontend/lib/knowledge/ingestion/knowledge-content-reader.ts`
- [File discovery](https://github.com/madhupadishala/literature-screening-production/blob/main/frontend/lib/knowledge/ingestion/knowledge-file-discovery.ts): `frontend/lib/knowledge/ingestion/knowledge-file-discovery.ts`
- [Ingestion manifest](https://github.com/madhupadishala/literature-screening-production/blob/main/frontend/lib/knowledge/ingestion/knowledge-ingestion-manifest.ts): `frontend/lib/knowledge/ingestion/knowledge-ingestion-manifest.ts`
- [Knowledge administration](https://github.com/madhupadishala/literature-screening-production/blob/main/frontend/app/admin/knowledge-base/page.tsx): `frontend/app/admin/knowledge-base/page.tsx`

### Administration and reporting

- [Reports](https://github.com/madhupadishala/literature-screening-production/blob/main/frontend/app/reports/page.tsx): `frontend/app/reports/page.tsx`
- [Platform administration](https://github.com/madhupadishala/literature-screening-production/blob/main/frontend/app/admin/page.tsx): `frontend/app/admin/page.tsx`

### Other components

- **Reviewer**
- **PubMed**
- **Groq LLM**

## Connections

- Reviewer → Literature search: starts search
- Reviewer → Screening workspace: opens workspace
- Reviewer → Hits review: reviews hits
- Reviewer → Safety intake: submits intake
- Reviewer → Safety cases: reviews cases
- Reviewer → Knowledge administration: manages knowledge
- Reviewer → Reports: views reports
- Reviewer → Platform administration: administers platform
- Search strategy → PubMed: searches
- Intake review → Document extraction: extracts text
- Knowledge ingestion → Knowledge reader: reads content
- Knowledge ingestion → File discovery: discovers files
- Knowledge ingestion → Ingestion manifest: loads and saves
- Structured LLM client → Groq LLM: requests completion
