Ingredient seed/import scaffolding
This folder is the starting point for importing “raw materials” datasets (fermentables, hops, yeast, salts, acids, water profiles).
Why this exists
Recipes and the water calculator need a canonical ingredient database. We want to seed it from sources with clear licensing (see docs/modules/verticals/brewery/RAW-MATERIALS-SEEDABLE-SOURCES.md).
Data strategy (high level)
Canonical tables (long-term goal)
fermentablehopyeastsaltacidwater_profile
Crosswalk/provenance (required)
For every imported record, preserve provenance:
source_name,source_url,source_license,retrieved_atsource_key(original identifier/name)raw_payload(JSON blob) in a staging tableconfidence_scoreandconflict_notes
Crosswalk idea:
ingredient_source_map(ingredient_id, source_name, source_key, confidence, notes)
Seed order (recommended)
- BeerProto dataset (MIT) as the base seed.
- Optionally enrich with other sources only after licensing is clear.
- Salts/acids should be curated and maintained by us (small set, high correctness).
Next implementation steps
- Add Prisma models for canonical ingredient tables + staging/provenance tables.
- Implement the CLI entrypoint:
npm run seed:import(seesrc/cli/seed-import.ts). - Add source-specific parsers under
src/seed/sources/*.