feat: workout-suggester, weather-aware workouts from a local Gemma

Go + Templ + HTMX app that checks the weather (Open-Meteo, MET Norway
fallback), scores run/ride/walk with plain rules, and has a local
open-weight model (Gemma 4 E2B via any OpenAI-compatible server) write
the plan. Routes are loops from your door (BRouter) plus signposted
OpenStreetMap routes (Overpass), with GPX export.
This commit is contained in:
bdeb1337 committed 2026-10-11 19:29:58 +02:00
commit d7342d6096
42 files changed
+7219

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo dev)
LDFLAGS := -s -w -X main.version=$(VERSION)
PLATFORMS := linux/amd64 linux/arm64 darwin/arm64 darwin/amd64 windows/amd64 windows/arm64
.PHONY: generate build run test dist
generate: ## regenerate Templ components
go tool templ generate
build: generate ## build ./bin/workout-suggester for this machine
go build -trimpath -ldflags "$(LDFLAGS)" -o bin/workout-suggester ./cmd/workout-suggester
run: build ## run in the foreground (reads ./.env)
./bin/workout-suggester --debug
test: ## unit + handler tests (no model or network needed)
go test -race ./...
dist: generate ## cross-compile for every platform into ./dist
@for p in $(PLATFORMS); do \
os=$${p%/*}; arch=$${p#*/}; ext=$$( [ $$os = windows ] && echo .exe ); \
echo " $$os/$$arch"; \
CGO_ENABLED=0 GOOS=$$os GOARCH=$$arch go build -trimpath -ldflags "$(LDFLAGS)" \
-o dist/workout-suggester-$$os-$$arch$$ext ./cmd/workout-suggester || exit 1; \
done