Files
ccp/Makefile
T
adamfandClaude Opus 5.5 e6a93be15c
Test and publish / test (push) Successful in 25s
Test and publish / publish (push) Successful in 3m1s
Gate the dashboard on the site's admin login and add a setup page
Like job-tracker, the tracker forwards the visitor's cookies to the site
backend's /auth/validate-admin instead of asking for an API key. Signed
in, the dashboard shows every device's data. The new /setup page has
instructions for each collector and creates and revokes API keys. The
userscript is served publicly at /tracker.user.js.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-14 21:22:02 +01:00

35 lines
889 B
Makefile

COMPOSE := docker compose -f deploy/docker-compose.yml
DEV_DB := postgres://tracker:tracker@localhost:5432/tracker?sslmode=disable
.PHONY: build test test-integration run up down docker migrate install-agent
build:
go build -o bin/ ./cmd/...
test:
go test ./...
# Runs the API tests against the compose Postgres (make up first).
test-integration:
TEST_DATABASE_URL='$(DEV_DB)' go test -count=1 ./...
run:
AUTH_MODE=dev DEV_MODE=true DATABASE_URL='$(DEV_DB)' go run ./cmd/tracker serve
up:
$(COMPOSE) up -d --build
down:
$(COMPOSE) down
docker:
docker build -f deploy/Dockerfile -t activity-tracker .
migrate:
DATABASE_URL='$(DEV_DB)' go run ./cmd/tracker migrate
install-agent:
go build -o $(HOME)/.local/bin/hypr-agent ./cmd/hypr-agent
install -Dm644 deploy/systemd/hypr-agent.service $(HOME)/.config/systemd/user/hypr-agent.service
systemctl --user daemon-reload