Peated is a public record of whisky. Our goal is to document as much whisky as possible and make that data freely accessible to everyone.
Browse the catalog at https://peated.com or read it through the public API at https://peated.com/about/api.
A Discord is available if you want to contribute: https://discord.gg/d7GFPfy88Z
See the documentation guide for architecture, feature, development, operations, policy, and research documents.
Peated uses five tasting bands from Mediocre through Unicorn. Reviews use a score from 0 through 100. Old Pass, Sip, Savor, and star ratings remain only on historical tastings. See the Rating Systems Architecture.
Set up the required tools:
Bootstrap the environment:
docker compose up -d
pnpm run setup:localLocal Postgres is published on localhost:15432 and Redis is published on
localhost:16379 to avoid colliding with other default local instances. The
tracked local test database config in apps/server/.env.test uses the same
host ports.
The setup command copies the example environment file into your local-only configuration when it does not already exist. To do only that step, run:
pnpm run setup:env.env.local is ignored and is copied into Codex and Claude Code worktrees
through .worktreeinclude.
To work on the UI without Postgres, Redis, or sample data, run:
pnpm dev:mockThis starts the web app with a local API that returns fixed examples. It does
not need Postgres or Redis. Open http://localhost:3200. You can sign in with
any valid email address and any password. If the UI calls an unsupported API
route, that request returns 404.
Codex uses the same setup:local command when it creates a worktree. Claude Code
runs it when a session starts and node_modules does not match
pnpm-lock.yaml. The first install in a new worktree takes a few minutes; later
sessions skip it. Git hooks are shared with the primary checkout, so both skip
installing them again. Neither creates the database or runs migrations, because
worktrees share the local Postgres. Codex also has buttons to run the app
without the database or check the code.
Run the same code checks used before review:
pnpm checkThis checks formatting and common code problems. It does not run all tests.
Before each commit, a Git hook formats and lints the staged files and runs
pnpm knip, which finds unused files and dependencies, and commands in scripts
that no dependency provides. The rest of pnpm check, such as the typecheck,
runs only when you call it and in CI.
Setup the database:
make create-db
pnpm db:migrateCreate a local user to avoid setting up Google credentials:
pnpm cli users create [email protected] password -a -vLoad sample data when you need to develop against the real API:
pnpm cli mocks load-all [email protected]Run the dev server, which spins up the web, API, and worker services:
pnpm devThe worker requires Redis. The default local Redis URL is
redis://@localhost:16379, matching docker-compose.yml. For API-only local
checks, use pnpm dev:server:api.
To see local errors, traces, logs, and model calls, run the dev server through Sentry Local instead:
pnpm dev:sentryThis needs the sentry command installed. It starts a local Sentry server on
localhost:8969 and sends the web app, API, and worker events to it; no Sentry
account or DSN is needed. Open the viewer with sentry local --open, or tail
events in another terminal with sentry local. To run one command this way,
use sentry local run -- <command>, such as
sentry local run -- pnpm dev:server:api.
See Deployments for the production service map and Production Debugging for logs, traces, and diagnostic commands.
The CLI can authorize against production without storing a password. The
checked-in public OAuth client uses the registered redirect URI
http://127.0.0.1/oauth/callback. PEATED_OAUTH_CLIENT_ID or the login
command's --client-id option can override that client for another deployment.
Log in and inspect the current credential with:
pnpm cli auth login
pnpm cli auth statusThe CLI chooses an available callback port and stores the seven-day bearer token
in $XDG_CONFIG_HOME/peated/credentials.json, or ~/.config/peated when
XDG_CONFIG_HOME is unset. It never prints the token.
Authenticated API reads produce JSON. Mutations require an interactive
confirmation or an explicit --yes, and JSON bodies are read from files.
Paths leave out /v1, which the CLI adds, and relative file paths start at the
repository root. When the API refuses a request, the CLI prints its answer
after the error:
pnpm cli api get /bottles/123
pnpm cli api patch /bottles/123 --input ./change.json --yes
pnpm cli auth logoutUse the Catalog Maintenance workflow for researched Bottle backfills, deduplication, and verified batch edits.