- Go 53.8%
- JavaScript 21.7%
- TypeScript 9.9%
- CSS 7%
- HTML 6%
- Other 1.6%
| .forgejo/workflows | ||
| .superpowers/sdd | ||
| cmd | ||
| docs/superpowers | ||
| helm/movie-night-chooser | ||
| internal | ||
| migrations | ||
| scripts | ||
| tests/e2e | ||
| web | ||
| .dockerignore | ||
| .env.example | ||
| .gitignore | ||
| cog.toml | ||
| Dockerfile | ||
| go.mod | ||
| go.sum | ||
| package-lock.json | ||
| package.json | ||
| playwright.config.ts | ||
| README.md | ||
Movie Night Chooser
Movie Night Chooser is a Go web app for creating a private movie-room flow: invite participants, suggest movies from TMDB, veto candidates, score finalists, and share ranked results.
Local Dependencies
- Go 1.25 or newer
- PostgreSQL with the project migrations applied
goosefor database migrations- Node.js and npm for Playwright end-to-end tests
- Docker for image builds
Database Setup
Run migrations against your local PostgreSQL database:
goose -dir migrations postgres "$DATABASE_URL" up
Configuration
Required environment variables (one of):
DATABASE_URL: Full PostgreSQL connection string (preferred).- Or set
PGHOST,PGPORT(default 5432),PGDATABASE,PGUSER,PGPASSWORDindividually.
Optional environment variables:
TMDB_TOKEN: TMDB API bearer token. Movie search requires this outside the local Playwright mock.TMDB_BASE_URL: TMDB API base URL. Defaults tohttps://api.themoviedb.org/3.LISTEN_ADDR: HTTP listen address. Defaults to:8080.
TMDB Token
Create a TMDB API token in your TMDB account settings and export it before running the app locally:
export TMDB_TOKEN="your-token"
Run Locally
export DATABASE_URL="postgres://user:password@localhost:5432/movie_night?sslmode=disable"
go run ./cmd/server
Or with individual database env vars:
export PGHOST=localhost PGPORT=5432 PGDATABASE=movie_night PGUSER=user PGPASSWORD=password
go run ./cmd/server
Visual And Interaction Notes
- The UI uses a dark, poster-card layout with rounded surfaces, lime accents, and monospace status text.
- On mobile, suggestion search stays sticky near the bottom of the viewport and the lock action stays reachable without covering the content below it.
- Below 640px, suggestion and veto cards stack as one-column poster cards; at 640px and above, they switch to two-column card grids.
- Score rows keep the poster on the left at every size so the slider and score value stay readable in narrow viewports.
- In a local room flow, create or join a room, search for movies, add picks, lock picks, veto, then score finalists before viewing ranked results.
Tests
npm install
go test ./...
npm run test:e2e
The E2E script applies the migrations, starts the TMDB mock on port 8787, starts the Go app on port 8080 with TMDB_BASE_URL=http://127.0.0.1:8787, and runs the committed Playwright spec. If DATABASE_URL is set, that PostgreSQL database is used. If DATABASE_URL is unset, the script starts a disposable postgres:16-alpine container on port 55432 and supplies DATABASE_URL to Playwright. The server still requires DATABASE_URL; the E2E script provides it instead of bypassing configuration validation.
Docker
Build the local image:
docker build -t movie-night-chooser:local .
The image exposes port 8080 and runs the compiled server from a distroless runtime image.
Deployment
Helm Chart
The project includes a Helm chart at helm/movie-night-chooser/:
helm install movie-night-chooser ./helm/movie-night-chooser \
--set database.host=postgres.example.com \
--set-string database.port=5432
Required OpenBao Secrets
The chart expects two secrets in OpenBao:
movie-night/postgres— propertypasswordmovie-night/tmdb— propertytoken
CI/CD
Releases are automated via Forgejo Actions. Push conventional commits to
main to trigger automated versioning, image publishing, and Helm value
updates.