How dpan538/coffee-flavor-research works
flavorwords is a bilingual coffee-tasting PWA: a drinker sets cup context, answers adaptive sensory questions, chooses flavor words, may take a second look, then keeps and shares a flavor card. The runtime inference package also supports a separate React site, while the repository documents a professional-description corpus and its preparation. The README establishes the product stages and additional capabilities; source excerpts show selected session-engine and PWA wiring, so uncertain connections are omitted.
Main entry points: App.vue PWA application · session.ts Session API · routes.ts Web routes · engine.ts Vector engine
Components 25
Tasting PWA
- PWA application
apps/pwa/src/App.vue - Cup context
apps/pwa/src/components/ContextSetupCard.vue - Guided questions
apps/pwa/src/components/QuizCard.vue - Word selection
apps/pwa/src/components/FirstDescriptionCard.vue - Second look
apps/pwa/src/components/FinalAttributionCard.vue - Flavor card
apps/pwa/src/components/FlavorCard.vue - Card export
apps/pwa/src/exportCard.ts - Flow state
apps/pwa/src/store.ts - PWA entry
apps/pwa/src/main.ts
Flavor inference
- Session API
packages/flavor-data/src/product-vector-v1/session.ts - Vector engine
packages/flavor-data/src/product-vector-v1/engine.ts - Sensory flow
packages/flavor-data/src/product-vector-v1/flow.ts - Question bank
packages/flavor-data/src/product-vector-v1/dynamicBank.ts - Word mapping
packages/flavor-data/src/product-vector-v1/lexicon.ts - Reference neighbours
packages/flavor-data/src/product-vector-v1/neighbours.ts - Flavor vocabulary
packages/flavor-data/src/descriptors.ts - Comparison data
packages/flavor-data/src/comparison.ts
Corpus research
- Professional sources
db/scripts/descriptor-pipeline.py - Source adapters
db/adapters/professional_sources/jats.py
Web companion
- Web routes
app/routes.ts - Home page
app/routes/home.tsx - Flavor atlas
app/routes/atlas.tsx - Methodology
app/routes/methodology.tsx - Flavor detail
app/routes/flavor.tsx
Other components
- Coffee drinker
Connections 27
- Coffee drinker → PWA application: starts tasting
- PWA entry → PWA application: mounts
- PWA entry → Flow state: restores flow
- PWA application → Cup context: shows context
- PWA application → Guided questions: shows questions
- PWA application → Word selection: shows choices
- PWA application → Second look: shows second look
- PWA application → Flavor card: shows result
- Cup context → Flow state: updates context
- Flow state → Session API: advances session
- Session API → Vector engine: infers vectors
- Session API → Sensory flow: builds description
- Session API → Question bank: gets prompts
- Session API → Word mapping: maps utterance
- Sensory flow → Vector engine: builds user vector
- Sensory flow → Reference neighbours: uses references
- Vector engine → Comparison data: uses profiles
- Vector engine → Flavor vocabulary: uses concepts
- Flavor card → Card export: exports card
- Professional sources → Source adapters: acquires material
- Web routes → Home page: routes to
- Web routes → Flavor atlas: routes to
- Web routes → Methodology: routes to
- Web routes → Flavor detail: routes to
- Home page → Flavor vocabulary: uses vocabulary
- Flavor atlas → Flavor vocabulary: uses vocabulary
- Flavor detail → Flavor vocabulary: uses vocabulary