How nirholas/carsearch works
carsearch searches vehicle listings across marketplaces, dealer inventories, auctions, and salvage sources, then turns them into deduplicated, normalized, searchable market data. The primary workflow is a shopper query through the API or web UI, source crawling, listing validation and enrichment, storage, and ranked results; plain-English queries can be parsed before search. Separate capabilities include VIN and recall information, sold-price comparisons, market trends, valuation, and source-status reporting. The README documents these capabilities; sampled excerpts confirm key pipeline and parser calls, but do not expose every route or enrichment connection.
Main entry points: server.ts JSON API · pipeline.ts Crawl pipeline · store.ts Store interface · open.ts Store selection
Components 27
Listing collection
- Crawl pipeline
src/pipeline.ts - Source adapters
src/sources/index.ts - Source registry
src/sources/registry.ts - Fetch and browser
src/transport/fetcher.ts
Listing processing
- Normalize and validate
src/core/normalize.ts - VIN enrichment
src/enrich/vpic.ts - Recall lookup
src/enrich/recalls.ts - VIN deduplication
src/core/dedupe.ts - Result ranking
src/core/rank.ts - Facet filtering
src/core/facets.ts
Data and insights
- Store interface
src/store/store.ts - Store selection
src/store/open.ts - Postgres store
src/store/postgres.ts - SQLite adapter
src/store/sqlite-adapter.ts - Market analytics
src/analytics/market.ts
Search experience
- CLI
src/cli.ts - Web UI
web/app.js - JSON API
src/api/server.ts - Query interpretation
src/nl/index.ts - Pattern parser
src/nl/parse.ts - Claude parser
src/nl/llm.ts
Other components
- Shopper
- CLI user
- Listing sites
- Anthropic Claude
- NHTSA
- Database
Connections 30
- Shopper → Web UI: searches
- CLI user → CLI: queries
- Web UI → JSON API: requests
- JSON API → Query interpretation: interprets ask
- Query interpretation → Pattern parser: parses locally
- Query interpretation → Claude parser: escalates query
- Claude parser → Anthropic Claude: requests parse
- JSON API → Crawl pipeline: starts crawl
- CLI → Crawl pipeline: starts crawl
- Crawl pipeline → Source adapters: dispatches crawl
- Source adapters → Fetch and browser: fetches pages
- Fetch and browser → Listing sites: requests listings
- Crawl pipeline → VIN enrichment: enriches listings
- VIN enrichment → NHTSA: decodes VINs
- JSON API → Recall lookup: looks up recalls
- Recall lookup → NHTSA: requests campaigns
- Crawl pipeline → Normalize and validate: validates listings
- Crawl pipeline → VIN deduplication: groups listings
- Crawl pipeline → Store interface: writes listings
- JSON API → Store interface: searches listings
- Store interface → Store selection: selects backend
- Store selection → Postgres store: opens Postgres
- Store selection → SQLite adapter: opens SQLite
- Postgres store → Database: reads and writes
- SQLite adapter → Database: reads and writes
- JSON API → Result ranking: ranks results
- JSON API → Facet filtering: parses filters
- JSON API → Market analytics: builds market report
- Market analytics → Store interface: uses listing data
- JSON API → Source registry: reports source status