10 Commits
Author SHA1 Message Date
Esiah e8fdda738e refactor: move app from apps/kai-sa-cam to the repository root
CD — Kai-Sa-Cam Deployment / deploy (push) Successful in 9s
- move sources, Dockerfile and build config (src, public, package.json,
  vite/tailwind/postcss/tsconfig, index.html) to the repo root
- docker-compose: build context is now "." instead of ./apps/kai-sa-cam
- add a .dockerignore (node_modules, dist, media, config, .env, ...) so
  the larger build context does not ship media, secrets or local
  node_modules into the image
- deploy workflow: replace the apps/kai-sa-cam/** paths filter with
  paths-ignore so pushes keep triggering deployments
- remove the Renovate workflow
2026-10-26 09:01:54 +01:00
Esiah c1047892ae fix: restore Access auth, add egress network, harden media routes
CD — Kai-Sa-Cam Deployment / deploy (push) Successful in 10s
The app returned 401 on every request because jwtVerify could not fetch
the Cloudflare Access signing keys (getaddrinfo EAI_AGAIN): kai-sa-cam
was only attached to internal networks (kai-sa-cam-internal and the
external kai-sa-cam-tunnel, which has Internal=true), so it had no DNS
or route to the Internet.

Network
- add a dedicated kai-sa-cam-egress bridge network, attached to
  kai-sa-cam only
- kai-sa-go2rtc stays on kai-sa-cam-internal only (no published ports,
  no outbound access); the video stream remains reachable solely through
  the authenticated /go2rtc proxy

Auth (index.ts)
- log the reason when an Access JWT is rejected instead of silently
  returning 401
- fail closed: exit at startup when CF_ACCESS_TEAM_DOMAIN or
  CF_ACCESS_AUD is missing, unless ALLOW_NO_AUTH=1

Media (media.ts)
- replace inline require() calls with ESM imports (resolve, mkdirSync)
- resolve the path first, then check it against MEDIA_DIR + path.sep
  (previous check ran after existsSync and accepted sibling prefixes)
- on export, delete files only on the response "finish" event, not when
  the archive is finalized, so an interrupted download no longer loses
  media
- snapshots: stop calling reject() after the response was sent, which
  caused unhandled rejections

Recorder (recorder.ts)
- enforce DISK_MIN_FREE_GB with statfsSync (was a stub returning true)
- track the recording in a single state object and wait on an exit
  promise instead of polling; make cleanup idempotent
- return 502 when ffmpeg exits right after start
- recover orphaned .part files at startup
- return file names instead of full paths from /start, /stop and /status
2026-10-26 01:19:16 +01:00
Esiah c6b08b4812 feat: handle Cloudflare Access session expiry and serve go2rtc same-origin
CD — Kai-Sa-Cam Deployment / deploy (push) Successful in 1m59s
- add apiFetch wrapper with re-auth popup, retry and session monitor
- proxy go2rtc through the app (/go2rtc) and drop the public stream hostname
- route WebSocket upgrades manually (the talk WSS was rejecting go2rtc MSE)
- harden talkback: paplay error handling, heartbeat, single speaker, reconnect
- sync recording state with the server on load and on 409
- optionally verify Cf-Access-Jwt-Assertion (CF_ACCESS_TEAM_DOMAIN/AUD)
- keep go2rtc on the internal network only
- remove unused env vars, update README and cam-watch script
2026-10-26 00:50:08 +01:00
Esiah 2f8d55cab1 fix: mount pulseaudio socket and cookie to go2rtc container
CD — Kai-Sa-Cam Deployment / deploy (push) Successful in 4s
2026-10-25 13:26:19 +01:00
Esiah 5fc8a1c988 fix: update go2rtc stream url, fix video player layout, correct recording max minutes, attach go2rtc to tunnel network and fix pulse cookie volume
CD — Kai-Sa-Cam Deployment / deploy (push) Successful in 10s
2026-10-25 13:22:37 +01:00
Esiah 1dd8802c68 fix: add GO2RTC_PUBLIC_URL environment variable
CD — Kai-Sa-Cam Deployment / deploy (push) Successful in 10s
2026-10-25 15:05:42 +01:00
Esiah 7f51c1ffb5 fix: run kai-sa-cam as 1001:1001 for pulse access
CD — Kai-Sa-Cam Deployment / deploy (push) Successful in 4s
2026-10-25 02:28:46 +02:00
Esiah ce23b6f454 chore: remove go2rtc basic auth (protected by Cloudflare Access)
CD — Kai-Sa-Cam Deployment / deploy (push) Successful in 5s
2026-10-25 02:18:34 +02:00
Esiah 73394dfbbc feat: restructure to kai-sa-cam layout with apps/ structure
CD — Kai-Sa-Cam Deployment / deploy (push) Canceled after 0s
2026-10-25 01:06:31 +02:00
Esiah 831e4b0ae0 cam: go2rtc + mic-bridge 2026-10-22 02:27:01 +02:00