An intelligent video search platform built with Replit Agent during Ship it Hacks 2026. Upload surveillance footage, let AI automatically index every frame, then search for anything using natural language.
Find anything in any footage. Search across hours of video in seconds. Just describe what you're looking for.
- π One-Click Video Upload β Upload
.mp4or.movfiles and let the indexing begin - π§ Intelligent Frame Analysis β Automatically extracts frames every 2 seconds and analyzes each with GPT-5 vision
- π Semantic Search β Find exactly what you're looking for using natural language (e.g., "person wearing red shirt", "suspicious activity")
- β‘ Real-Time Indexing Progress β Watch the AI analyze your videos in real-time
- π Dashboard β Manage videos, view indexing stats, and search history
- Upload β User uploads video to cloud storage (GCS) via presigned URL
- Extract β Backend downloads and splits video into frames (every 2 seconds)
- Analyze β Each frame sent to GPT-5-mini vision model for semantic description
- Store β Frame descriptions indexed in PostgreSQL for fast retrieval
- Search β User queries matched against frame database using semantic matching
- Query the entire database or search within specific videos
- GPT-5-mini semantically matches user queries against stored frame descriptions
- Results ranked by relevance with match explanations
- Includes timestamp and thumbnail preview
| Layer | Technology |
|---|---|
| Frontend | React 19 + Vite + TailwindCSS + shadcn/ui |
| Backend | Express 5 + TypeScript |
| Database | PostgreSQL + Drizzle ORM |
| AI/Vision | OpenAI GPT-5-mini via Replit AI Integrations |
| Storage | GCS via Replit Object Storage |
| Video Processing | ffmpeg |
| Monorepo | pnpm workspaces |
| Build | esbuild |
trace/
βββ artifacts/
β βββ api-server/ # Express backend (REST API)
β βββ cctv-search/ # React + Vite frontend
β βββ mockup-sandbox/ # Component preview sandbox
βββ lib/
β βββ api-spec/ # OpenAPI specification
β βββ api-zod/ # Zod validation schemas
β βββ api-client-react/ # Generated API client hooks
β βββ db/ # Database schema & migrations
β βββ integrations-openai-ai-*/ # AI integration packages
βββ scripts/ # Utilities
- Node.js 24+
- pnpm (package manager)
- PostgreSQL database
- GCS bucket for video storage
- OpenAI API key (via Replit AI Integrations)
# Install dependencies
pnpm install
# Setup environment variables
cp .env.example .env
# Edit .env with your database, storage, and API credentials
# Run database migrations
pnpm --filter @workspace/db run push
# Start development servers
# Terminal 1 - API server
pnpm --filter @workspace/api-server run dev
# Terminal 2 - Frontend
pnpm --filter @workspace/cctv-search run dev# Full typecheck and build
pnpm run build
# Regenerate API client from OpenAPI spec
pnpm --filter @workspace/api-spec run codegen| Method | Endpoint | Description |
|---|---|---|
GET |
/api/videos |
List all uploaded videos |
POST |
/api/videos |
Upload new video |
GET |
/api/videos/:id |
Get video details |
POST |
/api/videos/:id/index |
Start indexing process |
GET |
/api/videos/:id/index-status |
Check indexing progress |
POST |
/api/search |
Semantic search across frames |
GET |
/api/search/history |
View search history |
idβ Unique identifiernameβ Video filenameobjectPathβ GCS storage pathstatusβ pending | indexing | indexed | errortotalFramesβ Extracted frame countindexedFramesβ Analyzed frame countdurationSecondsβ Video lengtherrorMessageβ Error details (if failed)
idβ Unique identifiervideoIdβ Reference to videotimestampSecondsβ Frame position in videoobjectPathβ GCS storage path of frame imagedescriptionβ AI-generated frame description
- Tracks user search queries and results
- Upload a video β Creates pending video record
- Trigger indexing β Background job starts processing
- Frame extraction β ffmpeg splits video into snapshots
- AI analysis β Each frame analyzed with GPT-5-mini vision model
- Storage β Frame descriptions saved to database
- Search β Submit natural language query β semantic matching β ranked results with timestamps
Example search flow:
Query: "person wearing red jacket"
β
GPT-5-mini compares against 1000+ frame descriptions
β
Returns top 10 matching frames with timestamps
β
Click result β Jump to video at exact timestamp
Built during Ship it Hacks 2026 using the Replit Agent platform. This project demonstrates:
- Full-stack agentic development with AI-driven architecture
- Seamless integration of vision AI (GPT-5) with web applications
- Real-time processing and semantic search capabilities
- Production-ready TypeScript monorepo patterns
- Videos stored in private GCS buckets
- Database uses authenticated PostgreSQL connections
- API-key protected endpoints
- Frame processing happens server-side (no client-side video processing)
- Search queries logged to database for analytics
# Database
DATABASE_URL=postgresql://...
PGHOST=...
PGUSER=...
PGPASSWORD=...
# AI Integration
AI_INTEGRATIONS_OPENAI_BASE_URL=https://...
AI_INTEGRATIONS_OPENAI_API_KEY=...
# Object Storage
DEFAULT_OBJECT_STORAGE_BUCKET_ID=...
PRIVATE_OBJECT_DIR=videos/
PUBLIC_OBJECT_SEARCH_PATHS=frames/
# Server
PORT=3000
BASE_PATH=/
SESSION_SECRET=...This is a hackathon project. Feel free to fork and extend!
MIT
Trace β Because every frame tells a story. Make them searchable.
