Self-hosted, modern brewing workbench for homebrewers, brew clubs, and nanobreweries.
A ground-up Client/Server re-architecture inspired by Kleiner Brauhelfer, built with Python Litestar, SQLAlchemy 2.0 Async, and React 19 + TypeScript.
Most modern brewery platforms focus on wholesale B2B portals, excise tax filings, keg deposit accounting, and subscription lock-in. BrewForge takes the opposite approach:
- 100% Self-Hosted, Database-Agnostic & Safe to Upgrade: Runs in a single Docker container on your home server, Raspberry Pi, or cloud VPS with SQLite, PostgreSQL, or MariaDB/MySQL — zero subscriptions, full ownership of your data, and idempotent zero-data-loss incremental migrations on startup.
- Brewing Physics First: Normalized
Recipe(1:N) →Brewmodel, underlet/foundation water (Vorlagewasser), whirlpool temperature & stand-time isomerization, KBH2-style infusion & decoction mash schedules with dual temperature curves and amylase enzyme bands, cylindrical vessel geometry & dipstick tables, 2-water blending (including RO/distilled water), min/max ingredient specification ranges, and an automated 0–100 brewing review engine. - Built for Sharing, Tasting & Link Previews: Configurable public Welcome/Landing Page, seasonal brewing calendar with automatic projected milestones and advance lead-time reminders, public QR Beer Profiles (
/p/<token>) with rich WhatsApp / Open Graph link previews and Bottle-in-Hand rating protection, plus blind & open tasting sessions with QR smartphone voting (/t/<token>) and printable A4 cut-out paper ballots. - Role-Based Access & Modular Clean UI: Built-in Master Brewer (
Braumeister) and read-only Apprentice (Braugeselle) roles, optional CRM/Orders, and an explicitly toggleable MCP endpoint (POST /mcp, disabled by default). Five live color palettes (default: clean Stainless Monochrome) in Light & Dark modes, bilingual German/English UI.
- 1:N Recipe-to-Brew Normalization: Reusable, lockable recipe templates (
Recipe, with JSON import/export) spawn numbered brews (Brew #1, #2, …) with automatic batch-size scaling. - Flexible Batch Numbering: Configure a one-time starting brew number in Settings (ideal when migrating an existing brew log) and manually override individual brew numbers when backfilling historical batches (with duplicate protection).
- Dual Calculation Modes:
- Gravity:
Target OG (°P & %)orFree Grain Bill (kg)with seamless value carry-over on mode switch. - Bitterness:
Target IBU (% share)orFree Hop Dosage (g or g/L)with Tinseth / Rager formulas and whirlpool isomerization (temp °C+stand time).
- Gravity:
- Recipe Carbonation & Fermentation / Maturation Schedule:
- Configure target CO₂ (g/L) and priming method directly in the recipe with live priming calculation (also shown with carbonation character on the public Beer Profile).
- Set primary fermentation and maturation durations & temperatures — or apply automatic guidelines derived from yeast type and ABV with one click.
- Explicit Beer Profile Syntax (
[[...]]): Promote custom highlights from recipe/brew notes to the public Beer Profile using[[Text]]or[[Label: Value]]syntax (with live preview and UI field badges) without ever exposing surrounding private notes. - Min/Max Specification Ranges & Extended Yeast Metadata: Track realistic malt color (EBC), hop alpha acid (%), yeast attenuation (%) spreads, plus yeast aroma profile and character notes.
- Drag-and-Drop Ingredient Palette: Filterable stock palette with instant auto-save and live recalculation.
- Real Mash Tun Physics: Supports underlet water (foundation water below the false bottom treated as negative sparge water), grain absorption, trub loss, boil & decoction evaporation, infusion water sparge balance, and cooling shrinkage.
- KBH2-Style Mash Schedules & Dual Temperature Chart:
- Chronological temperature rests, infusion steps (boiling-water volume calculation), and decoction pulls (Thick Mash / Thin Mash / Lauter Mash) with optional staged late malt additions (including directly into a decoction partial mash).
- Interactive Dual Temperature Profile Chart plotting both the Main Mash and Partial Decoction Mash curves across Protein (45–55 °C), β-Amylase (60–65 °C), and α-Amylase (70–75 °C) enzyme ranges.
- Vessel Geometry, Dipstick Table & Volume Timeline: Enter cylindrical mash tun and boil kettle dimensions (diameter & height) to unlock Gross vs. Net headspace overflow warnings, a printable/interactive Dipstick Table (Peiltabelle), and a chronological Volume & Fill-Height Timeline from mash-in to fermenter.
- 2-Water Blending, Water Chemistry & Custom Profile Character: Blend your primary water with a second water profile or RO/distilled water (
0 mg/L) with mash/sparge split volumes, residual alkalinity, SO₄²⁻/Cl⁻ balance, mash pH estimation, plus a separate brewer-authored water description for the Beer Profile. - Automated 0–100 Brewing Review & Energy Modeling: Checks enzyme diastatic power, kettle overflow risk, and bottle-bomb CO₂ limits; estimates heating energy consumption and cost per brew (
Electric,LPG/Propane,Solid Fuel) with optional actual meter logging.
- Live Brew Day, Timestamped Fermentation Log & A4 Sudbericht: Interactive step timer, persistent brew-day checklist, fermentation readings with date & time selection (Plato, Brix with refractometer correction, SG), and print-ready A4 brew sheets.
- Seasonal Brewing Calendar with Automatic Projections:
- Automatically projects Brew Day, Planned/Actual Bottling, and Expected Ready to Drink milestones from recipe/brew fermentation and maturation durations.
- Schedule festivals, competitions, and tastings with advance lead-time reminders (e.g., Bock Beer Tasting in February with 16 weeks lead time triggers a brew reminder in October) and record event consumption & guest feedback.
- Configurable Public Welcome / Landing Page (
/): Greet visitors with your brewery branding, optional BrewForge open-source info, and an optional minimal showcase of ready & upcoming public brews before signing in. - Public QR Beer Profile (
/p/<token>) & WhatsApp / Open Graph Previews:- Shareable tasting card showing brewed/bottled/ready/best-before dates, ABV, OG, EBC color gradient, IBU scale, carbonation value + character, serving temp, water character, explicit
[[...]]Special Highlights, and a Back-to-Overview link — never exposing grain bills, hop schedules, or costs. - Server-rendered Open Graph metadata & PNG preview cards (
/api/public/brews/{token}/og-image,/api/public/landing/og-image) for rich link previews in WhatsApp, Signal, Telegram, and social apps.
- Shareable tasting card showing brewed/bottled/ready/best-before dates, ABV, OG, EBC color gradient, IBU scale, carbonation value + character, serving temp, water character, explicit
- Bottle-in-Hand Rating Guard & Temporary Closure:
- Optional 2-step bottle verification before submitting a guest rating (Lot code, Best Before / MHD, Bottling Date, custom label question, or Bottle QR scan) with max-5-attempt lockout protection.
- 1-click Pause / Close Ratings mode (e.g., until a batch is bottled and conditioned), cleanly showing visitors that ratings are currently closed.
- Blind & Open Tastings (QR + Paper Ballots): Run structured tastings with anonymous sample codes (
Sample A/B/C), 1-click reveal, scannable QR smartphone voting (/t/<token>, zero name leaks while unrevealed), and printable A4 cut-out paper tasting ballots (/verkostungen/:id/zettel). - Brewery Profile & Open Brewery DB: Store custom brewery branding/logos and prepare/check submissions for Open Brewery DB.
- Role-Based Access Control (
Braumeister&Braugeselle):- Password-protected (
scrypt+ HS256 JWT) for LAN and public VPS deployments, with first-run admin setup and an optional guided Setup Wizard. - Master Brewer (
Braumeister): Full read/write access plus user & role management, password resets, and instant session revocation on account deletion. - Apprentice (
Braugeselle): Strict read-only access across recipes, brews, calendar, tastings, ingredients, equipment, standalone calculators (/rechner), and printable sheets, plus personal theme/language settings and own password change — blocked from CRM, MCP, JSON export, admin settings, and secret rating answers/QR keys.
- Password-protected (
- Bilingual UI (DE / EN) & 5 Color Palettes + Dark Mode: Switch language live between German and English (including public QR pages) and choose between Stainless Monochrome (default), Graphite & Copper, Nordic Steel & Gold, Bordeaux & Slate, and Sage & Limestone in Light, Dark, or System mode.
- Installable PWA: Install directly on desktop, Android, or iOS over HTTPS.
- Opt-in MCP Server (
POST /mcp): Disabled by default (403 Forbidden); when explicitly enabled in Settings by a Master Brewer, AI assistants can query recipes, inventory, brews, and run calculations over JSON-RPC with Bearer authentication.
┌───────────────────────────────────────────────────────────────────┐
│ Single Docker Container │
│ │
│ ┌──────────────────────────────┐ ┌───────────────────────────┐ │
│ │ React 19 + TypeScript SPA │ │ Python Litestar API │ │
│ │ Vite • Tailwind v4 • PWA │◄►│ Pydantic v2 • JWT • MCP │ │
│ │ TanStack Query • Recharts │ │ SQLAlchemy 2.0 Async │ │
│ └──────────────────────────────┘ └─────────────┬─────────────┘ │
└──────────────────────────────────────────────────┼────────────────┘
▼
SQLite (default) │ PostgreSQL │ MariaDB/MySQL
| Layer | Technology |
|---|---|
| Backend API | Python 3.11+, Litestar, Pydantic v2, Uvicorn |
| Database Layer | SQLAlchemy 2.0 Async + Alembic (SQLite via aiosqlite, PostgreSQL via asyncpg, MySQL/MariaDB via aiomysql) |
| Frontend Client | React 19, TypeScript, Vite 6, Tailwind CSS v4, TanStack Query, Recharts, qrcode.react |
| Deployment | Multi-stage single-container Dockerfile, docker-compose.yml, production VPS stack (docker-compose.prod.yml + Caddy automatic HTTPS) |
Looking for a complete step-by-step guide to pushing to GitHub and deploying to a Linux VPS or local machine?
Read the dedicated GitHub & Deployment Guide (docs/DEPLOYMENT.md).
git clone https://github.com/cloasdata/brewforge.git
cd brewforge
./deploy.sh local # Linux / macOS (Windows: .\deploy.ps1 -Mode local)Open http://localhost:8000 in your browser. On first visit, create your Master Brewer account (and optionally load sample recipes, equipment, and ingredients).
- Point a DNS
Arecord (e.g.brew.yourdomain.com) to your VPS IP address. - Clone the repository on your VPS and run the guided installer:
git clone https://github.com/cloasdata/brewforge.git /opt/brewforge
cd /opt/brewforge
chmod +x deploy.sh
./deploy.sh vpsThe script automatically installs Docker if missing, generates strong random secrets in .env, optionally configures UFW (80/443), and launches BrewForge + PostgreSQL 16 + Caddy (automatic Let's Encrypt HTTPS). Future updates and database backups are one command each (./deploy.sh update / ./deploy.sh backup).
One-command dev launchers (auto-creates Python .venv, installs dependencies, starts backend + frontend, and stops both cleanly on Ctrl+C):
# Windows (PowerShell)
.\start.ps1# Linux / macOS
./start.shOr run manually:
# Backend API (http://127.0.0.1:8000 — OpenAPI docs at /schema/swagger)
cd backend
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e ".[dev]"
uvicorn brewforge.main:app --reload
# Frontend Dev Server (http://localhost:5173)
cd frontend
npm install
npm run devAll backend settings can be configured via environment variables (or a .env file):
| Variable | Default | Description |
|---|---|---|
BREWFORGE_DATABASE_URL |
sqlite+aiosqlite:///./brewforge.sqlite3 |
SQLAlchemy async URL (sqlite+aiosqlite://, postgresql+asyncpg://, mysql+aiomysql://) |
BREWFORGE_AUTH_ENABLED |
true |
Require login for private endpoints (public landing page, /p/*, and /t/* remain accessible) |
BREWFORGE_SECRET_KEY |
(dev default) | Secret key used to sign JWT tokens — must be changed in production |
BREWFORGE_TOKEN_EXPIRE_HOURS |
336 (14 days) |
Session token lifetime |
BREWFORGE_PUBLIC_BASE_URL |
(auto) | External base URL embedded in generated QR codes & Open Graph metadata (e.g. https://brew.yourdomain.com) |
BREWFORGE_SEED_DEMO_DATA |
false |
Auto-seed sample recipes/brews on empty database startup |
BREWFORGE_STATIC_DIR |
(unset) | Path to built frontend/dist for single-container serving |
BREWFORGE_CORS_ORIGINS |
["http://localhost:5173", ...] |
JSON array of allowed CORS origins |
brewforge/
├── backend/ # Python Litestar API, SQLAlchemy models, brewing math & tests
│ ├── alembic/ # Database migration setup
│ ├── src/brewforge/ # api/, db/, models/, schemas/, services/
│ └── tests/ # Pytest API, RBAC, migration, brewing physics & review test suite
├── frontend/ # React 19 + TypeScript + Tailwind v4 PWA client
│ ├── public/ # Logo, favicon, PWA manifest & service worker
│ └── src/ # api/, components/, context/, i18n/, pages/, utils/
├── docs/
│ ├── DEPLOYMENT.md # Step-by-step GitHub Push, VPS & Local Deployment Guide
│ └── screenshots/ # README UI screenshots
├── .claude/skills/ # AI contributor skill (brewforge-dev/SKILL.md)
├── AGENTS.md / CLAUDE.md # Architecture & engineering conventions for contributors & AI agents
├── deploy.sh / deploy.ps1 # One-command VPS, local Docker, update, backup & push helpers
├── Dockerfile # Multi-stage single-container production build
├── docker-compose.yml # Local / LAN quickstart (SQLite or optional PostgreSQL)
├── docker-compose.prod.yml # VPS production stack (BrewForge + PostgreSQL 16 + Caddy)
├── Caddyfile # Automatic HTTPS reverse proxy config
├── start.ps1 / start.sh # Local dev launcher scripts
└── .github/workflows/ci.yml # GitHub Actions CI (Ruff, Pytest, TypeScript + Vite build, Docker SQLite + PostgreSQL 16 smoke tests)
# Backend linting
ruff check backend/src backend/tests
# Backend unit, migration, RBAC & API tests
pytest backend -v
# Frontend strict type-check & production bundle
npm --prefix frontend run buildReleased under the MIT License.






