# preethamak/ide_scanner_web architecture

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

- Interactive diagram: https://gitdiagram.com/preethamak/ide_scanner_web
- Repository: https://github.com/preethamak/ide_scanner_web

## Overview

IDE Scanner Web provides public, version-specific security intelligence for VS Code-compatible extensions, plus private team review and monitoring. The main path is: visitors browse registry metadata and history, request a bounded Preflight or exact-version Deep Scan, and view a published report; teams can then record release decisions and monitor extensions. Deep Scans run the canonical Python engine on GitHub-hosted runners, with results returned through signed ingestion. The graph includes documented intelligence and workspace capabilities; unsampled subsystem links are omitted where their callers are not shown.

Main entry points: [`lib/productData.ts`](https://github.com/preethamak/ide_scanner_web/blob/main/lib/productData.ts) (Catalog and product data), [`app/api/deep-scans/route.ts`](https://github.com/preethamak/ide_scanner_web/blob/main/app/api/deep-scans/route.ts) (Deep Scan API), [`lib/cloudflareDeepScan.ts`](https://github.com/preethamak/ide_scanner_web/blob/main/lib/cloudflareDeepScan.ts) (Cloudflare scan jobs), [`lib/scanIngest.ts`](https://github.com/preethamak/ide_scanner_web/blob/main/lib/scanIngest.ts) (Scan result ingestion)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Discovery"]
  node_catalog_ui["Catalog UI"]
  node_catalog_data["Catalog and product data<br/>[productData.ts]"]
  node_marketplace["Extension registry lookup<br/>[marketplace.ts]"]
end

subgraph group_scanning["Scan workflow"]
  node_preflight["Instant Preflight<br/>[route.ts]"]
  node_deep_scan_api["Deep Scan API<br/>[route.ts]"]
  node_scan_orchestrator["Scan orchestration<br/>[deepScan.ts]"]
  node_cf_scan["Cloudflare scan jobs"]
  node_github_runner["GitHub scan runners"]
  node_scan_ingest["Scan result ingestion<br/>[scanIngest.ts]"]
end

subgraph group_intelligence["Reports and intelligence"]
  node_public_report["Public scan reports<br/>[page.tsx]"]
  node_extension_dossier["Extension dossier<br/>[page.tsx]"]
  node_intelligence_report["Evidence Intelligence"]
end

subgraph group_workspace["Team workspace"]
  node_team_review["Team review inbox<br/>[ReviewInbox.tsx]"]
  node_team_badges["Team badges<br/>[route.ts]"]
  node_notifications["Monitoring notifications<br/>[route.ts]"]
end

subgraph group_platform["Data and integrations"]
  node_sarvam["Sarvam model API"]
  node_d1_public[("Cloudflare D1 registry")]
  node_d1_private[("Cloudflare D1 private data")]
  node_supabase[("Supabase data and auth<br/>[supabase.ts]")]
end

node_visitor(("Visitor or reviewer"))

node_visitor -->|"browses"| node_catalog_ui
node_catalog_ui -->|"requests inventory"| node_catalog_data
node_catalog_data -->|"resolves metadata"| node_marketplace
node_catalog_data -->|"reads registry"| node_d1_public
node_visitor -->|"requests preflight"| node_preflight
node_visitor -->|"requests scan"| node_deep_scan_api
node_deep_scan_api -->|"queues scan"| node_scan_orchestrator
node_deep_scan_api -->|"checks progress"| node_cf_scan
node_cf_scan -->|"checks support"| node_marketplace
node_cf_scan -->|"dispatches job"| node_github_runner
node_github_runner -->|"returns scan bundle"| node_scan_ingest
node_scan_ingest -->|"publishes result"| node_supabase
node_scan_ingest -.->|"publishes canonical result"| node_d1_public
node_visitor -->|"views report"| node_public_report
node_public_report -.->|"loads public data"| node_catalog_data
node_visitor -->|"reviews release"| node_extension_dossier
node_extension_dossier -.->|"requests intelligence"| node_intelligence_report
node_intelligence_report -->|"requests cited interpretation"| node_sarvam
node_visitor -->|"reviews team evidence"| node_team_review
node_team_review -.->|"records decisions"| node_supabase
node_visitor -->|"manages badges"| node_team_badges
node_team_badges -->|"queues badge scan"| node_scan_orchestrator
node_notifications -->|"reads queued deliveries"| node_d1_private
node_notifications -->|"loads team alerts"| node_supabase

click node_catalog_ui "https://github.com/preethamak/ide_scanner_web/blob/main/app/InventoryClient.tsx"
click node_catalog_data "https://github.com/preethamak/ide_scanner_web/blob/main/lib/productData.ts"
click node_marketplace "https://github.com/preethamak/ide_scanner_web/blob/main/lib/marketplace.ts"
click node_preflight "https://github.com/preethamak/ide_scanner_web/blob/main/app/api/scans/route.ts"
click node_deep_scan_api "https://github.com/preethamak/ide_scanner_web/blob/main/app/api/deep-scans/route.ts"
click node_scan_orchestrator "https://github.com/preethamak/ide_scanner_web/blob/main/lib/deepScan.ts"
click node_cf_scan "https://github.com/preethamak/ide_scanner_web/blob/main/lib/cloudflareDeepScan.ts"
click node_scan_ingest "https://github.com/preethamak/ide_scanner_web/blob/main/lib/scanIngest.ts"
click node_public_report "https://github.com/preethamak/ide_scanner_web/blob/main/app/public-scan/page.tsx"
click node_extension_dossier "https://github.com/preethamak/ide_scanner_web/blob/main/app/extensions/%5Bid%5D/page.tsx"
click node_intelligence_report "https://github.com/preethamak/ide_scanner_web/blob/main/lib/evidenceIntelligence.ts"
click node_team_review "https://github.com/preethamak/ide_scanner_web/blob/main/app/workspace/views/ReviewInbox.tsx"
click node_team_badges "https://github.com/preethamak/ide_scanner_web/blob/main/app/api/teams/%5Bid%5D/badges/route.ts"
click node_notifications "https://github.com/preethamak/ide_scanner_web/blob/main/app/api/cron/notifications/route.ts"
click node_d1_public "https://github.com/preethamak/ide_scanner_web/blob/main/lib/cloudflareRegistry.ts"
click node_d1_private "https://github.com/preethamak/ide_scanner_web/blob/main/lib/cloudflarePrivate.ts"
click node_supabase "https://github.com/preethamak/ide_scanner_web/blob/main/lib/supabase.ts"

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_catalog_ui,node_catalog_data,node_marketplace,node_visitor toneBlue
class node_preflight,node_deep_scan_api,node_scan_orchestrator,node_cf_scan,node_github_runner,node_scan_ingest toneAmber
class node_public_report,node_extension_dossier,node_intelligence_report toneMint
class node_team_review,node_team_badges,node_notifications toneRose
class node_sarvam,node_d1_public,node_d1_private,node_supabase toneIndigo
```

## Components

### Discovery

- [Catalog UI](https://github.com/preethamak/ide_scanner_web/blob/main/app/InventoryClient.tsx): `app/InventoryClient.tsx`
- [Catalog and product data](https://github.com/preethamak/ide_scanner_web/blob/main/lib/productData.ts): `lib/productData.ts`
- [Extension registry lookup](https://github.com/preethamak/ide_scanner_web/blob/main/lib/marketplace.ts): `lib/marketplace.ts`

### Scan workflow

- [Instant Preflight](https://github.com/preethamak/ide_scanner_web/blob/main/app/api/scans/route.ts): `app/api/scans/route.ts`
- [Deep Scan API](https://github.com/preethamak/ide_scanner_web/blob/main/app/api/deep-scans/route.ts): `app/api/deep-scans/route.ts`
- [Scan orchestration](https://github.com/preethamak/ide_scanner_web/blob/main/lib/deepScan.ts): `lib/deepScan.ts`
- [Cloudflare scan jobs](https://github.com/preethamak/ide_scanner_web/blob/main/lib/cloudflareDeepScan.ts): `lib/cloudflareDeepScan.ts`
- **GitHub scan runners**
- [Scan result ingestion](https://github.com/preethamak/ide_scanner_web/blob/main/lib/scanIngest.ts): `lib/scanIngest.ts`

### Reports and intelligence

- [Public scan reports](https://github.com/preethamak/ide_scanner_web/blob/main/app/public-scan/page.tsx): `app/public-scan/page.tsx`
- [Extension dossier](https://github.com/preethamak/ide_scanner_web/blob/main/app/extensions/%5Bid%5D/page.tsx): `app/extensions/[id]/page.tsx`
- [Evidence Intelligence](https://github.com/preethamak/ide_scanner_web/blob/main/lib/evidenceIntelligence.ts): `lib/evidenceIntelligence.ts`

### Team workspace

- [Team review inbox](https://github.com/preethamak/ide_scanner_web/blob/main/app/workspace/views/ReviewInbox.tsx): `app/workspace/views/ReviewInbox.tsx`
- [Team badges](https://github.com/preethamak/ide_scanner_web/blob/main/app/api/teams/%5Bid%5D/badges/route.ts): `app/api/teams/[id]/badges/route.ts`
- [Monitoring notifications](https://github.com/preethamak/ide_scanner_web/blob/main/app/api/cron/notifications/route.ts): `app/api/cron/notifications/route.ts`

### Data and integrations

- **Sarvam model API**
- [Cloudflare D1 registry](https://github.com/preethamak/ide_scanner_web/blob/main/lib/cloudflareRegistry.ts): `lib/cloudflareRegistry.ts`
- [Cloudflare D1 private data](https://github.com/preethamak/ide_scanner_web/blob/main/lib/cloudflarePrivate.ts): `lib/cloudflarePrivate.ts`
- [Supabase data and auth](https://github.com/preethamak/ide_scanner_web/blob/main/lib/supabase.ts): `lib/supabase.ts`

### Other components

- **Visitor or reviewer**

## Connections

- Visitor or reviewer → Catalog UI: browses
- Catalog UI → Catalog and product data: requests inventory (evidence: `app/InventoryClient.tsx`)
- Catalog and product data → Extension registry lookup: resolves metadata (evidence: `lib/productData.ts`)
- Catalog and product data → Cloudflare D1 registry: reads registry (evidence: `lib/productData.ts`)
- Visitor or reviewer → Instant Preflight: requests preflight
- Visitor or reviewer → Deep Scan API: requests scan
- Deep Scan API → Scan orchestration: queues scan (evidence: `app/api/deep-scans/route.ts`)
- Deep Scan API → Cloudflare scan jobs: checks progress (evidence: `app/api/deep-scans/route.ts`)
- Cloudflare scan jobs → Extension registry lookup: checks support (evidence: `lib/cloudflareDeepScan.ts`)
- Cloudflare scan jobs → GitHub scan runners: dispatches job (evidence: `lib/cloudflareDeepScan.ts`)
- GitHub scan runners → Scan result ingestion: returns scan bundle
- Scan result ingestion → Supabase data and auth: publishes result (evidence: `lib/scanIngest.ts`)
- Scan result ingestion → Cloudflare D1 registry: publishes canonical result
- Visitor or reviewer → Public scan reports: views report
- Public scan reports → Catalog and product data: loads public data
- Visitor or reviewer → Extension dossier: reviews release
- Extension dossier → Evidence Intelligence: requests intelligence
- Evidence Intelligence → Sarvam model API: requests cited interpretation
- Visitor or reviewer → Team review inbox: reviews team evidence
- Team review inbox → Supabase data and auth: records decisions
- Visitor or reviewer → Team badges: manages badges (evidence: `app/api/teams/[id]/badges/route.ts`)
- Team badges → Scan orchestration: queues badge scan (evidence: `app/api/teams/[id]/badges/route.ts`)
- Monitoring notifications → Cloudflare D1 private data: reads queued deliveries (evidence: `app/api/cron/notifications/route.ts`)
- Monitoring notifications → Supabase data and auth: loads team alerts (evidence: `app/api/cron/notifications/route.ts`)
