SeatView is a progressive web app for augmenting soccer stadium videos with crowd activity heatmaps, inferred chant-volume overlays, and multilingual speech bubbles.
- Upload a soccer crowd recording.
- Create an analysis job through
POST /api/analyze. - Store videos, job metadata, segments, bubbles, and CSV artifacts in Firebase when credentials are configured.
- Fall back to local in-memory development mode when Firebase credentials are absent.
- Render activity and inferred-volume overlays on top of the video.
- Export CSV-compatible activity and volume artifacts.
- Next.js App Router + TypeScript PWA.
- Firebase Auth anonymous sign-in on the client.
- Firebase Admin, Firestore, and Storage on the server.
- Pipeline definitions for Gemini visual analysis and GMI/Gemini bubble generation.
- Deterministic local analysis utilities for development and testability.
npm install
cp env.example .env.local
npm run devUse npm run check to see which Firebase, Gemini, and GMI credentials are still missing.
Run the local server, then expose it with ngrok:
npm run dev:phone
ngrok http 3000Use the port printed by Next if it picks a different one, for example ngrok http 3001. Open the HTTPS forwarding URL from ngrok on your Android phone. The Video panel has two options: upload an existing clip, or tap Record clip to open the phone camera and save a new video into the same analysis flow.
videos/{videoId}stores owner, storage path, filename, dimensions, and duration.analysisJobs/{jobId}stores status, model profile, progress, and timestamps.analysisJobs/{jobId}/segments/{segmentId}stores activity and volume summaries.analysisJobs/{jobId}/bubbles/{bubbleId}stores positioned chant bubble events.
Large CSV/JSON artifacts belong in Firebase Storage with Firestore pointers.
pipelines/vision-analysis.pipesamples video frames and routes them through Gemini vision.pipelines/bubble-generation.pipeturns intensity context into bubble plans through GMI/Gemini.