From 21620290e2aecff95768461721a2b57b5b109adf Mon Sep 17 00:00:00 2001 From: Sebastian Slettebakken <43045439+sebastas@users.noreply.github.com> Date: Sat, 6 Jun 2026 17:18:26 +0200 Subject: [PATCH] Add some docs --- README.md | 46 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f33eab7..565b50c 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,47 @@ # tally-counter -a tally counter app \ No newline at end of file +A self-hosted tally counter web app. Create counters, organise them into groups, track history, and view stats. + +## Features + +- Create, edit, and delete counters with optional photos +- Organise counters into groups with drag-and-drop reordering +- Per-counter history modal — streak stats, 90-day chart, activity calendar +- Global stats page with top counters and 12-month calendar +- Counters can't go below 0 +- Hover-to-prefetch on history modal for instant opens +- Fully persistent via SQLite (better-sqlite3, WAL mode) + +## Tech stack + +- **Next.js 16** — App Router, TypeScript, standalone output +- **Tailwind CSS v4** — Catppuccin Mocha theme +- **better-sqlite3** — embedded SQLite, no external database needed +- **@dnd-kit** — drag-and-drop for counters and groups + +## Running locally + +```bash +npm install +npm run dev +``` + +Open [http://localhost:3000](http://localhost:3000). + +Data is stored in `.data/` (SQLite DB + uploaded images). + +## Docker + +```bash +docker build -t tally-counter . +docker run -p 3000:3000 -v tally_data:/data tally-counter +``` + +The `/data` volume holds both the database and uploaded images. Mount it to persist data across container restarts. + +## Environment variables + +| Variable | Default | Description | +|------------|----------------------|------------------------------------| +| `DATA_DIR` | `.data` (dev) / `/data` (Docker) | Directory for SQLite DB and uploads | +| `PORT` | `3000` | HTTP port |