# 1nsharma/urlmind architecture

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

- Interactive diagram: https://gitdiagram.com/1nsharma/urlmind
- Repository: https://github.com/1nsharma/urlmind

## Overview

URLMIND accepts a public URL and returns an evidence-labelled architecture intelligence report, with interactive diagrams, sitemap, technology audit, workflow, explainer, and grounded Q&A. Its principal path runs from URL entry through server analysis, URL classification and public-source extraction, then AI report generation and presentation. Comparison, saved reports, exports, and URL-prefix routing are additional product branches. Some UI and API wiring is supported only by the source index or README; those uncertain links are omitted or shown dashed.

Main entry points: [`components/IntelligenceWorkspace.tsx`](https://github.com/1nsharma/urlmind/blob/main/components/IntelligenceWorkspace.tsx) (Intelligence workspace), [`lib/analyzer.ts`](https://github.com/1nsharma/urlmind/blob/main/lib/analyzer.ts) (Report pipeline), [`app/page.tsx`](https://github.com/1nsharma/urlmind/blob/main/app/page.tsx) (App coordinator), [`lib/crawler.ts`](https://github.com/1nsharma/urlmind/blob/main/lib/crawler.ts) (Public URL extractor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["URL Entry"]
  node_landing["URL input"]
  node_app["App coordinator<br/>[page.tsx]"]
  node_prefix["URL prefix routing<br/>[page.tsx]"]
  node_analyze_api["Analyze endpoint<br/>[route.ts]"]
  node_compare_api["Compare endpoint<br/>[route.ts]"]
  node_chat_api["Chat endpoint<br/>[route.ts]"]
end

subgraph group_analysis["Analysis Engine"]
  node_analyzer["Report pipeline<br/>[analyzer.ts]"]
  node_classifier["URL classifier<br/>[classifier.ts]"]
  node_crawler["Public URL extractor<br/>[crawler.ts]"]
  node_social["Social metadata adapter<br/>[social.ts]"]
  node_cache[("Report cache<br/>[cache.ts]")]
  node_gemini["Gemini analysis<br/>[gemini.ts]"]
end

subgraph group_results["Intelligence Views"]
  node_workspace["Intelligence workspace"]
  node_map["Architecture map"]
  node_mermaid["Mermaid diagram<br/>[MermaidDiagram.tsx]"]
  node_sitemap["Sitemap view<br/>[SitemapView.tsx]"]
  node_tech["Technology audit<br/>[TechStackView.tsx]"]
  node_workflow["Workflow view<br/>[WorkflowView.tsx]"]
  node_explainer["Narrated explainer"]
  node_ask["Grounded Q&amp;A<br/>[AskUrlChat.tsx]"]
  node_export["Diagram export<br/>[ExportView.tsx]"]
end

subgraph group_extensions["Additional Capabilities"]
  node_compare["Architecture comparison<br/>[CompareView.tsx]"]
  node_diff["Graph comparison logic<br/>[graphLayout.ts]"]
  node_saved["Saved maps<br/>[SavedMapsView.tsx]"]
  node_csv["CSV stack import<br/>[csvImporter.ts]"]
  node_presets["Showcase presets<br/>[showcasePresets.ts]"]
end

node_user(("URL analyst"))
node_public_sources(("Public URL sources"))
node_jina(("Jina Reader"))
node_oembed(("Platform oEmbed"))

node_user -->|"submits URL"| node_landing
node_landing -->|"requests analysis"| node_app
node_app -->|"posts URL"| node_analyze_api
node_prefix -->|"validates URL"| node_classifier
node_analyze_api -->|"runs pipeline"| node_analyzer
node_compare_api -->|"analyzes URLs"| node_analyzer
node_compare_api -->|"computes diff"| node_diff
node_compare_api -->|"requests synthesis"| node_gemini
node_analyzer -->|"validates and classifies"| node_classifier
node_analyzer -->|"extracts evidence"| node_crawler
node_analyzer -->|"reads and writes"| node_cache
node_analyzer -->|"generates report"| node_gemini
node_analyzer -->|"loads preset"| node_presets
node_crawler -->|"classifies and fingerprints"| node_classifier
node_crawler -->|"extracts social evidence"| node_social
node_crawler -.->|"fetches public content"| node_public_sources
node_crawler -->|"falls back to reader"| node_jina
node_social -.->|"requests metadata"| node_oembed
node_app -->|"opens report"| node_workspace
node_workspace -->|"renders map"| node_map
node_workspace -->|"renders sitemap"| node_sitemap
node_workspace -->|"renders audit"| node_tech
node_workspace -->|"renders workflow"| node_workflow
node_workspace -->|"renders explainer"| node_explainer
node_workspace -->|"renders Q&amp;A"| node_ask
node_map -->|"renders diagram"| node_mermaid
node_ask -.->|"sends questions"| node_chat_api
node_chat_api -->|"answers questions"| node_gemini
node_compare -.->|"requests comparison"| node_compare_api
node_app -->|"opens comparison"| node_compare
node_app -->|"opens saved maps"| node_saved
node_landing -.->|"imports stack CSV"| node_csv
node_workspace -.->|"offers export view"| node_export

click node_landing "https://github.com/1nsharma/urlmind/blob/main/components/UrlAnalyzerLanding.tsx"
click node_app "https://github.com/1nsharma/urlmind/blob/main/app/page.tsx"
click node_prefix "https://github.com/1nsharma/urlmind/blob/main/app/%5B...url%5D/page.tsx"
click node_analyze_api "https://github.com/1nsharma/urlmind/blob/main/app/api/analyze/route.ts"
click node_compare_api "https://github.com/1nsharma/urlmind/blob/main/app/api/compare/route.ts"
click node_chat_api "https://github.com/1nsharma/urlmind/blob/main/app/api/chat/route.ts"
click node_analyzer "https://github.com/1nsharma/urlmind/blob/main/lib/analyzer.ts"
click node_classifier "https://github.com/1nsharma/urlmind/blob/main/lib/classifier.ts"
click node_crawler "https://github.com/1nsharma/urlmind/blob/main/lib/crawler.ts"
click node_social "https://github.com/1nsharma/urlmind/blob/main/lib/adapters/social.ts"
click node_cache "https://github.com/1nsharma/urlmind/blob/main/lib/cache.ts"
click node_gemini "https://github.com/1nsharma/urlmind/blob/main/lib/gemini.ts"
click node_workspace "https://github.com/1nsharma/urlmind/blob/main/components/IntelligenceWorkspace.tsx"
click node_map "https://github.com/1nsharma/urlmind/blob/main/components/ArchitectureMap.tsx"
click node_mermaid "https://github.com/1nsharma/urlmind/blob/main/components/MermaidDiagram.tsx"
click node_sitemap "https://github.com/1nsharma/urlmind/blob/main/components/SitemapView.tsx"
click node_tech "https://github.com/1nsharma/urlmind/blob/main/components/TechStackView.tsx"
click node_workflow "https://github.com/1nsharma/urlmind/blob/main/components/WorkflowView.tsx"
click node_explainer "https://github.com/1nsharma/urlmind/blob/main/components/ExplainerPlayer.tsx"
click node_ask "https://github.com/1nsharma/urlmind/blob/main/components/AskUrlChat.tsx"
click node_export "https://github.com/1nsharma/urlmind/blob/main/components/ExportView.tsx"
click node_compare "https://github.com/1nsharma/urlmind/blob/main/components/CompareView.tsx"
click node_diff "https://github.com/1nsharma/urlmind/blob/main/lib/graphLayout.ts"
click node_saved "https://github.com/1nsharma/urlmind/blob/main/components/SavedMapsView.tsx"
click node_csv "https://github.com/1nsharma/urlmind/blob/main/lib/csvImporter.ts"
click node_presets "https://github.com/1nsharma/urlmind/blob/main/lib/showcasePresets.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_landing,node_app,node_prefix,node_analyze_api,node_compare_api,node_chat_api toneBlue
class node_analyzer,node_classifier,node_crawler,node_social,node_cache,node_gemini toneAmber
class node_workspace,node_map,node_mermaid,node_sitemap,node_tech,node_workflow,node_explainer,node_ask,node_export toneMint
class node_compare,node_diff,node_saved,node_csv,node_presets toneRose
class node_user,node_public_sources,node_jina,node_oembed toneIndigo
```

## Components

### URL Entry

- [URL input](https://github.com/1nsharma/urlmind/blob/main/components/UrlAnalyzerLanding.tsx): `components/UrlAnalyzerLanding.tsx`
- [App coordinator](https://github.com/1nsharma/urlmind/blob/main/app/page.tsx): `app/page.tsx`
- [URL prefix routing](https://github.com/1nsharma/urlmind/blob/main/app/%5B...url%5D/page.tsx): `app/[...url]/page.tsx`
- [Analyze endpoint](https://github.com/1nsharma/urlmind/blob/main/app/api/analyze/route.ts): `app/api/analyze/route.ts`
- [Compare endpoint](https://github.com/1nsharma/urlmind/blob/main/app/api/compare/route.ts): `app/api/compare/route.ts`
- [Chat endpoint](https://github.com/1nsharma/urlmind/blob/main/app/api/chat/route.ts): `app/api/chat/route.ts`

### Analysis Engine

- [Report pipeline](https://github.com/1nsharma/urlmind/blob/main/lib/analyzer.ts): `lib/analyzer.ts`
- [URL classifier](https://github.com/1nsharma/urlmind/blob/main/lib/classifier.ts): `lib/classifier.ts`
- [Public URL extractor](https://github.com/1nsharma/urlmind/blob/main/lib/crawler.ts): `lib/crawler.ts`
- [Social metadata adapter](https://github.com/1nsharma/urlmind/blob/main/lib/adapters/social.ts): `lib/adapters/social.ts`
- [Report cache](https://github.com/1nsharma/urlmind/blob/main/lib/cache.ts): `lib/cache.ts`
- [Gemini analysis](https://github.com/1nsharma/urlmind/blob/main/lib/gemini.ts): `lib/gemini.ts`

### Intelligence Views

- [Intelligence workspace](https://github.com/1nsharma/urlmind/blob/main/components/IntelligenceWorkspace.tsx): `components/IntelligenceWorkspace.tsx`
- [Architecture map](https://github.com/1nsharma/urlmind/blob/main/components/ArchitectureMap.tsx): `components/ArchitectureMap.tsx`
- [Mermaid diagram](https://github.com/1nsharma/urlmind/blob/main/components/MermaidDiagram.tsx): `components/MermaidDiagram.tsx`
- [Sitemap view](https://github.com/1nsharma/urlmind/blob/main/components/SitemapView.tsx): `components/SitemapView.tsx`
- [Technology audit](https://github.com/1nsharma/urlmind/blob/main/components/TechStackView.tsx): `components/TechStackView.tsx`
- [Workflow view](https://github.com/1nsharma/urlmind/blob/main/components/WorkflowView.tsx): `components/WorkflowView.tsx`
- [Narrated explainer](https://github.com/1nsharma/urlmind/blob/main/components/ExplainerPlayer.tsx): `components/ExplainerPlayer.tsx`
- [Grounded Q&A](https://github.com/1nsharma/urlmind/blob/main/components/AskUrlChat.tsx): `components/AskUrlChat.tsx`
- [Diagram export](https://github.com/1nsharma/urlmind/blob/main/components/ExportView.tsx): `components/ExportView.tsx`

### Additional Capabilities

- [Architecture comparison](https://github.com/1nsharma/urlmind/blob/main/components/CompareView.tsx): `components/CompareView.tsx`
- [Graph comparison logic](https://github.com/1nsharma/urlmind/blob/main/lib/graphLayout.ts): `lib/graphLayout.ts`
- [Saved maps](https://github.com/1nsharma/urlmind/blob/main/components/SavedMapsView.tsx): `components/SavedMapsView.tsx`
- [CSV stack import](https://github.com/1nsharma/urlmind/blob/main/lib/csvImporter.ts): `lib/csvImporter.ts`
- [Showcase presets](https://github.com/1nsharma/urlmind/blob/main/lib/showcasePresets.ts): `lib/showcasePresets.ts`

### Other components

- **URL analyst**
- **Public URL sources**
- **Jina Reader**
- **Platform oEmbed**

## Connections

- URL analyst → URL input: submits URL (evidence: `README.md`)
- URL input → App coordinator: requests analysis (evidence: `app/page.tsx`)
- App coordinator → Analyze endpoint: posts URL (evidence: `app/page.tsx`)
- URL prefix routing → URL classifier: validates URL (evidence: `app/[...url]/page.tsx`)
- Analyze endpoint → Report pipeline: runs pipeline (evidence: `app/api/analyze/route.ts`)
- Compare endpoint → Report pipeline: analyzes URLs (evidence: `app/api/compare/route.ts`)
- Compare endpoint → Graph comparison logic: computes diff (evidence: `app/api/compare/route.ts`)
- Compare endpoint → Gemini analysis: requests synthesis (evidence: `app/api/compare/route.ts`)
- Report pipeline → URL classifier: validates and classifies (evidence: `lib/analyzer.ts`)
- Report pipeline → Public URL extractor: extracts evidence (evidence: `lib/analyzer.ts`)
- Report pipeline → Report cache: reads and writes (evidence: `lib/analyzer.ts`)
- Report pipeline → Gemini analysis: generates report (evidence: `lib/analyzer.ts`)
- Report pipeline → Showcase presets: loads preset (evidence: `lib/analyzer.ts`)
- Public URL extractor → URL classifier: classifies and fingerprints (evidence: `lib/crawler.ts`)
- Public URL extractor → Social metadata adapter: extracts social evidence (evidence: `lib/crawler.ts`)
- Public URL extractor → Public URL sources: fetches public content (evidence: `README.md`)
- Public URL extractor → Jina Reader: falls back to reader (evidence: `lib/crawler.ts`)
- Social metadata adapter → Platform oEmbed: requests metadata (evidence: `README.md`)
- App coordinator → Intelligence workspace: opens report (evidence: `app/page.tsx`)
- Intelligence workspace → Architecture map: renders map (evidence: `components/IntelligenceWorkspace.tsx`)
- Intelligence workspace → Sitemap view: renders sitemap (evidence: `components/IntelligenceWorkspace.tsx`)
- Intelligence workspace → Technology audit: renders audit (evidence: `components/IntelligenceWorkspace.tsx`)
- Intelligence workspace → Workflow view: renders workflow (evidence: `components/IntelligenceWorkspace.tsx`)
- Intelligence workspace → Narrated explainer: renders explainer (evidence: `components/IntelligenceWorkspace.tsx`)
- Intelligence workspace → Grounded Q&A: renders Q&A (evidence: `components/IntelligenceWorkspace.tsx`)
- Architecture map → Mermaid diagram: renders diagram (evidence: `components/ArchitectureMap.tsx`)
- Grounded Q&A → Chat endpoint: sends questions
- Chat endpoint → Gemini analysis: answers questions (evidence: `app/api/chat/route.ts`)
- Architecture comparison → Compare endpoint: requests comparison
- App coordinator → Architecture comparison: opens comparison (evidence: `app/page.tsx`)
- App coordinator → Saved maps: opens saved maps (evidence: `app/page.tsx`)
- URL input → CSV stack import: imports stack CSV (evidence: `components/UrlAnalyzerLanding.tsx`)
- Intelligence workspace → Diagram export: offers export view (evidence: `components/IntelligenceWorkspace.tsx`)
