feat(m6): CSV export, Makefile, README, single-binary build

This commit is contained in:
2026-04-30 16:48:44 +02:00
parent 4a328ad6cc
commit 2055a46dee
4 changed files with 289 additions and 0 deletions

34
Makefile Normal file
View File

@@ -0,0 +1,34 @@
.PHONY: build build-web build-go dev test clean
# Build the production single binary (embeds the Svelte SPA)
build: build-web build-go
build-web:
@echo "==> Building Svelte frontend..."
cd web && npm run build
build-go:
@echo "==> Building Go binary (production, embeds web/build)..."
go build -tags production -o wotra ./cmd/wotra
# Development mode: run Go server + Vite dev server concurrently
dev:
@echo "==> Starting development servers..."
@echo " Go API: http://localhost:8080"
@echo " Vite UI: http://localhost:5173"
@trap 'kill 0' INT; \
AUTH_TOKEN=$${AUTH_TOKEN:-devtoken} go run ./cmd/wotra & \
cd web && npm run dev
# Run all Go tests
test:
go test ./...
# Install frontend dependencies
web/node_modules:
cd web && npm install
# Remove build artifacts
clean:
rm -f wotra
rm -rf web/build web/.svelte-kit