SPB Git

spb/rareindex

Public
1.1 KB · 19 lines markdown
1# Source connectors23Every source lives in `connectors/<engine>/<source-id>/index.ts` and is declared in `registry.json` (§106).4Adding a marketplace requires only (§197):561. **metadata** — an entry in `registry.json` (`module` points to the folder, e.g. `"api/scryfall"`);72. **extraction schema** — the payload shape the connector captures in `crawl()` (typed with Zod);83. **normalization adapter** — a pure `normalize(raw)` returning canonical `NormalizedRecord[]`;94. **fixtures** — at least one real captured payload in `data/fixtures/<source-id>/*.json` and a10   `*.test.ts` next to the connector calling `runFixtureSuite`.1112The generic pipeline (raw store → normalizer → entity resolution → dedupe → validation → canonical13tables → valuation → indices) then works without changes.1415Rules: never invent data, keep source quirks inside the connector, store the source's own dates,16keep the native currency, respect robots/terms/rate limits, and never bypass access controls (§179).1718Module contract: `export default (meta: ConnectorMeta) => RareIndexConnector`.19
Files · 93afc664ddb333d55c451ac27e1a79bfd8e89448
Menu

Theme