正在加载完整 README。 以下为已保存的摘录。
A self-hosted allowance tracker for kids. Parents add and remove money with a comment; kids sign in with a PIN, see what they can spend, and ask for money. Requests show up in the parents' notification bell to approve or deny.
One container, one volume: a Go binary serving server-rendered HTML (HTMX), with SQLite on the volume by default or Postgres if you point it at one. Named for Goldberry, the River-daughter in The Lord of the Rings.
Open https:// /setup, paste the setup token, and create the first parent account. Then add your kids.查看完整 README ↗A self-hosted allowance tracker for kids. Parents add and remove money with a comment; kids sign in with a PIN, see what they can spend, and ask for money. Requests show up in the parents' notification bell to approve or deny.
One container, one volume: a Go binary serving server-rendered HTML (HTMX), with SQLite on the volume by default or Postgres if you point it at one. Named for Goldberry, the River-daughter in The Lord of the Rings.
| A kid's home | Breaking your own lock | Investing |
|---|---|---|
| One page per kid | Money over time |
|---|---|
mkdir goldberry && cd goldberry
curl -fsSLO https://raw.githubusercontent.com/chinny-labs/goldberry/main/deploy/compose/compose.yaml
openssl rand -base64 32 > goldberry_key.txt
docker compose up -d
docker compose logs goldberry | grep -i "setup token"
Open https://<host>/setup, paste the setup token, and create the first parent account. Then add your kids.
Sessions use
Securecookies, so put Goldberry behind a TLS reverse proxy (Caddy, Traefik, a Gateway). For a quick plain-HTTP trial on your LAN, setGOLDBERRY_INSECURE_COOKIES: "true"incompose.yaml.
On Kubernetes: helm install goldberry oci://ghcr.io/chinny-labs/charts/goldberry. See docs/operations for install, upgrade, backup and restore, JSON API, MCP server, API tokens and troubleshooting.
Email notifications (Phase 3 of the design plan) are next.
Environment variables (or /data/config.env). Any variable can also be given as NAME_FILE pointing at a file.
| Variable | Default | Notes |
|---|---|---|
GOLDBERRY_DATABASE_URL | sqlite:///data/goldberry.db | Or postgres://user:pass@host:5432/goldberry |
GOLDBERRY_SECRET_KEY | (none) | 32+ random bytes, base64. Will encrypt SMTP secrets (Phase 3). |
GOLDBERRY_BASE_URL | (none) | Public URL, for email links |
GOLDBERRY_LISTEN | :8080 | |
GOLDBERRY_TRUSTED_PROXIES | (none) | CIDRs whose X-Forwarded-For is trusted for logging |
GOLDBERRY_INSECURE_COOKIES | false | Plain-HTTP testing only |
GOLDBERRY_MCP_ENABLED | false | Serve the MCP server at /mcp for AI tools |
GOLDBERRY_BACKUP_SCHEDULE | 03:15 | Time of the nightly SQLite snapshot (in TZ) |
GOLDBERRY_BACKUP_RETAIN | 14 | Snapshots to keep in /data/backups |
GOLDBERRY_LOG_FORMAT | json | json or text |
GOLDBERRY_FINNHUB_API_KEY | (none) | Free key from finnhub.io; turns on investing |
GOLDBERRY_SEC_CONTACT | (none) | Your email, sent to the SEC with requests; shows what's inside each fund |
TZ | UTC | Default household time zone at setup |
Never put the SQLite file on NFS or SMB: use a local or block-backed volume. Goldberry warns at startup if /data is a network filesystem.
GET /healthz (liveness), GET /readyz (database), GET /metrics (Prometheus).docker compose exec goldberry goldberry admin reset-password <username> prints a new password.goldberry backup, goldberry export -o dump.jsonl, goldberry import dump.jsonl: see backup and restore.GET /api/v1/openapi.json is the spec (no token needed). Tokens are credentials: revoke one on the People page, and note goldberry export leaves them out.goldberry migrate applies migrations without starting the server (they also run at startup).Needs Go (see go.mod) and just.
just run # http://localhost:8080, SQLite in ./data
just test # unit tests + the store contract suite on SQLite
just pg-up && just test-pg # the same contract suite on Postgres
just lint # gofmt, vet, golangci-lint, migration parity
just helm # lint and render the Helm chart
just e2e # build the image and run the Playwright smoke test against it
just demo # serve a made-up household with three months of history on :18081
just screenshots # retake docs/screenshots from the demo household
just site # build the website (site/ plus docs/) into site/_site
The screenshots come from e2e/demo, which seeds "The Riverbanks" through the real service layer on a moved clock, with made-up stock prices. Retake them with just screenshots when a screen changes. The website is site/: a landing page plus every page in docs/operations, docs/adr and the design plan, rendered from the Markdown and published to GitHub Pages by .github/workflows/pages.yml on every push to main that touches them. The first time, set Settings → Pages → Source to GitHub Actions.
Layout follows the plan (§13.2): cmd/goldberry (CLI), internal/{config,money,allowance,auth,service,scheduler,notify,backup,store,web}, migrations/{sqlite,postgres} (kept in lockstep), deploy/{compose,helm/goldberry}, e2e/ (smoke test, demo household, screenshots), site/ (the website), and docs/ with the design plan, the design board and ADRs.
The service layer owns every money rule; handlers never touch the store. internal/store/storetest is the contract suite both database engines must pass — it is the real definition of "pluggable".
Releases: merging the release-please PR tags vX.Y.Z, and the release workflow publishes signed multi-arch images (with SBOM and provenance) to ghcr.io/chinny-labs/goldberry and the chart to oci://ghcr.io/chinny-labs/charts/goldberry (ADR 0012). Dependabot keeps Go modules, Actions and base images current. release-please needs Settings → Actions → General → Allow GitHub Actions to create and approve pull requests turned on; without it, run the release workflow by hand with the version.
AGPL-3.0. Every page links to the exact source of the running build. Fonts (Atkinson Hyperlegible Next, Bricolage Grotesque) are SIL OFL 1.1; HTMX is BSD-2-Clause.
/api/v1 for scripts, Home Assistant and bulk work (atomic batches, dry runs, idempotency keys, backdated entries for loading balances tracked elsewhere), plus an opt-in MCP server at /mcp so tools like Claude can check balances and, if you allow it, post money. Parents mint scoped tokens (read, write, money) on the People page (tokens, API, MCP, ADR 0015, ADR 0016)./healthz, /readyz, /metrics, signed multi-arch images.