Skip to content

quickstar/zaumau

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zaumau.ch

zaumau.ch is a Nuxt 4 app for shared house stays where some costs should follow who stayed when, and others should be shared evenly.

Each trip has a default split rule for new expenses, and each expense can still be set individually:

  • By nights stayed: spread the expense across trip nights, then split each night among the people staying that night.
  • Equal per person: split the expense evenly across all trip participants.

The app converts the final balances into a short settlement list. Smaller groups use an exact minimum-transfer solver; larger groups fall back to a fast exact-cent heuristic.

Stack

  • Nuxt 4 + Vue 3 + TypeScript
  • Nuxt UI
  • Pinia Colada for frontend remote-state queries and mutations
  • Drizzle ORM + Drizzle Kit
  • SQLite via better-sqlite3
  • Zod validation
  • Vitest

Local setup

Install dependencies:

npm install
# or
make install

Create the local database path:

cp .env.example .env

Start the app:

npm run dev
# or
make dev

Common commands

The repo stays npm-first, but now exposes thin make wrappers for the common flows:

make help
make test
make lint
make typecheck
make build
make verify

Database

The app uses a file-backed SQLite database.

  • Default path: ./data/zaumau.ch.sqlite
  • Override with DATABASE_URL
  • Example: DATABASE_URL=./data/zaumau.ch.sqlite

Generate Drizzle migrations:

npm run db:generate

Apply migrations manually if needed:

npm run db:migrate

The server also runs committed migrations automatically on startup.

Frontend remote state

Remote trip data follows a strict client boundary:

  • app/api/* contains thin $fetch wrappers for Nitro endpoints.
  • app/queries/* contains Pinia Colada query and mutation wrappers.
  • Pages, components, and composables use app/queries/* instead of calling $fetch directly.

Local form state still lives close to the UI, while cacheable server state lives in Pinia Colada.

Docker

Build the production image:

docker build -t zaumau.ch .

Run it with a persisted SQLite directory:

docker run \
  --rm \
  -p 3000:3000 \
  -e DATABASE_URL=/app/data/zaumau.ch.sqlite \
  -v "$(pwd)/data:/app/data" \
  zaumau.ch

The container runs the built Nitro server from .output/server/index.mjs and expects the committed drizzle/ migrations alongside it.

Releases

cog.toml configures conventional-commit-based versioning with a v tag prefix.

  • CI runs on npm, not pnpm.
  • Releases are created from pushes to main.
  • The release workflow derives the next version from conventional commits, creates a Git tag and GitHub Release, and publishes a Docker image to GHCR.

Verification

Run tests:

npm run test

Run static checks:

npm run lint
npm run typecheck

Build for production:

npm run build

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors