← All work

Brewden Architecture

A webapp for tracking my brews, generate name suggestions and label designs. The architecture is based on AWS services and uses Bedrock for AI-powered name suggestions and label design generation.

  • AWS
  • Lambda
  • S3
  • DynamoDB
  • Cognito
  • Bedrock
  • Serverless
  • WebApp
  • AI
  • Hobby
  • Homebrewing
  • Personal Project
Brewden Architecture diagram
Brewden Architecture diagram
P

Problem

Homebrewers lack an integrated system to keep track of batch details, generate creative names based on ingredients, and construct custom label designs in one place.

R

Role

Sole architect and full-stack developer. Designed and implemented the entire serverless infrastructure and generative AI integration.

A

Approach

Provisioned the serverless stack using AWS CDK. Utilized Amazon Cognito for user authentication, S3 for storing label assets, DynamoDB for recipe tracking, and API Gateway + Lambda for serverless execution. Integrated Amazon Bedrock (Claude models) to generate context-aware brew name suggestions and compile stable diffusion prompts for label generation.

O

Outcome

A fully responsive serverless application operating under the AWS free tier with zero cold-start overhead. Achieved sub-second response times for AI-powered name suggestions and streamlined batch logging.

System Architecture & Component Interaction

The Brewden platform demonstrates a complete, event-driven serverless architecture on AWS designed for deterministic execution, near-zero idle cost, and low-latency generative AI integration.

Client WebApp (SPA) ──▶ Amazon CloudFront + S3 (Static Hosting)
       │
       ├──▶ Amazon Cognito (JWT Authentication & User Pools)
       │
       ▼
Amazon API Gateway (REST API with Cognito Authorizer)
       │
       ▼
AWS Lambda Execution Layer (Node.js / TypeScript microservices)
       ├──▶ Amazon DynamoDB (Single-table recipe & batch storage)
       ├──▶ Amazon S3 (Label assets, recipe exports & media)
       └──▶ Amazon Bedrock (Anthropic Claude model inference for naming & label prompts)

Architectural Highlights

1. Serverless Compute & Auth Pipeline

  • Amazon Cognito User Pools: Manages identity verification, session refresh tokens, and scoped claims. API Gateway evaluates JWT tokens via native Cognito Authorizers before invoking downstream Lambda functions, eliminating unauthorized invocation costs.
  • AWS Lambda Microservices: Structured around single-purpose handlers (Batch Management, Recipe Formulation, AI Suggestion Engine) deployed with minimal package footprints to keep cold-start durations under 250ms.

2. Generative AI Engineering (Amazon Bedrock)

  • Context-Aware Naming Engine: Connects to Anthropic Claude on Amazon Bedrock to analyze complex malt profiles, hop varieties (alpha acids, aroma descriptors), and target beer styles (SRM, IBU, ABV).
  • Prompt Engineering & Structured Outputs: Leverages temperature control and constrained decoding to return structured JSON arrays containing generated names, stylistic taglines, and descriptive visual prompts designed for downstream image synthesis models.

3. Data Modeling & Persistence

  • Single-Table DynamoDB Design: Optimizes batch tracking and recipe evolution through a composite key schema (PK: USER#<id>, SK: BATCH#<id> / RECIPE#<id>). This pattern satisfies query patterns for active fermentation schedules and historical archives in single round-trip read operations.
  • S3 Presigned URLs: Handles client-side direct uploads for label artwork and exported brewing logs, offloading binary payloads from the API Gateway/Lambda execution path.

4. Infrastructure as Code & Cost Governance

  • AWS CDK (TypeScript): Every cloud resource—from IAM least-privilege roles to CloudFront cache behaviors—is defined deterministically in code.
  • Zero-Waste Economics: Operates completely within the AWS Free Tier during idle periods, achieving a resilient, enterprise-grade architecture with negligible operating costs.

All work