Files
tracker/README.md
T
kyle c9e74b236d tracker: single-binary project tracker with auth, api keys, and json api
Go + SQLite web app, server-rendered, hackerman theme. Projects with
descriptions, searchable notes, todo/doing/done task tracking. Bcrypt
login sessions, hashed api keys, full /api/v1 crud. Deploys on straylight
via configs/tracker.nix (prebuilt binary).
2026-09-18 21:28:40 -07:00

94 lines
2.8 KiB
Markdown

# tracker
Single-binary project tracker with a Hackerman/terminal aesthetic. Go + SQLite,
server-rendered — no runtime dependencies, no build step, no JS.
## Features
- **Auth required** — username/passphrase login (bcrypt), server-side sessions
- **API keys** for remote/CLI access, managed from the web UI
- **Full JSON API** under `/api/v1/`
- **Projects** with name + description
- **Notes** per project, searchable via the global `grep the grid…` bar
- **Tasks** per project with `todo → doing → done` cycling (click the badge)
- **Global search** across project names, descriptions, notes, and task titles
- SQLite storage, WAL mode, everything in one file
## Setup
```
go build -o tracker .
./tracker -adduser kyle # prompts for a passphrase (min 8 chars)
./tracker
```
Non-interactive variant: `TRACKER_PASSWORD=... ./tracker -adduser kyle`.
Defaults: listens on `:8420` (all interfaces, so it's reachable over Tailscale),
database at `~/.local/share/tracker/tracker.db`.
```
./tracker -addr :9000 -db /path/to/tracker.db
```
## API keys
Log in, go to **keys**, generate a key. It's shown once (only a SHA-256 hash is
stored). Keys grant full API access and track last-used time; revoke anytime.
## API
Authenticate with `X-API-Key: <key>`, `Authorization: Bearer <key>`,
`Authorization: Basic`, or just your browser session cookie.
```
GET /api/v1/projects list
POST /api/v1/projects {"name": "...", "description": "..."}
GET /api/v1/projects/{id}
PATCH /api/v1/projects/{id} partial update (name/description)
DELETE /api/v1/projects/{id} cascades tasks + notes
GET /api/v1/projects/{id}/notes
POST /api/v1/projects/{id}/notes {"body": "..."}
GET /api/v1/notes/{id}
PATCH /api/v1/notes/{id} {"body": "..."}
DELETE /api/v1/notes/{id}
GET /api/v1/projects/{id}/tasks
POST /api/v1/projects/{id}/tasks {"title": "...", "status": "todo"}
GET /api/v1/tasks/{id}
PATCH /api/v1/tasks/{id} {"title": "...", "status": "doing"}
DELETE /api/v1/tasks/{id}
GET /api/v1/search?q=term
```
```
curl -H "X-API-Key: trk_..." http://host:8420/api/v1/projects
curl -u kyle -X PATCH -d '{"status":"done"}' http://host:8420/api/v1/tasks/3
```
## Autostart (systemd user unit)
```
cp tracker.service ~/.config/systemd/user/
systemctl --user daemon-reload
systemctl --user enable --now tracker
```
Reach it from any device on your tailnet at `http://<tailscale-ip>:8420`.
## Theme
Palette lifted from omarchy's Hackerman theme (`hackerman.nvim`):
| token | hex |
|--------|-----------|
| bg | `#0B0C16` |
| panel | `#080911` |
| line | `#1a1d2b` |
| fg | `#ddf7ff` |
| muted | `#6a6e95` |
| neon | `#50f872` |
| cyan | `#7cf8f7` |