No description
  • Go 63.1%
  • HTML 36.9%
Find a file
2026-04-17 23:35:24 +02:00
cmd/seed feat: group index by active/inactive users, add seed command 2026-04-11 02:38:35 +02:00
db chore: format 2026-04-17 23:35:24 +02:00
templates feat: add split feature, rework index card actions 2026-04-11 02:59:15 +02:00
.gitignore chore: add README and gitignore 2026-04-10 01:11:49 +02:00
AGENTS.md docs: update README and AGENTS for all recent features 2026-04-11 03:04:16 +02:00
go.mod feat: use caarlos0/env for config parsing 2026-04-11 00:37:00 +02:00
go.sum feat: use caarlos0/env for config parsing 2026-04-11 00:37:00 +02:00
main.go chore: format 2026-04-17 23:35:24 +02:00
README.md docs: update README and AGENTS for all recent features 2026-04-11 03:04:16 +02:00
renovate.json Add renovate.json 2026-04-11 11:05:47 +00:00

strichel

A lightweight digital tally tab tracker. Users have a balance that gets topped up and spent down — think prepaid bar tabs or shared kitty accounts.

Features

  • Multiple accounts with running balances
  • Index groups accounts into active (entry in last 7 days) and inactive
  • Quick spend/top-up buttons and named preset buttons (configurable)
  • Custom amount and optional note per transaction
  • Collect — charge individual amounts from multiple people at once
  • Split — divide a total equally among selected people
  • Transaction history with undo (within 1 hour of booking)
  • Hourly consolidation of old entries (configurable)
  • Prometheus metrics at /metrics

Running

go run .

Listens on :8080 by default. The SQLite database (strichel.db) is created automatically in the working directory on first run.

Seeding test data

go run ./cmd/seed            # writes to strichel.db
go run ./cmd/seed test.db    # or a separate file

Inserts 40 users with random entries spread over the last 6 months (25 inactive, 15 active).

Configuration

All configuration is via environment variables, parsed at startup by caarlos0/env.

Variable Default Description
STRICHEL_ADDR :8080 TCP address to listen on
STRICHEL_DB strichel.db Path to the SQLite database file
STRICHEL_CONSOLIDATE true Set to false to disable the hourly consolidation job
STRICHEL_BUTTONS -0.25,-0.35,-0.50,-1,-2,-5,0.50,1,2,5,10,20 Exactly 12 comma-separated amounts; negative = spend buttons, positive = top-up buttons
STRICHEL_PRESETS Getränk 🧉:100,Wasser 🌊:50,Bueno 🍬:35,Pringles 🥔:225,Pickup 🍫:100,Tschunk 🍹:350 3 or 6 named preset spend buttons in name:cents format

Building a binary

go build -o strichel .
./strichel

Docker

FROM golang:1.22-alpine AS build
WORKDIR /app
COPY . .
RUN go build -o strichel .

FROM alpine:latest
WORKDIR /app
COPY --from=build /app/strichel .
EXPOSE 8080
CMD ["./strichel"]

Metrics

Prometheus metrics are exposed at GET /metrics.

Metric Type Description
strichel_spend_euros Histogram Spend event sizes in euros; buckets are derived from the configured spend buttons

strichel_spend_euros_count gives the total number of spending events.

Tech stack

  • Gonet/http, html/template, database/sql
  • SQLite — via modernc.org/sqlite (pure Go, no CGO)
  • Tailwind CSS — loaded from CDN
  • Prometheusprometheus/client_golang
  • caarlos0/env — environment variable parsing