Files
dyc12389andClaude Opus 5.5 0b0aceb773 Family bookkeeping PWA modelled on 木木记账
Hono + SQLite server and a React/shadcn PWA with two-level categories,
who-spent/who-paid splits, settlement, one-line and voice entry, budget
alerts (Web Push and Bark), monthly/annual reports, and 木木 import tools.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 12:05:39 +08:00

1.8 KiB

家庭记账

A bookkeeping PWA for two people, modelled on 木木记账: two-level categories, "who spent / who paid", splitting and settling shared expenses, one-line and voice entry, budget alerts, and a yearly report.

  • server/ — Node + Hono + SQLite (better-sqlite3). Amounts are stored in cents and times in ms; calendar math is in China Standard Time.
  • web/ — React + Vite + shadcn/ui, installable as a PWA.
  • deploy/ — Docker image, compose file, nginx site, and deploy scripts.

Development

pnpm install
pnpm dev:server   # http://localhost:3000
pnpm dev:web      # http://localhost:5173, proxies /api to the server
pnpm test

Data scripts (run in server/, or in the container as node dist/scripts/<name>.js):

Command Purpose
pnpm import:mumu <export.xlsx> Import a 木木记账 Excel export (re-runnable)
pnpm tsx src/scripts/sync-mumu-db.ts <.mutongji.db> [--apply] Fill in payers and split amounts from 木木's own database
pnpm user <username> <member> [password] Create an account or reset its password
pnpm icons:mumu Switch categories to 木木 icons (after deploy/extract-mumu-icons.sh)

Deployment

deploy/deploy.sh                                     # build linux/amd64, upload over ssh, restart
HOST=root@<server> deploy/extract-mumu-icons.sh      # copy 木木 icons into the server's data dir

The image is built locally and loaded over ssh, because Docker Hub is unreliable from mainland China. The container listens on 127.0.0.1:3100 behind the host's nginx + certbot (deploy/nginx-bill.conf). Configuration goes in /opt/billing/.env (see deploy/env.example). Data lives in /opt/billing/data.

木木记账's icons are copyrighted by its developer. They are never committed or baked into the image, and the server only serves them to signed-in users.