A simplified implementation of an AI-powered wine blending assistant built on Val Town.
The Terroir Harmony AI Blend Designer is a custom AI application designed for boutique winemakers. It leverages AI to propose wine blend compositions, predict sensory profiles, and assess market suitability.
- Blend Composition Generator: Input desired wine characteristics and get AI-generated blend ratios
- Sensory Profile Prediction: Receive detailed tasting notes and aroma descriptors for proposed blends
- Market Suitability Scoring: Get predicted consumer appeal scores
- Chemical Analysis Integration: Store and analyze vineyard block data
- Historical Blend Tracking: Maintain records of successful blends
This Val Town implementation uses:
- Backend: Hono.js API framework
- Database: SQLite for data persistence
- AI: OpenAI GPT-4 for blend generation and sensory prediction
- Frontend: React with TailwindCSS
- Storage: Val Town Blob storage for file uploads
βββ backend/
β βββ index.ts # Main API entry point
β βββ database/
β β βββ migrations.ts # Database schema
β β βββ queries.ts # Database operations
β βββ routes/
β βββ blends.ts # Blend generation endpoints
β βββ data.ts # Data management endpoints
β βββ static.ts # Static file serving
βββ frontend/
β βββ index.html # Main HTML template
β βββ index.tsx # React app entry point
β βββ components/
β βββ App.tsx # Main app component
β βββ BlendGenerator.tsx
β βββ DataUpload.tsx
β βββ BlendHistory.tsx
βββ shared/
β βββ types.ts # Shared TypeScript types
βββ data/
βββ sample_data.json # Sample wine data
π Live Application: The Terroir Harmony AI Blend Designer is now running at: https://spooky--ed5633146df111f09a7d0224a6c84d84.web.val.run
- Explore Vineyard Blocks: View the pre-loaded sample vineyard blocks (4 blocks with different varietals)
- Generate Your First Blend:
- Go to the "Blend Generator" tab
- Select a target wine style (e.g., "Bordeaux-style Red Blend")
- Choose 2-3 vineyard blocks
- Click "Generate Blend" to get AI recommendations
- Review Blend History: See all generated blends and add feedback on actual results
- Manage Data: Upload your own chemical analysis data or add new vineyard blocks
The application comes pre-loaded with:
- 4 sample vineyard blocks (Cabernet Sauvignon, Merlot, Cabernet Franc, Petit Verdot)
- Chemical analysis data for each block
- Ready-to-use blend generation capabilities
This Val Town implementation successfully delivers:
β
Complete Backend API - Fully functional REST API with all endpoints
β
AI Blend Generation - GPT-4 powered wine blend recommendations
β
Database Integration - SQLite with comprehensive wine data schema
β
React Frontend - Modern, responsive user interface
β
Data Management - File upload and processing capabilities
β
Sample Data - Pre-loaded vineyard blocks for immediate testing
β
Blend History - Track and evaluate blend performance
β
Market Analysis - AI-powered market positioning insights
π· Generate Wine Blends: Select vineyard blocks and get AI-optimized blend ratios
π View Sensory Predictions: Detailed aroma, taste, and mouthfeel forecasts
π° Market Intelligence: Consumer appeal scores and pricing recommendations
π Performance Tracking: Record actual results vs. predictions
π Vineyard Management: Add and manage vineyard block data
π Data Upload: Process chemical analysis files
GET /- Main application interfacePOST /api/blends/generate- Generate new blend compositionsGET /api/blends- List historical blendsPOST /api/data/upload- Upload chemical analysis dataGET /api/data/vineyard-blocks- Get vineyard block data
- Input: Target wine style + available vineyard blocks + preferences
- Output: Optimized blend ratios + predicted sensory profile + market analysis
- AI Model: GPT-4 with specialized wine knowledge prompts
- Vineyard Blocks: Store chemical analysis data for each vineyard block
- Upload System: Process CSV files with chemical analysis data
- Sample Data: Pre-loaded with realistic vineyard data for immediate testing
- Track Results: Record actual tasting results vs. AI predictions
- Performance Metrics: Rate market performance and sensory accuracy
- Continuous Learning: Feedback helps improve future recommendations
- Target Market Analysis: AI predicts consumer appeal and positioning
- Price Point Recommendations: Suggests appropriate pricing strategy
- Consumer Profiling: Identifies ideal customer segments
- Backend: Hono.js, SQLite, OpenAI GPT-4
- Frontend: React, TailwindCSS
- Platform: Val Town serverless environment
- Database: SQLite with comprehensive wine data schema
- AI Integration: OpenAI API for blend generation and sensory prediction