No description
- Go 54.6%
- JavaScript 34.9%
- CSS 9.8%
- HTML 0.7%
| cmd/tempo | ||
| fonts/vodka | ||
| internal | ||
| js | ||
| vendor | ||
| app.js | ||
| data.js | ||
| go.mod | ||
| go.sum | ||
| graph.js | ||
| index.html | ||
| README.md | ||
| styles.css | ||
Tempo
Tempo now defaults to the Go-backed SSR/SSE runtime. The previous vanilla JS +
localStorage demo is still available as a frozen fallback under /local/.
Run
go run -mod=mod ./cmd/tempo -addr :8080
Open http://localhost:8080. The server seeds SQLite on first boot and stores
data in tempo.db unless you pass another DSN. Use -reset after demo schema
or fixture changes when you want the current seed, including reporting lines.
Useful flags and matching env vars:
| Flag | Env | Default | Notes |
|---|---|---|---|
-addr |
TEMPO_ADDR |
:8080 |
HTTP listen address |
-db-driver |
TEMPO_DB_DRIVER |
sqlite |
sqlite or mysql |
-dsn |
TEMPO_DSN |
SQLite tempo.db |
Driver-specific DSN |
-assets-dir |
TEMPO_ASSETS_DIR |
. |
Directory with CSS/JS/assets |
-tz |
TEMPO_TZ |
local time | Business timezone |
-reset |
TEMPO_RESET |
false |
Reseed data on boot |
SQLite uses the CGO-free modernc.org/sqlite driver. MySQL uses
github.com/go-sql-driver/mysql:
TEMPO_DB_DRIVER=mysql TEMPO_DSN='user:pass@tcp(localhost:3306)/tempo?parseTime=true' \
go run -mod=mod ./cmd/tempo
Validate
This repo has a non-Go vendor/ folder, so use -mod=mod unless you later sync
a real Go vendor tree.
go test -mod=mod ./...
go test -mod=mod -bench=. -benchmem ./...
Runtime shape
- Real SSR routes:
/,/wall,/who/{employeeID},/shifts,/requests,/operations,/admin. - Patch navigation: the browser requests server-rendered patch envelopes and
applies them through
Tempo.patch. - SSE:
/eventssends connection-scoped snapshots; the server renders each connected session with that session's identity, filters, tabs, theme, and permissions. - Local fallback:
/local/serves the old static/localStorage app.
Seeded demo data
The Go runtime seeds a thick SAMA/ATL operations fixture:
- Metros: SAMA and ATL.
- Teams: SAMA has SN/SAT Site Services and Logistics; ATL has Site Services and Logistics.
- Shifts: A/B Side Days and Nights, 12-hour 7-to-7 schedules on a two-week complement cycle.
- Staffing: every team+shift has two managers; each manager seeds two seniors and twelve techs.
- Org chart: manager scope is based on direct reports/reporting subtree, not the whole team. Ops Cross-team is the intentional full-visibility exception.
- Demo login convention: each seeded employee has
name@tempo.demo; the shared demo password isPassword123.