How 3mmaryasser/uk-property-scraper works
This repository is a UK property-listing scraper, monitoring API, and dashboard. Users browse and filter listings, inspect images and price history, and view market-pulse and pipeline-health data; operators trigger scheduled or manual scrape runs. Scraping separates search-page discovery from per-listing extraction, then validates and stores listing, image, price-history, run, and quality data. The graph preserves documented stages and dashboard capabilities; unsampled worker and health internals are represented at their existing source paths, with those links grounded in the README rather than inspected implementation.
Main entry points: scrape-listing.processor.ts Listing worker · runs.service.ts Run and health data · api.ts Dashboard API client · crawl-search.processor.ts Search crawler
Components 27
Scrape pipeline
- Scrape scheduler
apps/api/src/scheduler/scrape.scheduler.ts - Manual trigger
apps/api/src/queue/scrape.controller.ts - Scrape producer
apps/api/src/queue/scrape.producer.ts - Search queue
apps/api/src/queue/queue.constants.ts - Search crawler
apps/api/src/queue/crawl-search.processor.ts - Listing queue
apps/api/src/queue/queue.constants.ts - Listing worker
apps/api/src/queue/scrape-listing.processor.ts - Browser rendering
apps/api/src/scraper/browser.service.ts - Portal extraction
packages/core/src/adapters/onthemarket.adapter.ts - Listing validation
packages/core/src/listing.schema.ts
API and monitoring
- Run and quality tracker
apps/api/src/queue/run-tracker.service.ts - Listing endpoints
apps/api/src/listings/listings.controller.ts - Run endpoints
apps/api/src/runs/runs.controller.ts - Run and health data
apps/api/src/runs/runs.service.ts - Pipeline health
apps/api/src/health/health.controller.ts - Metrics endpoint
apps/api/src/health/metrics.controller.ts
Listing data
- Listing queries and upsert
apps/api/src/listings/listings.service.ts - Prisma client
apps/api/src/prisma/prisma.service.ts - PostgreSQL
packages/database/src/index.ts
Keystone dashboard
- Listings dashboard
apps/web/app/page.tsx - Property detail
apps/web/app/listings/[id]/page.tsx - Health console
apps/web/app/health/page.tsx - Dashboard API client
apps/web/lib/api.ts
Other components
- Scrape operator
- OnTheMarket
- Dashboard visitor
- REST API
Connections 30
- Scrape operator → Manual trigger: triggers
apps/api/src/queue/scrape.controller.ts - Scrape scheduler → Scrape producer: starts runs
README.md - Manual trigger → Scrape producer: starts run
apps/api/src/queue/scrape.controller.ts - Scrape producer → Search queue: enqueues search
README.md - Search queue → Search crawler: dispatches
README.md - Search crawler → Listing queue: enqueues listings
README.md - Search crawler → Search queue: enqueues next page
README.md - Listing queue → Listing worker: dispatches
README.md - Listing worker → Browser rendering: renders pages
README.md - Browser rendering → OnTheMarket: fetches pages
README.md - Listing worker → Portal extraction: extracts listing
README.md - Listing worker → Listing validation: validates listing
README.md - Listing worker → Listing queries and upsert: upserts listing
README.md - Listing worker → Run and quality tracker: tracks run quality
README.md - Run and quality tracker → Run and health data: finalizes run
apps/api/src/queue/run-tracker.service.ts - Listing endpoints → Listing queries and upsert: queries listings
apps/api/src/listings/listings.controller.ts - Run endpoints → Run and health data: queries runs
apps/api/src/runs/runs.controller.ts - Pipeline health → Run and health data: reads pipeline state
apps/api/src/health/health.controller.ts - Listing queries and upsert → Prisma client: queries and writes
apps/api/src/listings/listings.service.ts - Run and health data → Prisma client: queries and writes
apps/api/src/runs/runs.service.ts - Prisma client → PostgreSQL: persists records
apps/api/src/prisma/prisma.service.ts - Dashboard visitor → Listings dashboard: browses
README.md - Listings dashboard → Dashboard API client: requests listings and pulse
apps/web/app/page.tsx - Property detail → Dashboard API client: requests property
apps/web/app/listings/[id]/page.tsx - Health console → Dashboard API client: requests health and runs
README.md - Dashboard API client → REST API: calls
apps/web/lib/api.ts - REST API → Listing endpoints: routes listing requests
README.md - REST API → Run endpoints: routes run requests
README.md - REST API → Pipeline health: routes health requests
README.md - REST API → Metrics endpoint: serves metrics
README.md