A self-hosted coffee journal with optional AI assistance.
Track beans, brews, recipes, and equipment on your own infrastructure.
Open the demo · Quick start · Documentation · Design system
Real app screen with sample data, set in an AI-generated coffee scene.
Tip
Try it in ten seconds. The editable demo runs entirely in your browser with fictional sample data — no account, no server database. Changes stay in this browser only. AI recommendations and bean research use preset responses from the sample data without contacting an AI provider.
Roastbook is a self-hosted journal for your brews, beans, recipes, café visits, roasters, brewing methods, and gear. Website: roastbook.coffee.
- 🎚️ Simple first, deep when you ask. Each brewing method shows only its own fields; a quick entry takes dose, yield, and time. Pre-infusion, pressure, flow, temperature, grind, tamp, basket, puck screen, and filter position are there when you want them.
- 🤖 AI where you already type. Photograph a bag to read its label, research roasters and espresso machines, and get brew recommendations. Every value is validated, keeps its source, and is confirmed by you before saving.
- 🫘 One coffee, every bag. Repeat purchases add a bag to the same coffee; roast date, weight, price, and shop stay per bag while brew history and photos belong to the coffee.
- 📈 Numbers that answer questions. An activity calendar, filterable statistics, and parameter charts connect quality to beans, methods, gear, timing, and cost.
- 📴 Installable and offline. Use it in the browser or install it as a PWA. The installed app automatically keeps the journal on the device, works without a connection, and syncs only what changed when you reconnect. Online, it reads from the server. See what works offline.
- 🔒 Yours, end to end. Your own PostgreSQL and storage. Private accounts with email codes and passkeys, or one shared journal behind your own auth proxy.
- 🚀 Deploys in one command. Docker Compose for a home server, a Helm chart for a cluster.
AI is optional; everything else works without it. Each user connects their own OpenAI-compatible endpoint in Settings → AI. See AI configuration.
-
Picture beautification — choose Beautify with AI on a picture in the gallery or full-size viewer. A spinner and notification track the edit while you keep using Roastbook. Uploads and main-image selection never start an edit. The first upload is the main image until you choose another with the star. The edit preserves label details and reconstructs the likely bag shape and color from the photo, with consistent pastel studio staging. Beautified pictures are labeled and hide the Beautify action. View the original or delete only the beautified version to restore it. Each picture keeps one gallery entry. MCP supports the same beautify and restore actions. The request log shows usage and cost when pricing is known.
-
Label scanning — extract bean details from up to six pictures of a bag.
-
Bean, roaster, and machine research — fill in origin, process, tasting notes, a roaster's website and location, or a machine's sourced capabilities and factory settings, with strict rules against weak evidence.
-
Brew recommendations — compare a draft or logged brew with up to 50 matching brews for the same bean, method, and gear, get one explained adjustment or experiment, and ask follow-up questions in a chat.
-
Request log — see every AI request with its status, duration, and token usage in Settings, and optionally its raw inputs and responses for debugging.
AI calls run server-side only and are rate-limited, schema-validated, and logged in the database without image payloads. Label extraction and recommendations honor the selected Responses or Chat Completions API format; online research requires Responses with hosted web search.
Important
API and MCP server for your own scripts and agents. /api/v1 is a REST
API with generated OpenAPI request and response schemas and a public,
interactive reference
at /api/v1/docs, and /api/mcp a Streamable HTTP MCP
endpoint; both can read and change everything in your journal, including
pictures, but never administer accounts. API keys, MCP tokens, and MCP
applications get per-resource read or write permissions and shared rate
limits; keys and tokens also expire (seven days unless you choose longer).
Manage them in Settings → API and Settings → AI access (MCP). See
API and Deployment.
The complete feature list
- Log brews with dose, yield, time, equipment, ratings, and flavor notes.
- Recipes as editable templates with drink options, gear-set matching, and a target brew time for the brew timer. Brews keep their own snapshot.
- Optionally receive brew times from a Wi-Fi shottimer.
- Switch the overall rating, each sensory factor, flavor tags, and tasting notes on or off, or use a single sour-to-bitter scale.
- Built-in flavor tags from the SCA Coffee Taster's Flavor Wheel; disable the ones you skip and add your own.
- Coffees with bag history, roasters, brewing methods, coffee shops, typed gear, and reusable gear sets.
- Café visits on a map and a Places list from favorites to wishlist.
- Built-in drink and milk types you can disable, plus your own, per brewing method.
- Filterable trends for quality, consistency, taste, rhythm, recipes, gear, and cost.
- A ⌘ K / Ctrl K command palette for search, navigation, and quick actions.
- Six light and dark palettes, with optional paper grain and coffee stains, in Settings → Appearance.
- Local or S3-compatible media storage with a per-journal storage allowance.
- Passwordless private accounts or one shared journal behind Hodor.
- An Admin page for users and roles, with each account's agreements, passkeys, sessions and usage; data export and confirmed account deletion.
| Layer | Choice |
|---|---|
| Runtime and package manager | Bun 1.4.4 |
| Framework and routing | TanStack Start and TanStack Router |
| UI | React 19, shadcn/ui, Tailwind CSS v4, Lucide, MapLibre GL |
| Database | PostgreSQL on the server; PGlite in the browser |
| Media storage | Local filesystem or S3-compatible buckets |
| AI | TanStack AI with any OpenAI-compatible endpoint |
| Validation | Zod at every boundary |
| Authentication | Better Auth (email codes, passkeys); optional Hodor |
| Tooling | Vite, Biome, Knip, bun test |
| Deployment | Docker Compose or Helm |
From a checkout of this repository, Docker Compose starts PostgreSQL, applies migrations, and serves Roastbook behind Hodor.
cp .env.example .env
# Replace HODOR_PASSWORD and HODOR_SECRET in .env.
# Generate a signing secret with: openssl rand -hex 32
docker compose up --buildOpen http://localhost:3000 after the migration completes.
For private accounts, set PUBLIC_URL, AUTH_SECRET, email delivery, and
AUTH_ADMIN_EMAIL (your own email address) in .env, then run
docker compose -f docker-compose.auth.yaml up --build. Only addresses in
AUTH_ADMIN_EMAIL become administrators, and the first of them to sign in takes
over an existing shared journal. See
Configuration and Deployment,
including upgrade steps for an existing journal.
With PostgreSQL available at the DATABASE_URL from .env:
bun install --frozen-lockfile
cp .env.example .env
bun run devThe development server listens on http://localhost:3000 and applies pending migrations on start. See Development and testing.
All available commands
| Command | Purpose |
|---|---|
bun run dev |
Apply migrations and start the development server |
bun run storybook |
Browse component stories on port 6006 |
bun run build:storybook |
Build the static component library |
bun run check |
Check formatting, lint, and Markdown |
bun run typecheck |
Run TypeScript without emitting files |
bun run test |
Run tests; report unavailable integrations as skipped |
bun run test:integration |
Require PostgreSQL and S3 integration tests |
bun run lint:deadcode |
Find unused code and dependencies with Knip |
bun run build |
Build production assets |
bun run dev:demo |
Run the browser-local demo |
bun run build:demo |
Build the static browser-local demo |
bun run verify |
Run the complete local quality gate |
bun run db:generate |
Generate a Drizzle migration after a schema change |
bun run db:migrate |
Apply committed migrations |
bun run db:studio |
Open Drizzle Studio |
bun run db:seed |
Seed the demo's fictional dataset |
bun run storage:orphans |
Report media drift without changing data |
| Guide | What is inside |
|---|---|
| Development and testing | Workflow, tests, tooling |
| Configuration reference | Every environment variable |
| Deployment | Docker, Helm, security boundary, MCP |
| Upgrading | Required changes for the multi-user release |
| Offline journaling | Offline coverage, sync, and conflicts |
| Browser-local demo | Demo data, restrictions, and builds |
| Journal architecture | Journal functions, local database, sync |
| API | REST API, keys, permissions, rate limits |
| Shottimer API | Device integration endpoints |
| Design system | Layout contract and UI conventions |
| Design files | Editable OpenPencil views |
| Helm chart reference | Chart values and defaults |
src/routes/ TanStack Router file routes and server endpoints
src/components/ Shared application and domain UI
src/components/ui/ shadcn/ui primitives
src/journal/ SQL journal functions, shared by browser and server
src/lib/server/ Server-side domain operations
src/lib/storage/ Local and S3-compatible storage providers
src/db/ Drizzle schemas and database connection
packages/ Demo edition package
drizzle/ Committed migrations and metadata
charts/ Helm chart
Release maintainers can run the Release GitHub Action with an automatic Conventional Commit version bump or an explicit override. See releases for the publication and image build flow.
The app imports shadcn primitives and theme tokens from
@roastbook/ui, pinned to a Git commit in
package.json and bun.lock. Add shared primitives in that repository.
The app keeps its feature components, preferences and document layout locally.
The existing UI stories render the shared package components.
Roastbook asks before sharing feature-usage counts with its maintainers. Sharing is off until you accept and can be turned off in Settings > General. Journal contents and recordings are never included in these statistics. Administrators can disable collection for the whole installation. See usage statistics.






