MVP Live ยท Google Solution Challenge

๐Ÿ›ก๏ธ AthenaGuard
Technical Docs

AI-powered sports media protection. Detects piracy even after cropping, mirroring, meme edits, and compression.

TypeScript 99.7% Next.js 14 Gemini API Firebase GCP MIT License
01 / Problem Statement

Why AthenaGuard?

Sports broadcasters lose billions annually to unauthorized media redistribution. Existing copyright detection tools rely on exact matching or watermarks โ€” both fail when content is transformed.

The Gap: Traditional systems cannot detect content that has been cropped, mirrored, meme-edited, compressed, or re-uploaded as short clips. AthenaGuard fills this gap with transformation-aware AI.
TransformationTraditional ToolsAthenaGuard
Exact matchโœ“ Detectedโœ“ Detected
Cropped / trimmedโœ— Missedโœ“ Detected
Mirrored / flippedโœ— Missedโœ“ Detected
Meme overlayโœ— Missedโœ“ Detected
Compressed / re-encodedโœ— Missedโœ“ Detected
Short clip re-uploadโœ— Missedโœ“ Detected
02 / Solution

What AthenaGuard Does

A full-stack AI platform providing end-to-end protection: from ingestion and detection through enforcement and analytics.

๐Ÿ”
Transformation-Aware Detection
Detects misuse via embeddings + pHash even after heavy edits
๐Ÿ“ก
Real-Time Monitoring
Queue-based simulated stream scanning multiple platforms concurrently
๐Ÿ”Ž
Manual Verification
Drag-and-drop forensic upload returning similarity score + action
โš–๏ธ
Automated DMCA
One-click notice generation, simulated dispatch, and status tracking
๐Ÿ“Š
ROI Dashboard
Revenue protected, violation heatmaps, platform-wise breakdown
๐Ÿง 
AI Explainability
Gemini-powered reasoning โ€” why content was flagged, audit trail
03 / Architecture

System Architecture

Five distinct layers with clear separation of concerns:

User Layer
Admin / Analyst โ†’ Login (Firebase Auth) โ†’ Dashboard โ†’ Mode selection
โ†“
Ingestion Layer
Simulated stream queue โ†” Manual upload interface
โ†“
AI Core
Preprocessing โ†’ Frame extraction โ†’ Embeddings + pHash + OCR โ†’ Similarity matching โ†’ Decision engine
โ†“
Storage Layer
Media DB ยท Vector DB (embeddings) ยท Incident DB ยท User DB
โ†“
Output Layer
Dashboard ยท Alerts ยท DMCA generate โ†’ send โ†’ track ยท ROI analytics

Decision Engine Thresholds

ConfidenceAction
High > 90%Auto-generate DMCA notice + dashboard alert
Medium 75โ€“90%Route to analyst manual review queue
Low < 75%Log for audit, no action taken
04 / Tech Stack

Technologies Used

Frontend

TechnologyPurpose
React.js / Next.js 14Responsive dashboard UI + server-side rendering
Tailwind CSSUtility-first styling
TypeScriptType-safe codebase (99.7% of repo)

AI & Machine Learning

TechnologyPurpose
Google Gemini APIContent understanding, DMCA generation, AI explanations
OpenCVImage and video frame processing
EmbeddingsSemantic similarity detection across transformations
pHashTransform-resistant perceptual fingerprinting
OCR (Tesseract / Cloud Vision)Meme text recognition and extraction

Cloud & Infrastructure

TechnologyPurpose
Google Cloud PlatformCore infrastructure, compute, hosting
Firebase / FirestoreReal-time database and authentication
Cloud StorageMedia file and asset storage
FAISS / PineconeFast vector similarity search
Firebase AuthSecure login, role-based access (Admin / Analyst)
05 / Getting Started

Installation

Prerequisites

Node.js 18+, npm or yarn, Google Gemini API key (aistudio.google.com), and a Firebase project.

Clone & Install

git clone https://github.com/CodeGeek-Garvit/AthenaGuard1.git
cd AthenaGuard1
npm install
cp .env.example .env.local

Run

npm run dev       # Development โ†’ http://localhost:3000
npm run build     # Production build
npm start         # Start production server

Environment Variables

.env.local
GEMINI_API_KEY=your_gemini_api_key_hereREQUIRED
NEXT_PUBLIC_FIREBASE_API_KEY=your_firebase_api_key
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_project_id
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your_project.appspot.com
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
NEXT_PUBLIC_FIREBASE_APP_ID=your_app_id
06 / Features

Key Features

AI-Based Media Detection

Dual-fingerprint approach combining deep learning embeddings with perceptual hashing ensures high recall across transformation types with controlled false-positive rates. OCR adds meme text recognition as a third detection signal.

Real-Time Monitoring (Simulated)

Queue-based streaming pipeline simulates live platform ingestion with configurable concurrent workers. Designed for drop-in replacement with YouTube Data API v3 and Instagram Graph API in the next phase.

Automated DMCA Workflow

StatusDescription
GeneratedNotice auto-created with evidence attachment
SentSimulated dispatch to platform Trust & Safety
Under ReviewPlatform acknowledgment received
ResolvedContent removed or dispute resolved

Dashboard Views

ViewContent
Security OverviewRevenue protection, violation count, confidence stats, monitored reach
Monitoring FeedLive violation stream with transformation tags
Incident AnalysisSide-by-side original vs detected + AI explanation
DMCA NoticeAuto-generated legal notice with export & send options
Manual VerificationDrag-and-drop forensic scanning interface
Media LibraryProtected asset management with violation tracking
07 / Process Flow

End-to-End Flow

1
User authenticates via Firebase Auth and selects Monitor or Verify mode
2
Monitor: simulated stream feeds media to ingestion queue across platforms
3
Verify: analyst uploads image or video clip for on-demand forensic analysis
4
AI Detection Engine extracts features: embeddings, pHash, OCR text
5
Similarity matching runs against protected media library in vector DB
6
Decision Engine classifies: High (auto-DMCA) ยท Medium (review queue) ยท Low (log)
7
DMCA flow: Generate notice โ†’ Simulated send โ†’ Track status to resolution
8
Results surface on dashboard with ROI metrics and AI explanation audit trail
08 / Cost

Cost Estimation

Development cost: โ‚น0 (student-built). Production cloud estimates below.

ServiceMonthly (INR)
Google Cloud (Compute + Storage)โ‚น3,000 โ€“ โ‚น6,000
Firebase (DB + Auth)โ‚น1,000 โ€“ โ‚น2,000
Gemini API (AI usage)โ‚น2,000 โ€“ โ‚น5,000
Totalโ‚น6,000 โ€“ โ‚น13,000

Architecture is cloud-native and pay-as-you-go. Vector search optimization and modular microservices ensure cost scales linearly with usage.

09 / Stakeholders

Ecosystem Stakeholders

StakeholderRoleValue Delivered
BCCIPrimary Content OwnerIPL digital rights protection
Star SportsOfficial BroadcasterExclusive broadcast slot verification
JioCinemaStreaming PartnerPiracy-led churn reduction
Trust & Safety TeamsPlatform ModeratorsPre-verified flags, 40% faster review
10 / Roadmap

Development Roadmap

NOW โ€” MVP
Current Release
  • Simulated real-time monitoring
  • Manual verification interface
  • DMCA notice generation
NEXT โ€” Platform Integration
Live API Connections
  • YouTube Data API v3
  • Instagram Graph API
  • Real-time takedown workflows
v3 โ€” Advanced AI
Enhanced Detection
  • Full video-level tracking
  • Live stream detection
  • Improved short-clip analysis
v4 โ€” Automation
Legal at Scale
  • Direct legal service integration
  • Faster DMCA execution at scale
v5 โ€” Global
Global Expansion
  • OTT platform support
  • Blockchain-based ownership verification
  • Tamper-proof media authenticity tracking