scripts/holds the TypeScript pipeline entrypoints; shared helpers live inscripts/lib/.config/contains configuration and mapping files used by normalization.data/stores generated outputs (raw/,normalized/,aggregated/,changes/) andlatest/symlinks; treat as build artifacts.logs/stores run logs by date.types/is for shared TypeScript types.docs/andREADME.mdprovide architecture and usage details.
npm installinstalls dependencies.npm run fetchpulls brand data from Convex and saves raw extracts.npm run normalizemaps raw data into the unified schema.npm run aggregatecombines brand data into aggregated outputs.npm run detect-changescomputes new/removed/updated products.npm run pipelineruns the full fetch → normalize → aggregate → detect-changes chain.npm run download-imagesdownloads images referenced in normalized data.npm run update-symlinksrefreshesdata/**/latestsymlinks.- Ad-hoc checks:
tsx scripts/test-scrapers.tsortsx scripts/test-hugger-mugger.ts.
- TypeScript with ESM imports;
tsconfig.jsonenforcesstrictand no emit. - Use 2-space indentation, semicolons, and single quotes to match existing files.
- File names: kebab-case (e.g.,
detect-changes.ts). Types/interfaces: PascalCase. Variables/functions: camelCase. - No formatter/linter configured; keep changes consistent with nearby code.
- No formal test runner is set up. Use the
scripts/test-*.tsutilities for manual verification. - When adding new test utilities, follow the
test-*.tsnaming pattern and keep them inscripts/.
- Commit messages follow short prefixes like
feat: ...,wip: ..., and data updates useData update: YYYY-MM-DD. - Keep commits scoped to one concern; include notes if a pipeline run updated
data/. - PRs should include a concise summary, affected commands run, and any data-impact notes; link related issues when applicable.
- Use
.envfor secrets; at minimum setCONVEX_URL. Do not commit secrets or local.envfiles.