Contentful Content Model Setup Guide

This guide explains how to extend your Contentful content model to support the new flavor profile visualizations, brewing parameters, and enhanced coffee data.

Overview

The coffee ratings site now includes:

Content Model Changes

1. Coffee Review (pageBlogPost) Content Type

Add the following fields to your existing pageBlogPost content type:

Flavor Profile Fields

Field Name Field ID Type Description Validation
Flavor: Acidity flavorAcidity Number (Decimal) Acidity level (0-10 scale) Min: 0, Max: 10
Flavor: Body flavorBody Number (Decimal) Body/mouthfeel level (0-10 scale) Min: 0, Max: 10
Flavor: Sweetness flavorSweetness Number (Decimal) Sweetness level (0-10 scale) Min: 0, Max: 10
Flavor: Bitterness flavorBitterness Number (Decimal) Bitterness level (0-10 scale) Min: 0, Max: 10
Flavor: Fruitiness flavorFruitiness Number (Decimal) Fruitiness level (0-10 scale) Min: 0, Max: 10
Flavor: Aftertaste flavorAftertaste Number (Decimal) Aftertaste quality (0-10 scale) Min: 0, Max: 10

Tasting Notes Fields

Field Name Field ID Type Description Validation
Primary Tasting Notes tastingNotesPrimary Short text (List) Main flavor notes (e.g., "chocolate", "cherry", "caramel") Required, 1-5 items
Secondary Tasting Notes tastingNotesSecondary Short text (List) Supporting flavor notes Optional, 0-5 items
Tasting Notes Description tastingNotesDescriptor Long text Detailed flavor description Optional

Brewing Parameter Fields (Optional - can be on Brew Method content type instead)

Field Name Field ID Type Description Example
Brew Temperature brewTemp Short text Brewing temperature "93°C" or "200°F"
Brew Ratio brewRatio Short text Coffee to water ratio "1:16"
Brew Time brewTime Short text Total brew time "3:30"
Grind Size grindSize Short text Recommended grind size "Medium-fine"

2. Brew Method Content Type (Recommended Approach)

Instead of adding brewing parameters to each coffee review, it's better to enhance your existing brew method content type:

Add to Existing Brew Method Fields

Field Name Field ID Type Description Example
Temperature temperature Short text Recommended brewing temperature "93°C (200°F)"
Ratio ratio Short text Coffee to water ratio "1:16 (15g:240ml)"
Brew Time brewTime Short text Total extraction time "3:00-3:30"
Grind Size grindSize Short text Recommended grind size "Medium-fine"
Equipment equipment Short text Required equipment "Gooseneck kettle, timer"

Implementation Steps

Step 1: Add Fields to Contentful

  1. Log into your Contentful space: xe1b1r0s7mov

  2. Navigate to Content modelpageBlogPost

  3. Click Add field and create each flavor profile field:

  4. Repeat for all flavor fields: acidity, body, sweetness, bitterness, fruitiness, aftertaste

  5. Add tasting notes fields:

Step 2: Update Brew Method Content Type

  1. Navigate to Content model → Find your brew method content type
  2. Add the brewing parameter fields listed above
  3. Save the content model

Step 3: Populate Existing Content

You have two options:

Option A: Manual Entry (Most Accurate)

Go through each coffee review and add flavor profile scores based on your tasting experience.

Option B: Keep Mock Data (Quick Start)

The current implementation includes intelligent mock data generation that:

To use mock data temporarily, do nothing - the site will automatically generate reasonable flavor profiles until you add real Contentful data.

Step 4: Update Contentful Data Fetching

The code in _data/coffee.js is already set up to:

  1. Check if Contentful fields exist (e.g., flavorAcidity)
  2. Use real data if available
  3. Fall back to intelligent mock data if fields are empty

Once you add the fields to Contentful, simply populate them and rebuild the site.

Data Guidelines

Flavor Profile Scores (0-10 Scale)

Score Description Examples
9-10 Exceptional Vibrant, complex, remarkable
7-8 Very Good Strong, pleasant, well-developed
5-6 Good Present, balanced, noticeable
3-4 Mild Subtle, light, understated
1-2 Very Light Barely present, minimal
0 None Absent

Flavor Dimensions Explained

Tasting Notes Taxonomy

Primary Notes (Choose 2-4):

Secondary Notes (Choose 1-3):

Example Content Entry

High-Quality Washed Ethiopian Coffee

Rating: 9.2/10
Origin: Ethiopia - Yirgacheffe
Process: Washed

Flavor Profile:
- Acidity: 9.0
- Body: 6.5
- Sweetness: 7.5
- Bitterness: 3.0
- Fruitiness: 9.5
- Aftertaste: 8.5

Primary Tasting Notes:
- Blueberry
- Jasmine
- Bergamot

Secondary Tasting Notes:
- Black tea
- Honey
- Silky

Tasting Notes Description:
"This exceptional Yirgacheffe showcases classic Ethiopian characteristics
with explosive blueberry notes, delicate jasmine florals, and a vibrant
bergamot-like acidity. The finish is clean, sweet, and remarkably persistent."

Migration Strategy

Phase 1: Enable Mock Data (Complete)

✅ Site now generates intelligent flavor profiles automatically ✅ All visualizations working with estimated data ✅ No Contentful changes required

Phase 2: Add Contentful Fields (Your Action)

  1. Add flavor profile fields to pageBlogPost
  2. Add brewing parameter fields to brew method content type
  3. Add tasting notes fields

Phase 3: Populate Priority Content

Start with your highest-rated coffees (9+) and work down:

  1. Add accurate flavor profiles
  2. Add detailed tasting notes
  3. Update brew method parameters

Phase 4: Bulk Population

Use Contentful's bulk editing features or API to populate remaining entries.

Testing

After adding fields to Contentful:

  1. Add flavor data to one test coffee review
  2. Rebuild the site: npm run build
  3. Check that the coffee detail page shows the radar chart
  4. Verify the homepage shows the rating histogram
  5. Confirm flavor values match your Contentful entry

Troubleshooting

Radar chart shows mock data instead of Contentful data

Histogram not appearing

Build fails after adding fields

Future Enhancements

Consider adding:

Support

For questions about:


Current Status: ✅ Mock data implementation complete Next Step: Add Contentful fields and populate with real data Estimated Time: 1-2 hours to set up fields, ongoing for data entry