# prasanthrayudu313/healthcare-dashboard architecture

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

- Interactive diagram: https://gitdiagram.com/prasanthrayudu313/healthcare-dashboard
- Repository: https://github.com/prasanthrayudu313/healthcare-dashboard

## Overview

Centene Intelligence is a healthcare-news monitoring and business-intelligence dashboard. Its central workflow collects RSS, FDA, clinical-trial and SEC items, scores and classifies them, stores updates, and supports AI summaries; dashboard and analytics views present the resulting intelligence. The source index and sampled excerpts support the ingestion, persistence, summary and selected UI links shown here. Several API and page implementations are indexed but not excerpted, so their internal behavior and some runtime connections are not asserted.

Main entry points: [`src/lib/ingestion/index.ts`](https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/lib/ingestion/index.ts) (Ingestion orchestration), [`src/lib/db.ts`](https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/lib/db.ts) (Prisma client), [`src/lib/ai/summarize.ts`](https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/lib/ai/summarize.ts) (AI summarization), [`src/app/page.tsx`](https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/app/page.tsx) (Intelligence dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_collection["Collection and analysis"]
  node_rss["RSS collection<br/>[rss.ts]"]
  node_fda["FDA collection<br/>[fda.ts]"]
  node_trials["Trial collection<br/>[clinicaltrials.ts]"]
  node_sec["SEC collection<br/>[sec.ts]"]
  node_ingest["Ingestion orchestration<br/>[index.ts]"]
  node_scoring["Impact scoring<br/>[scoring.ts]"]
end

subgraph group_storage["Persistence and summaries"]
  node_dbclient["Prisma client<br/>[db.ts]"]
  node_database[("Application database<br/>[schema.prisma]")]
  node_summary["AI summarization<br/>[summarize.ts]"]
end

subgraph group_api["Application APIs"]
  node_ingestapi["Ingestion endpoint<br/>[route.ts]"]
  node_updatesapi["Updates API<br/>[route.ts]"]
  node_detailapi["Update detail API<br/>[route.ts]"]
  node_analyticsapi["Analytics API<br/>[route.ts]"]
  node_metricsapi["Metrics API<br/>[route.ts]"]
  node_searchapi["Search API<br/>[route.ts]"]
end

subgraph group_experience["Dashboard experience"]
  node_home["Intelligence dashboard<br/>[page.tsx]"]
  node_header["Search and refresh<br/>[Header.tsx]"]
  node_feed["Update feed<br/>[UpdateFeed.tsx]"]
  node_card["Update card<br/>[UpdateCard.tsx]"]
  node_detailpage["Update detail view<br/>[page.tsx]"]
  node_analytics["Analytics view<br/>[page.tsx]"]
  node_charts["Dashboard charts"]
  node_kpis["KPI cards<br/>[KpiCards.tsx]"]
  node_companies["Company directory<br/>[page.tsx]"]
end

node_analyst(("Analyst"))
node_sources["Health data sources"]
node_groq["Groq AI service"]

node_sources -->|"provides feeds"| node_rss
node_ingest -->|"fetches items"| node_rss
node_ingest -->|"fetches items"| node_fda
node_ingest -->|"fetches items"| node_trials
node_ingest -->|"fetches filings"| node_sec
node_ingest -->|"scores updates"| node_scoring
node_ingest -->|"writes updates"| node_dbclient
node_dbclient -.->|"accesses"| node_database
node_ingestapi -->|"runs ingestion"| node_ingest
node_ingestapi -->|"requests summaries"| node_summary
node_summary -->|"reads and writes"| node_dbclient
node_summary -->|"generates analysis"| node_groq
node_updatesapi -->|"queries updates"| node_dbclient
node_detailapi -->|"queries update"| node_dbclient
node_detailapi -->|"generates summary"| node_summary
node_analyticsapi -->|"queries analytics"| node_dbclient
node_metricsapi -->|"queries metrics"| node_dbclient
node_searchapi -->|"searches updates"| node_dbclient
node_analyst -.->|"views intelligence"| node_home
node_home -->|"renders"| node_header
node_home -->|"renders"| node_feed
node_feed -->|"renders updates"| node_card
node_header -.->|"triggers refresh"| node_ingestapi
node_kpis -->|"fetches metrics"| node_metricsapi
node_analytics -->|"renders"| node_charts
node_analytics -->|"renders"| node_kpis
node_analyst -.->|"opens analytics"| node_analytics
node_analyst -.->|"opens update"| node_detailpage
node_analyst -.->|"browses companies"| node_companies

click node_rss "https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/lib/ingestion/rss.ts"
click node_fda "https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/lib/ingestion/fda.ts"
click node_trials "https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/lib/ingestion/clinicaltrials.ts"
click node_sec "https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/lib/ingestion/sec.ts"
click node_ingest "https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/lib/ingestion/index.ts"
click node_scoring "https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/lib/scoring.ts"
click node_dbclient "https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/lib/db.ts"
click node_database "https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/prisma/schema.prisma"
click node_summary "https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/lib/ai/summarize.ts"
click node_ingestapi "https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/app/api/ingest/route.ts"
click node_updatesapi "https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/app/api/updates/route.ts"
click node_detailapi "https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/app/api/updates/%5Bid%5D/route.ts"
click node_analyticsapi "https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/app/api/analytics/route.ts"
click node_metricsapi "https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/app/api/metrics/route.ts"
click node_searchapi "https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/app/api/search/route.ts"
click node_home "https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/app/page.tsx"
click node_header "https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/components/layout/Header.tsx"
click node_feed "https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/components/feed/UpdateFeed.tsx"
click node_card "https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/components/feed/UpdateCard.tsx"
click node_detailpage "https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/app/updates/%5Bid%5D/page.tsx"
click node_analytics "https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/app/analytics/page.tsx"
click node_charts "https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/components/charts/DashboardCharts.tsx"
click node_kpis "https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/components/kpi/KpiCards.tsx"
click node_companies "https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/app/companies/page.tsx"

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_rss,node_fda,node_trials,node_sec,node_ingest,node_scoring toneBlue
class node_dbclient,node_database,node_summary toneAmber
class node_ingestapi,node_updatesapi,node_detailapi,node_analyticsapi,node_metricsapi,node_searchapi toneMint
class node_home,node_header,node_feed,node_card,node_detailpage,node_analytics,node_charts,node_kpis,node_companies toneRose
class node_analyst,node_sources,node_groq toneIndigo
```

## Components

### Collection and analysis

- [RSS collection](https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/lib/ingestion/rss.ts): `src/lib/ingestion/rss.ts`
- [FDA collection](https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/lib/ingestion/fda.ts): `src/lib/ingestion/fda.ts`
- [Trial collection](https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/lib/ingestion/clinicaltrials.ts): `src/lib/ingestion/clinicaltrials.ts`
- [SEC collection](https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/lib/ingestion/sec.ts): `src/lib/ingestion/sec.ts`
- [Ingestion orchestration](https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/lib/ingestion/index.ts): `src/lib/ingestion/index.ts`
- [Impact scoring](https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/lib/scoring.ts): `src/lib/scoring.ts`

### Persistence and summaries

- [Prisma client](https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/lib/db.ts): `src/lib/db.ts`
- [Application database](https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/prisma/schema.prisma): `prisma/schema.prisma`
- [AI summarization](https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/lib/ai/summarize.ts): `src/lib/ai/summarize.ts`

### Application APIs

- [Ingestion endpoint](https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/app/api/ingest/route.ts): `src/app/api/ingest/route.ts`
- [Updates API](https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/app/api/updates/route.ts): `src/app/api/updates/route.ts`
- [Update detail API](https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/app/api/updates/%5Bid%5D/route.ts): `src/app/api/updates/[id]/route.ts`
- [Analytics API](https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/app/api/analytics/route.ts): `src/app/api/analytics/route.ts`
- [Metrics API](https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/app/api/metrics/route.ts): `src/app/api/metrics/route.ts`
- [Search API](https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/app/api/search/route.ts): `src/app/api/search/route.ts`

### Dashboard experience

- [Intelligence dashboard](https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [Search and refresh](https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/components/layout/Header.tsx): `src/components/layout/Header.tsx`
- [Update feed](https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/components/feed/UpdateFeed.tsx): `src/components/feed/UpdateFeed.tsx`
- [Update card](https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/components/feed/UpdateCard.tsx): `src/components/feed/UpdateCard.tsx`
- [Update detail view](https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/app/updates/%5Bid%5D/page.tsx): `src/app/updates/[id]/page.tsx`
- [Analytics view](https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/app/analytics/page.tsx): `src/app/analytics/page.tsx`
- [Dashboard charts](https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/components/charts/DashboardCharts.tsx): `src/components/charts/DashboardCharts.tsx`
- [KPI cards](https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/components/kpi/KpiCards.tsx): `src/components/kpi/KpiCards.tsx`
- [Company directory](https://github.com/prasanthrayudu313/healthcare-dashboard/blob/main/src/app/companies/page.tsx): `src/app/companies/page.tsx`

### Other components

- **Analyst**
- **Health data sources**
- **Groq AI service**

## Connections

- Health data sources → RSS collection: provides feeds (evidence: `src/lib/ingestion/rss.ts`)
- Ingestion orchestration → RSS collection: fetches items (evidence: `src/lib/ingestion/index.ts`)
- Ingestion orchestration → FDA collection: fetches items (evidence: `src/lib/ingestion/index.ts`)
- Ingestion orchestration → Trial collection: fetches items (evidence: `src/lib/ingestion/index.ts`)
- Ingestion orchestration → SEC collection: fetches filings (evidence: `src/lib/ingestion/index.ts`)
- Ingestion orchestration → Impact scoring: scores updates (evidence: `src/lib/ingestion/index.ts`)
- Ingestion orchestration → Prisma client: writes updates (evidence: `src/lib/ingestion/index.ts`)
- Prisma client → Application database: accesses
- Ingestion endpoint → Ingestion orchestration: runs ingestion (evidence: `src/app/api/ingest/route.ts`)
- Ingestion endpoint → AI summarization: requests summaries (evidence: `src/app/api/ingest/route.ts`)
- AI summarization → Prisma client: reads and writes (evidence: `src/lib/ai/summarize.ts`)
- AI summarization → Groq AI service: generates analysis (evidence: `src/lib/ai/summarize.ts`)
- Updates API → Prisma client: queries updates (evidence: `src/app/api/updates/route.ts`)
- Update detail API → Prisma client: queries update (evidence: `src/app/api/updates/[id]/route.ts`)
- Update detail API → AI summarization: generates summary (evidence: `src/app/api/updates/[id]/route.ts`)
- Analytics API → Prisma client: queries analytics (evidence: `src/app/api/analytics/route.ts`)
- Metrics API → Prisma client: queries metrics (evidence: `src/app/api/metrics/route.ts`)
- Search API → Prisma client: searches updates (evidence: `src/app/api/search/route.ts`)
- Analyst → Intelligence dashboard: views intelligence
- Intelligence dashboard → Search and refresh: renders (evidence: `src/app/page.tsx`)
- Intelligence dashboard → Update feed: renders (evidence: `src/app/page.tsx`)
- Update feed → Update card: renders updates (evidence: `src/components/feed/UpdateFeed.tsx`)
- Search and refresh → Ingestion endpoint: triggers refresh
- KPI cards → Metrics API: fetches metrics (evidence: `src/components/kpi/KpiCards.tsx`)
- Analytics view → Dashboard charts: renders (evidence: `src/app/analytics/page.tsx`)
- Analytics view → KPI cards: renders (evidence: `src/app/analytics/page.tsx`)
- Analyst → Analytics view: opens analytics
- Analyst → Update detail view: opens update
- Analyst → Company directory: browses companies
