3
0
Fork 0
No description
  • Go 54.6%
  • JavaScript 34.9%
  • CSS 9.8%
  • HTML 0.7%
Find a file
2026-06-18 18:52:15 -05:00
cmd/tempo stuff 2026-06-18 18:52:15 -05:00
fonts/vodka stuff 2026-06-18 18:52:15 -05:00
internal stuff 2026-06-18 18:52:15 -05:00
js stuff 2026-06-18 18:52:15 -05:00
vendor stuff 2026-06-18 18:52:15 -05:00
app.js stuff 2026-06-18 18:52:15 -05:00
data.js stuff 2026-06-18 18:52:15 -05:00
go.mod stuff 2026-06-18 18:52:15 -05:00
go.sum stuff 2026-06-18 18:52:15 -05:00
graph.js stuff 2026-06-18 18:52:15 -05:00
index.html stuff 2026-06-18 18:52:15 -05:00
README.md stuff 2026-06-18 18:52:15 -05:00
styles.css stuff 2026-06-18 18:52:15 -05:00

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: /events sends 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 is Password123.