Skip to content

codejoey/seatview

Repository files navigation

SeatView

SeatView is a progressive web app for augmenting soccer stadium videos with crowd activity heatmaps, inferred chant-volume overlays, and multilingual speech bubbles.

What It Does

  • 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.

How It's Built

  • 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.

Setup

npm install
cp env.example .env.local
npm run dev

Use npm run check to see which Firebase, Gemini, and GMI credentials are still missing.

Phone Testing With ngrok

Run the local server, then expose it with ngrok:

npm run dev:phone
ngrok http 3000

Use 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.

Firebase Data Model

  • 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.

Pipeline Specs

  • pipelines/vision-analysis.pipe samples video frames and routes them through Gemini vision.
  • pipelines/bubble-generation.pipe turns intensity context into bubble plans through GMI/Gemini.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors