Team Points WebApp, themed as houses from Hogwarts
  • TypeScript 42.5%
  • Go 26.1%
  • Astro 11.1%
  • CSS 7.9%
  • Makefile 4.7%
  • Other 7.7%
Find a file
arcanedemesne c085e97db3
Some checks are pending
Deploy stage / deploy (push) Waiting to run
Add dev/stage/prod env support
2026-07-15 00:11:42 -04:00
.forgejo/workflows Add dev/stage/prod env support 2026-07-15 00:11:42 -04:00
backend Add dev/stage/prod env support 2026-07-15 00:11:42 -04:00
docs Add dev/stage/prod env support 2026-07-15 00:11:42 -04:00
frontend Add dev/stage/prod env support 2026-07-15 00:11:42 -04:00
nginx Add dev/stage/prod env support 2026-07-15 00:11:42 -04:00
.env.example Add dev/stage/prod env support 2026-07-15 00:11:42 -04:00
.env.stage.example Add dev/stage/prod env support 2026-07-15 00:11:42 -04:00
.gitignore first commit 2026-07-11 12:05:02 -04:00
.golangci.yml Refactor to use new @arcanedemesne/* components 2026-07-14 13:53:55 -04:00
authentik.bootstrap.yaml first commit 2026-07-11 12:05:02 -04:00
authentik.sync.yaml Add dev/stage/prod env support 2026-07-15 00:11:42 -04:00
compose.prod.yml Add dev/stage/prod env support 2026-07-15 00:11:42 -04:00
compose.stage.yml Add dev/stage/prod env support 2026-07-15 00:11:42 -04:00
compose.yml Add dev/stage/prod env support 2026-07-15 00:11:42 -04:00
go.work Refactor to use new @arcanedemesne/* components 2026-07-14 13:53:55 -04:00
Makefile Add dev/stage/prod env support 2026-07-15 00:11:42 -04:00
nginx.conf Add dev/stage/prod env support 2026-07-15 00:11:42 -04:00
README.md Add dev/stage/prod env support 2026-07-15 00:11:42 -04:00

Hogwarts House Cup

Go BFF API + Astro frontend for house cup scores. Edge nginx 8087 (dev); API 5087; Astro 4087; Postgres 6087. Production: https://cup.arcanedemesne.com. Stage: https://stage.cup.arcanedemesne.com.

Port matrix: Gateway/PORT_MATRIX.md

Compose

Requires gateway-hub (edge only) and authentik-net (API OIDC backchannel) — create once from Gateway. Never put api/app on gateway-hub.

cp .env.example .env
make up
make migrate-up

Production (tier-2 ports 8287/6287):

cp .env.example .env.prod
make up-prod
make migrate-up-prod

Stage (tier-1 ports 8187/6187):

cp .env.stage.example .env.stage
make up-stage
make migrate-up-stage

Env files

File Use
.env.example Dev (cup-dev, tier-0)
.env make up
.env.stage.example Stage template
.env.stage make up-stage
.env.prod make up-prod

Local split-port

Process Directory Env URL
Go API backend/ .env.local http://localhost:5087
Astro frontend/cup/ src/.env.development.local http://localhost:4087
# Terminal 1 — backend/
cp .env.example .env.local
make run

# Terminal 2 — frontend/cup/
bun install && bun dev

Auth

OIDC via Packages/authentication. Cookie per tier: cup-auth-dev / -stage / -prod. Groups: homelab-users / homelab-admins. See docs/SSO.md.

Migrations

Tier Postgres (host) Migrate
dev 6087 make migrate-up
stage 6187 make migrate-up-stage
prod 6287 make migrate-up-prod

Reload edge after backend recreate: make proxy-reload-dev, proxy-reload-stage, or proxy-reload-prod.

Stage deploy: .forgejo/workflows/deploy-stage.yaml.

Tests

make test
# optional frontend:
make test-frontend

Routes

Page Path
Hero /
House Cup board /house-cup (session required)

API: GET /api/v1/health, GET /api/v1/houses, PATCH /api/v1/houses/{id} body { "score": <int> }.