ai-code-battle/cmd/acb-index-builder
jedarden 70bde20472 Add Go index builder (cmd/acb-index-builder)
Per plan §11.1, the index builder reads PostgreSQL and generates all JSON
index files for Cloudflare Pages deployment:

- main.go: Build cycle orchestration with configurable timeout, self-restart
- config.go: Environment-based configuration with sensible defaults
- db.go: PostgreSQL data fetching for bots, matches, series, seasons, predictions
- generator.go: JSON index generation (leaderboard, bots, matches, playlists)
- deploy.go: Cloudflare Pages deployment via wrangler, R2 warm cache pruning
- Dockerfile: Multi-stage build with Go + Node.js + wrangler CLI
- main_test.go: Tests for config, index generation, playlists

Index builder runs on 15-minute cycles, deploys to Pages every ~90 minutes,
and prunes R2 warm cache weekly to stay within 10GB free tier.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-29 03:15:47 -04:00
..
config.go Add Go index builder (cmd/acb-index-builder) 2026-03-29 03:15:47 -04:00
db.go Add Go index builder (cmd/acb-index-builder) 2026-03-29 03:15:47 -04:00
deploy.go Add Go index builder (cmd/acb-index-builder) 2026-03-29 03:15:47 -04:00
Dockerfile Add Go index builder (cmd/acb-index-builder) 2026-03-29 03:15:47 -04:00
generator.go Add Go index builder (cmd/acb-index-builder) 2026-03-29 03:15:47 -04:00
main.go Add Go index builder (cmd/acb-index-builder) 2026-03-29 03:15:47 -04:00
main_test.go Add Go index builder (cmd/acb-index-builder) 2026-03-29 03:15:47 -04:00