Home espresso brewing feels like alchemy—until you realize the process is pure data. Grind size, water temperature, extraction time, and yield all interact in measurable ways, yet most baristas track these variables on scraps of paper or in fragmented notes. For the H0 Hackathon, one developer set out to change that by building BrewCore, a full-stack espresso companion that logs every shot as structured data and uses AI to deliver personalized coaching.
The result is a platform that treats espresso like a precision instrument rather than a morning ritual. By combining Next.js 15, Vercel, DynamoDB, and Amazon Bedrock, BrewCore turns subjective brewing experiences into actionable insights—without requiring baristas to become data scientists.
From Sticky Notes to Structured Data
Most coffee apps reduce espresso tracking to a simple timer, ignoring the science behind each variable. BrewCore was designed to capture the full complexity of the process:
- Inventory management: Track remaining grams of each coffee bean, including roaster details and low-stock alerts.
- Historical analysis: Compare extraction parameters (grind size, dose, yield, time) across sessions to identify patterns.
- AI-powered coaching: Receive targeted advice based on your machine profile and recent brewing history.
The goal wasn’t just to log shots—it was to create a system that helps users refine their technique over time. By structuring espresso data as a relational dataset, BrewCore bridges the gap between hobbyist brewing and professional quality control.
A Serverless Stack Built for Zero-Infrastructure Management
During development, the biggest challenge was avoiding cloud infrastructure delays. BrewCore solved this by leveraging serverless technologies that eliminate provisioning bottlenecks while maintaining security and scalability.
The application follows a four-stage data flow, each optimized for performance and security:
- User interaction: A Progressive Web App (PWA) built with React runs on Vercel, communicating securely via HTTPS with Next.js 15 Server Actions.
- Authentication: User sign-ins and session tokens are managed at the edge using Amazon Cognito User Pools, ensuring security without dedicated backend services.
- Data persistence: Next.js Server Actions call the AWS SDK v3 directly to read and write to DynamoDB tables, eliminating the need for API Gateways or Lambda layers.
- AI coaching: When users request brewing advice, the app packages their historical data and sends it to Amazon Bedrock’s
nova-micromodel via the Converse API.
This architecture ensures the application remains fully functional even during rapid iteration, a critical advantage in hackathon environments where time is limited.
DynamoDB Design: Optimizing for Real-World Queries
While relational databases dominate when relationships matter, BrewCore’s data model prioritizes UI-driven efficiency. Instead of forcing SQL-style joins, the system uses a multi-table DynamoDB design optimized for O(1) lookups and targeted queries.
The eight specialized tables include:
users– Stores profiles and machine-specific preferences.beans– Tracks inventory, roaster information, and low-stock thresholds.shots– Logs extraction parameters (grind size, dose, yield, time, and flavor notes).interactions&comments– Manages community engagement metrics like likes and feedback.user_stats– Pre-aggregates counters to avoid runtime calculations.follows&product_states– Handles social graph relationships and UI state flags.
Global Secondary Indexes (GSIs) enable fast queries without resource-intensive scans. For example, the community feed retrieves recent public shots efficiently, while inventory alerts trigger when bean quantities fall below a user-defined threshold.
Local Mocking: Eliminating Cloud Provisioning Delays
One of the biggest hurdles in hackathons is waiting for cloud resources to deploy. BrewCore bypassed this issue with a dual-backend interface that allowed full local development before switching to production.
A localStorage-based mock perfectly mirrored the DynamoDB data structure, enabling the entire UI to be built and tested offline. When the developer was ready to deploy, a single environment variable switch rerouted traffic to the live AWS tables—no infrastructure changes required.
This approach not only saved time but also reduced costs during development, as cloud resources were only consumed when necessary.
Teaching AI to Give Personalized Espresso Advice
Generic AI advice—like "grind finer"—is useless without context. BrewCore’s AI coaching becomes effective by grounding responses in the user’s actual brewing data.
The system constructs a structured payload containing:
- The user’s machine profile (e.g., espresso machine model, portafilter size).
- Historical bean inventory and roast levels.
- Recent extraction logs (grind size, water temperature, yield, time).
This context is passed to Amazon Bedrock’s nova-micro model via the Converse API, which then performs trend analysis on the database entries rather than guessing. The result is actionable, machine-specific advice that reflects the barista’s real setup.
Key Takeaways from the Build Process
Building BrewCore revealed several technical lessons that apply beyond hackathons:
- Error handling in Next.js Server Actions is critical. Without an API Gateway or Lambda layer, traditional HTTP error responses disappear. The developer implemented a strict error-handling wrapper for AWS SDK calls, ensuring failures trigger user-friendly UI alerts without exposing sensitive cloud configurations.
- DynamoDB GSIs enforce strict data typing. Attempting to use a boolean (
isPublic) for shot visibility caused Terraform provisioning to fail. The schema had to be normalized to store booleans as strings ("true"or"false"), demonstrating how NoSQL constraints shape application logic.
- LLMs require rigid data grounding. Early iterations of the AI coach produced generic advice because the model lacked context. By injecting structured JSON payloads of the user’s last three shots into the prompt, the system shifted from hallucinating parameters to analyzing real extraction data.
These insights underscore that scalable, user-friendly applications demand more than just cutting-edge tools—they require thoughtful architecture and defensive coding practices.
The Future of Data-Driven Coffee Brewing
BrewCore proves that espresso brewing can evolve from intuition to precision with the right tools. By combining serverless infrastructure, structured data, and AI-powered insights, the platform offers baristas a way to track, analyze, and improve their technique systematically.
While still in its early stages, BrewCore’s architecture sets a new standard for coffee companion apps—one where every shot logged becomes a data point in a larger journey toward mastery. As more users adopt such systems, the gap between home and professional brewing may narrow further, driven not by luck, but by data.
AI summary
H0 Hackathon için geliştirilen BrewCore, Next.js 15, Vercel ve DynamoDB ile evde espresso çekimini veri odaklı bir sisteme dönüştürüyor. Kişiselleştirilmiş AI tavsiyeleriyle kullanıcı deneyimini nasıl iyileştirdiğini keşfedin.