Skip to content

Development

  • Go 1.26+
  • Node 22+
  • Task
  • ffmpeg and ffprobe on PATH
Terminal window
git clone https://github.com/befabri/replayvod.git
cd replayvod
task setup # go mod download + npm install
Terminal window
task dev # server on :8080, dashboard on :3000

Vite proxies /api/* and /trpc/* to the Go server, so the SPA works at http://localhost:3000 against a backend on :8080.

Terminal window
task build # production builds

The recorder lands at server/bin/replayvod; the SPA is bundled to dashboard/dist/.

Terminal window
task # list every task
task check # go vet + biome + tsc --noEmit
task test # full test suite

Three generators, all driven from the Taskfile. Generated files are committed; CI runs the :check variants to fail on drift.

Terminal window
task sqlc # queries/*.sql → pggen / sqlitegen
task trpcgen # tRPC procedures → dashboard/src/api/generated/
task twitch-api-gen # Twitch HTML docs → internal/twitch + eventsub
task gen # all of the above

After adding a query in server/queries/{postgres,sqlite}/, run task sqlc to regenerate the typed Go. After adding a tRPC procedure in server/internal/api/, run task trpcgen to push types and Zod schemas to the dashboard.

Test suites are gated by build tags so the default run stays fast and dependency-free.

CommandTagWhat it covers
task test(none)unit tests
task test-integration//go:build integrationDocker-backed (Garage S3, Postgres testcontainer)
task test-ffmpeg//go:build ffmpegreal ffmpeg / ffprobe
task test-live//go:build livereal Twitch endpoints (opt-in)

Container fixtures for integration tests live in server/internal/testdb/.

Inside dashboard/:

Terminal window
npm run dev # Vite dev server on :3000
npm run build # bundle to dist/
npm test # vitest unit tests
npx playwright test
npm run lint # biome
npm run routes # regenerate routeTree.gen.ts

Either Bun or npm works; both lockfiles are committed.

Inside relay/:

Terminal window
npm install
npm run dev # wrangler dev
npm run deploy # wrangler deploy

You need a Cloudflare account and wrangler installed.

See Architecture → Server for the package-by-package map.