Wine Lot Management

A full-stack production lot management application built for winemakers who would rather talk about their wine than fill out forms. Instead of clicking through fields, cellar staff type natural language messages — "pH came back at 3.62, racked to barrel 7, added 25ppm SO2" — and the system parses the input, maps values to the correct database columns, creates a new immutable version of the lot, and records a structured changelog. One message, full audit trail.

Every lot modification — whether from the chat interface, a direct field edit, or an archive action — creates a new version row rather than overwriting existing data. The full history is always available through the changelog view or CSV export, giving winemakers complete traceability from crush to bottle.

Try the Demo

<$9/month

Total infrastructure cost for a typical small winery

What you get

  • Every lot change versioned and traceable from crush to bottle
  • Audit-ready changelog and CSV export for compliance reporting
  • No forms — update lots by typing or texting from the cellar

Built with

ReactTypeScriptSupabasePostgreSQLOpenAI APIDenoTwilioTailwind CSS

Demo

How it works

Chat-driven updates

The core interaction is a chat interface. A winemaker types a free-text message describing what happened — lab results, racking, additions, blending, anything — either through the web app or by texting a dedicated Twilio phone number from the cellar floor. The system sends the message along with the current lot state to an AI model configured for structured extraction. The model returns a JSON object mapping field names to values, which the backend applies as a new version of the lot. The winemaker sees the update immediately and can review what changed in the changelog.

Append-only versioning

Lots are never updated in place. Every change — chat update, direct field edit, or archive action — inserts a new row with an incremented version number, the full lot state, and a JSON changelog recording exactly what changed and what the previous values were. Lot numbers follow a VAR-VINT-LOT-VERS format (e.g., CS-22-A-003), so every version is a distinct, traceable record.

48-field lot model

Each lot tracks 48 production-domain fields spanning the full winemaking lifecycle: identification, harvest data, fermentation parameters, aging details, bottling records, and compliance information. All fields are stored as text for flexibility — the AI handles type interpretation, and the structured extraction prompt contains every field name so the model knows the full schema.

AI-generated lot overviews

A separate AI function analyzes the full lot state and produces a structured summary: current production status, early quality indicators based on the recorded chemistry, any changelog patterns worth flagging, and marketing angle suggestions for the finished wine. Results are cached client-side to avoid redundant API calls.

Architecture

Input

Web Chat or SMS

Natural language lot updates from the cellar

Twilio

Twilio

Pay-per-message (~$0.0079/SMS)

HTTPS + JWT

Application

React + TypeScript

React + TypeScript

Free / open source

Tailwind CSS + shadcn/ui

Tailwind CSS + shadcn/ui

Free / open source

API calls

Backend

Supabase Edge Functions

Supabase Edge Functions

Free tier: 500K invocations/mo

Deno Runtime

Deno Runtime

Included with Supabase

OpenAI API (GPT-4.1)

OpenAI API (GPT-4.1)

~$0.01–0.03 per lot update

7 serverless functions: lot creation, chat updates, direct field edits, AI overview, archive, CSV export, notifications

Supabase SDK

Database

PostgreSQL

PostgreSQL

Free tier: 500MB, 2 projects

Supabase Auth

Supabase Auth + RLS

Row-level security, admin approval flow

48-field lot model with append-only versioning — every change creates a new immutable row with a full changelog

Try it yourself

The interactive demo lets you create and update lots using the chat interface — no sign-up needed.