Repository Layout
Top-level tree from docs/SYSTEM_OVERVIEW.md § Repository layout.
src/
api/— REST API server (Bun.serve, port 3000)enrichment/pipeline.ts— main orchestrator, exports EnrichV7enrichment/sources/crawlee.ts— primary scraper, ~500 lines, 6 strategies. See Crawlee Scraper.enrichment/sources/domain.ts— see Domain Discoveryenrichment/sources/maps.ts— see Google Placesenrichment/sources/firecrawl.ts— see Firecrawl (feature-flagged, off by default)enrichment/processors/nameUtils.ts— see Name Validationenrichment/processors/emailUtils.ts— email extraction and pattern detectionenrichment/processors/scoring.ts— see Lead Scoringenrichment/config.ts— block lists (~790 lines)enrichment/types.ts— shared interfacesimport/bolagsverket-import.ts— see Bolagsverket Importimport/scb-import.ts— see SCB Importdb/schema.ts— table DDL and indexesqueues/workers.ts— BullMQ workers (see Pipeline)compliance/— GDPR gates: Reklamspärr, Opt-Out Hashes, RoPA Logmocks/validation.ts— placeholder validation layers (P0, see Known Issues)
Other top-level dirs
migrations/— SQL migrations, applied viabun run migrate. See Schema Migrations.autoresearch/— autonomous experiment loop. See Autoresearch Loop.scripts/— utility scripts includingmigrate.tsdocs/— long-form documentation (SYSTEM_OVERVIEW.md is canonical)tests/—bun testfiles