# probimkim/scraperhouse architecture

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

- Interactive diagram: https://gitdiagram.com/probimkim/scraperhouse
- Repository: https://github.com/probimkim/scraperhouse

## Overview

ScraperHouse is a unified dashboard for Microsoft Forms extraction, Sherlock username investigations, GitHub architecture diagrams, error monitoring, and Strix security assessments. Users initiate these workflows through dashboard pages and API routes; results stream or persist for inspection, export, and history. Forms scraping includes image storage, OCR, and image export; Sherlock streams progress and saves findings; Strix includes scanning and stress-testing capabilities. The graph uses README statements and SOURCE INDEX references for relationships; some UI and subsystem details are documented but their implementation was not sampled.

Main entry points: [`src/app/api/scrape/route.js`](https://github.com/probimkim/scraperhouse/blob/main/src/app/api/scrape/route.js) (Scrape endpoint), [`src/app/api/strix/stress/route.js`](https://github.com/probimkim/scraperhouse/blob/main/src/app/api/strix/stress/route.js) (Stress test endpoint), [`src/lib/mongodb.js`](https://github.com/probimkim/scraperhouse/blob/main/src/lib/mongodb.js) (MongoDB connection), [`src/app/api/sherlock/route.js`](https://github.com/probimkim/scraperhouse/blob/main/src/app/api/sherlock/route.js) (Sherlock endpoint)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_forms["Forms extraction"]
  node_forms_ui["Forms workspace<br/>[page.js]"]
  node_scrape_api["Scrape endpoint<br/>[route.js]"]
  node_scraper["Forms scraper<br/>[scraper.js]"]
  node_ocr["Image OCR<br/>[ocrEngine.js]"]
  node_ocr_api["OCR endpoint<br/>[route.js]"]
  node_image_storage["Image storage<br/>[cloudinary.js]"]
  node_image_api["Image delivery<br/>[route.js]"]
  node_image_proxy["Image proxy<br/>[route.js]"]
end

subgraph group_investigation["Investigation tools"]
  node_sherlock_ui["Sherlock workspace<br/>[page.js]"]
  node_sherlock_api["Sherlock endpoint<br/>[route.js]"]
  node_sherlock_engine["Username hunter<br/>[sherlockEngine.js]"]
  node_diagram_ui["Diagram workspace<br/>[page.js]"]
  node_diagram_api["Diagram endpoint<br/>[route.js]"]
  node_github["GitHub inspection<br/>[github.js]"]
  node_diagram_generator["AI diagram generator"]
end

subgraph group_security["Security assessment"]
  node_strix_ui["Strix workspace<br/>[page.js]"]
  node_scan_api["Security scan endpoint<br/>[route.js]"]
  node_strix_engine["Security scanner<br/>[strixEngine.js]"]
  node_stress_api["Stress test endpoint<br/>[route.js]"]
  node_stress_engine["Stress and chaos engine<br/>[stressEngine.js]"]
  node_chaos_generator["Chaos suite generator"]
end

subgraph group_platform["Shared platform"]
  node_dashboard["Dashboard hub<br/>[page.js]"]
  node_scrape_data[("Scrape records<br/>[ScrapeResult.js]")]
  node_stored_images[("Stored images<br/>[StoredImage.js]")]
  node_sherlock_data[("Sherlock history<br/>[SherlockResult.js]")]
  node_scan_data[("Security scan history")]
  node_errors_ui["Error monitor<br/>[page.js]"]
  node_errors_api["Error log API<br/>[route.js]"]
  node_error_data[("Global error logs<br/>[GlobalErrorLog.js]")]
  node_database["MongoDB connection<br/>[mongodb.js]"]
end

node_user(("Dashboard user"))
node_cloudinary["Cloudinary CDN"]
node_github_service["GitHub service"]
node_groq["Groq AI"]

node_user -->|"opens"| node_dashboard
node_dashboard -->|"launches"| node_forms_ui
node_dashboard -->|"launches"| node_sherlock_ui
node_dashboard -->|"launches"| node_diagram_ui
node_user -->|"submits form"| node_forms_ui
node_forms_ui -.->|"requests scrape"| node_scrape_api
node_scrape_api -->|"connects"| node_database
node_scrape_api -->|"runs"| node_scraper
node_scraper -->|"uploads images"| node_image_storage
node_image_storage -.->|"stores assets"| node_cloudinary
node_scraper -->|"uses OCR"| node_ocr
node_scrape_api -->|"updates records"| node_scrape_data
node_scrape_api -->|"logs failures"| node_error_data
node_ocr_api -.->|"runs OCR"| node_ocr
node_image_api -.->|"serves fallback"| node_stored_images
node_image_proxy -.->|"supports image export"| node_forms_ui
node_user -->|"starts search"| node_sherlock_ui
node_sherlock_ui -.->|"submits username"| node_sherlock_api
node_sherlock_api -->|"hunts sites"| node_sherlock_engine
node_sherlock_api -->|"persists results"| node_sherlock_data
node_sherlock_api -->|"connects"| node_database
node_user -->|"requests diagram"| node_diagram_ui
node_diagram_ui -.->|"submits repository"| node_diagram_api
node_diagram_api -->|"inspects repository"| node_github
node_diagram_api -->|"generates diagram"| node_diagram_generator
node_github -.->|"fetches repository data"| node_github_service
node_diagram_generator -.->|"requests inference"| node_groq
node_user -->|"starts assessment"| node_strix_ui
node_strix_ui -.->|"requests scan"| node_scan_api
node_scan_api -->|"runs scan"| node_strix_engine
node_scan_api -->|"persists scan"| node_scan_data
node_scan_api -->|"connects"| node_database
node_strix_ui -.->|"requests stress test"| node_stress_api
node_stress_api -->|"runs test"| node_stress_engine
node_stress_api -->|"generates suite"| node_chaos_generator
node_stress_api -->|"persists report"| node_scan_data
node_stress_api -->|"connects"| node_database
node_user -->|"views diagnostics"| node_errors_ui
node_errors_ui -.->|"loads logs"| node_errors_api
node_errors_api -->|"connects"| node_database
node_errors_api -->|"reads logs"| node_error_data

click node_dashboard "https://github.com/probimkim/scraperhouse/blob/main/src/app/page.js"
click node_forms_ui "https://github.com/probimkim/scraperhouse/blob/main/src/app/ms-forms/page.js"
click node_scrape_api "https://github.com/probimkim/scraperhouse/blob/main/src/app/api/scrape/route.js"
click node_scraper "https://github.com/probimkim/scraperhouse/blob/main/src/lib/scraper.js"
click node_ocr "https://github.com/probimkim/scraperhouse/blob/main/src/lib/ocrEngine.js"
click node_ocr_api "https://github.com/probimkim/scraperhouse/blob/main/src/app/api/scraper/%5Bslug%5D/ocr/route.js"
click node_image_storage "https://github.com/probimkim/scraperhouse/blob/main/src/lib/cloudinary.js"
click node_image_api "https://github.com/probimkim/scraperhouse/blob/main/src/app/api/images/%5Bslug%5D/%5BimageKey%5D/route.js"
click node_image_proxy "https://github.com/probimkim/scraperhouse/blob/main/src/app/api/proxy-image/route.js"
click node_scrape_data "https://github.com/probimkim/scraperhouse/blob/main/src/models/ScrapeResult.js"
click node_stored_images "https://github.com/probimkim/scraperhouse/blob/main/src/models/StoredImage.js"
click node_sherlock_ui "https://github.com/probimkim/scraperhouse/blob/main/src/app/sherlock/page.js"
click node_sherlock_api "https://github.com/probimkim/scraperhouse/blob/main/src/app/api/sherlock/route.js"
click node_sherlock_engine "https://github.com/probimkim/scraperhouse/blob/main/src/lib/sherlockEngine.js"
click node_sherlock_data "https://github.com/probimkim/scraperhouse/blob/main/src/models/SherlockResult.js"
click node_diagram_ui "https://github.com/probimkim/scraperhouse/blob/main/src/app/gitdiagram/page.js"
click node_diagram_api "https://github.com/probimkim/scraperhouse/blob/main/src/app/api/gitdiagram/generate/route.js"
click node_github "https://github.com/probimkim/scraperhouse/blob/main/src/lib/github.js"
click node_diagram_generator "https://github.com/probimkim/scraperhouse/blob/main/src/lib/diagramGenerator.js"
click node_strix_ui "https://github.com/probimkim/scraperhouse/blob/main/src/app/strix/page.js"
click node_scan_api "https://github.com/probimkim/scraperhouse/blob/main/src/app/api/strix/scan/route.js"
click node_strix_engine "https://github.com/probimkim/scraperhouse/blob/main/src/lib/strixEngine.js"
click node_stress_api "https://github.com/probimkim/scraperhouse/blob/main/src/app/api/strix/stress/route.js"
click node_stress_engine "https://github.com/probimkim/scraperhouse/blob/main/src/lib/stressEngine.js"
click node_chaos_generator "https://github.com/probimkim/scraperhouse/blob/main/src/lib/chaosMeshGenerator.js"
click node_scan_data "https://github.com/probimkim/scraperhouse/blob/main/src/models/SecurityScanResult.js"
click node_errors_ui "https://github.com/probimkim/scraperhouse/blob/main/src/app/errors/page.js"
click node_errors_api "https://github.com/probimkim/scraperhouse/blob/main/src/app/api/errors/route.js"
click node_error_data "https://github.com/probimkim/scraperhouse/blob/main/src/models/GlobalErrorLog.js"
click node_database "https://github.com/probimkim/scraperhouse/blob/main/src/lib/mongodb.js"

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_forms_ui,node_scrape_api,node_scraper,node_ocr,node_ocr_api,node_image_storage,node_image_api,node_image_proxy,node_user toneBlue
class node_sherlock_ui,node_sherlock_api,node_sherlock_engine,node_diagram_ui,node_diagram_api,node_github,node_diagram_generator toneAmber
class node_strix_ui,node_scan_api,node_strix_engine,node_stress_api,node_stress_engine,node_chaos_generator toneMint
class node_dashboard,node_scrape_data,node_stored_images,node_sherlock_data,node_scan_data,node_errors_ui,node_errors_api,node_error_data,node_database toneRose
class node_cloudinary,node_github_service,node_groq toneIndigo
```

## Components

### Forms extraction

- [Forms workspace](https://github.com/probimkim/scraperhouse/blob/main/src/app/ms-forms/page.js): `src/app/ms-forms/page.js`
- [Scrape endpoint](https://github.com/probimkim/scraperhouse/blob/main/src/app/api/scrape/route.js): `src/app/api/scrape/route.js`
- [Forms scraper](https://github.com/probimkim/scraperhouse/blob/main/src/lib/scraper.js): `src/lib/scraper.js`
- [Image OCR](https://github.com/probimkim/scraperhouse/blob/main/src/lib/ocrEngine.js): `src/lib/ocrEngine.js`
- [OCR endpoint](https://github.com/probimkim/scraperhouse/blob/main/src/app/api/scraper/%5Bslug%5D/ocr/route.js): `src/app/api/scraper/[slug]/ocr/route.js`
- [Image storage](https://github.com/probimkim/scraperhouse/blob/main/src/lib/cloudinary.js): `src/lib/cloudinary.js`
- [Image delivery](https://github.com/probimkim/scraperhouse/blob/main/src/app/api/images/%5Bslug%5D/%5BimageKey%5D/route.js): `src/app/api/images/[slug]/[imageKey]/route.js`
- [Image proxy](https://github.com/probimkim/scraperhouse/blob/main/src/app/api/proxy-image/route.js): `src/app/api/proxy-image/route.js`

### Investigation tools

- [Sherlock workspace](https://github.com/probimkim/scraperhouse/blob/main/src/app/sherlock/page.js): `src/app/sherlock/page.js`
- [Sherlock endpoint](https://github.com/probimkim/scraperhouse/blob/main/src/app/api/sherlock/route.js): `src/app/api/sherlock/route.js`
- [Username hunter](https://github.com/probimkim/scraperhouse/blob/main/src/lib/sherlockEngine.js): `src/lib/sherlockEngine.js`
- [Diagram workspace](https://github.com/probimkim/scraperhouse/blob/main/src/app/gitdiagram/page.js): `src/app/gitdiagram/page.js`
- [Diagram endpoint](https://github.com/probimkim/scraperhouse/blob/main/src/app/api/gitdiagram/generate/route.js): `src/app/api/gitdiagram/generate/route.js`
- [GitHub inspection](https://github.com/probimkim/scraperhouse/blob/main/src/lib/github.js): `src/lib/github.js`
- [AI diagram generator](https://github.com/probimkim/scraperhouse/blob/main/src/lib/diagramGenerator.js): `src/lib/diagramGenerator.js`

### Security assessment

- [Strix workspace](https://github.com/probimkim/scraperhouse/blob/main/src/app/strix/page.js): `src/app/strix/page.js`
- [Security scan endpoint](https://github.com/probimkim/scraperhouse/blob/main/src/app/api/strix/scan/route.js): `src/app/api/strix/scan/route.js`
- [Security scanner](https://github.com/probimkim/scraperhouse/blob/main/src/lib/strixEngine.js): `src/lib/strixEngine.js`
- [Stress test endpoint](https://github.com/probimkim/scraperhouse/blob/main/src/app/api/strix/stress/route.js): `src/app/api/strix/stress/route.js`
- [Stress and chaos engine](https://github.com/probimkim/scraperhouse/blob/main/src/lib/stressEngine.js): `src/lib/stressEngine.js`
- [Chaos suite generator](https://github.com/probimkim/scraperhouse/blob/main/src/lib/chaosMeshGenerator.js): `src/lib/chaosMeshGenerator.js`

### Shared platform

- [Dashboard hub](https://github.com/probimkim/scraperhouse/blob/main/src/app/page.js): `src/app/page.js`
- [Scrape records](https://github.com/probimkim/scraperhouse/blob/main/src/models/ScrapeResult.js): `src/models/ScrapeResult.js`
- [Stored images](https://github.com/probimkim/scraperhouse/blob/main/src/models/StoredImage.js): `src/models/StoredImage.js`
- [Sherlock history](https://github.com/probimkim/scraperhouse/blob/main/src/models/SherlockResult.js): `src/models/SherlockResult.js`
- [Security scan history](https://github.com/probimkim/scraperhouse/blob/main/src/models/SecurityScanResult.js): `src/models/SecurityScanResult.js`
- [Error monitor](https://github.com/probimkim/scraperhouse/blob/main/src/app/errors/page.js): `src/app/errors/page.js`
- [Error log API](https://github.com/probimkim/scraperhouse/blob/main/src/app/api/errors/route.js): `src/app/api/errors/route.js`
- [Global error logs](https://github.com/probimkim/scraperhouse/blob/main/src/models/GlobalErrorLog.js): `src/models/GlobalErrorLog.js`
- [MongoDB connection](https://github.com/probimkim/scraperhouse/blob/main/src/lib/mongodb.js): `src/lib/mongodb.js`

### Other components

- **Dashboard user**
- **Cloudinary CDN**
- **GitHub service**
- **Groq AI**

## Connections

- Dashboard user → Dashboard hub: opens
- Dashboard hub → Forms workspace: launches
- Dashboard hub → Sherlock workspace: launches
- Dashboard hub → Diagram workspace: launches
- Dashboard user → Forms workspace: submits form
- Forms workspace → Scrape endpoint: requests scrape
- Scrape endpoint → MongoDB connection: connects (evidence: `src/app/api/scrape/route.js`)
- Scrape endpoint → Forms scraper: runs (evidence: `src/app/api/scrape/route.js`)
- Forms scraper → Image storage: uploads images (evidence: `src/lib/scraper.js`)
- Image storage → Cloudinary CDN: stores assets
- Forms scraper → Image OCR: uses OCR (evidence: `src/lib/scraper.js`)
- Scrape endpoint → Scrape records: updates records (evidence: `src/app/api/scrape/route.js`)
- Scrape endpoint → Global error logs: logs failures (evidence: `src/app/api/scrape/route.js`)
- OCR endpoint → Image OCR: runs OCR
- Image delivery → Stored images: serves fallback
- Image proxy → Forms workspace: supports image export
- Dashboard user → Sherlock workspace: starts search
- Sherlock workspace → Sherlock endpoint: submits username
- Sherlock endpoint → Username hunter: hunts sites (evidence: `src/app/api/sherlock/route.js`)
- Sherlock endpoint → Sherlock history: persists results (evidence: `src/app/api/sherlock/route.js`)
- Sherlock endpoint → MongoDB connection: connects (evidence: `src/app/api/sherlock/route.js`)
- Dashboard user → Diagram workspace: requests diagram
- Diagram workspace → Diagram endpoint: submits repository
- Diagram endpoint → GitHub inspection: inspects repository (evidence: `src/app/api/gitdiagram/generate/route.js`)
- Diagram endpoint → AI diagram generator: generates diagram (evidence: `src/app/api/gitdiagram/generate/route.js`)
- GitHub inspection → GitHub service: fetches repository data
- AI diagram generator → Groq AI: requests inference
- Dashboard user → Strix workspace: starts assessment
- Strix workspace → Security scan endpoint: requests scan
- Security scan endpoint → Security scanner: runs scan (evidence: `src/app/api/strix/scan/route.js`)
- Security scan endpoint → Security scan history: persists scan (evidence: `src/app/api/strix/scan/route.js`)
- Security scan endpoint → MongoDB connection: connects (evidence: `src/app/api/strix/scan/route.js`)
- Strix workspace → Stress test endpoint: requests stress test
- Stress test endpoint → Stress and chaos engine: runs test (evidence: `src/app/api/strix/stress/route.js`)
- Stress test endpoint → Chaos suite generator: generates suite (evidence: `src/app/api/strix/stress/route.js`)
- Stress test endpoint → Security scan history: persists report (evidence: `src/app/api/strix/stress/route.js`)
- Stress test endpoint → MongoDB connection: connects (evidence: `src/app/api/strix/stress/route.js`)
- Dashboard user → Error monitor: views diagnostics
- Error monitor → Error log API: loads logs
- Error log API → MongoDB connection: connects (evidence: `src/app/api/errors/route.js`)
- Error log API → Global error logs: reads logs (evidence: `src/app/api/errors/route.js`)
