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>
This commit is contained in:
2026-10-29 12:05:39 +08:00
co-authored by Claude Opus 5.5
commit 0b0aceb773
175 changed files with 13691 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
#!/usr/bin/env bash
# Builds the image locally and ships it to the server (Docker Hub is unreliable
# from mainland China, so the server never pulls images itself).
#
# deploy/deploy.sh build, upload, restart
# HOST=root@1.2.3.4 deploy/deploy.sh
set -euo pipefail
HOST=${HOST:-root@8.133.23.131}
DIR=/opt/billing
cd "$(dirname "$0")/.."
docker buildx build --platform linux/amd64 -t billing:latest --load .
echo "uploading image…"
docker save billing:latest | gzip -1 | ssh "$HOST" 'gunzip | docker load'
ssh "$HOST" "mkdir -p $DIR/data"
scp deploy/docker-compose.yml "$HOST:$DIR/docker-compose.yml"
ssh "$HOST" "test -f $DIR/.env" || scp deploy/env.example "$HOST:$DIR/.env"
# docker-compose 1.29 cannot recreate containers on Docker 25+ (KeyError: 'ContainerConfig'),
# so remove the old container first; data lives in the mounted ./data directory.
ssh "$HOST" "cd $DIR && docker rm -f billing >/dev/null 2>&1; docker-compose up -d && docker image prune -f >/dev/null"
echo "deployed"
+11
View File
@@ -0,0 +1,11 @@
version: "3"
services:
billing:
image: billing:latest
container_name: billing
restart: unless-stopped
ports:
- "127.0.0.1:3100:3000"
volumes:
- ./data:/data
env_file: .env
+4
View File
@@ -0,0 +1,4 @@
PUBLIC_URL=https://bill.michaelandmeryl.xyz
VAPID_SUBJECT=mailto:michael@dynarobotics.ai
# Optional: Bark device URLs for budget alerts, comma separated
# BARK_URLS=https://bark.michaelandmeryl.xyz/<key1>,https://bark.michaelandmeryl.xyz/<key2>
+20
View File
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
# Copies the category icons from the locally installed 木木记账 into a data
# directory (default: server/data/mumu-icons), or to the server with HOST set.
# The icons stay private: they are never committed or baked into the image.
#
# deploy/extract-mumu-icons.sh # local dev
# HOST=root@8.133.23.131 deploy/extract-mumu-icons.sh # server
set -euo pipefail
APP=${APP:-"/Applications/木木记账.app"}
SRC="$APP/Contents/Frameworks/App.framework/Versions/A/Resources/flutter_assets/assets"
cd "$(dirname "$0")/.."
for s in 3d flat filled lineal outline; do test -d "$SRC/$s" || { echo "missing $SRC/$s"; exit 1; }; done
if [ -n "${HOST:-}" ]; then
tar -C "$SRC" -czf - 3d flat filled lineal outline | ssh "$HOST" 'mkdir -p /opt/billing/data/mumu-icons && tar -C /opt/billing/data/mumu-icons -xzf -'
else
mkdir -p server/data/mumu-icons
tar -C "$SRC" -cf - 3d flat filled lineal outline | tar -C server/data/mumu-icons -xf -
fi
echo "icons copied"
+13
View File
@@ -0,0 +1,13 @@
server {
listen 80;
server_name bill.michaelandmeryl.xyz;
location / {
proxy_pass http://127.0.0.1:3100;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}