Content Shield is a web app that helps creators check a video for social platform policy risk before posting it.
If you post a video without reviewing it carefully, you can run into:
- platform takedowns
- limited reach or demonetization
- missed policy issues in the audio, visuals, or on-screen text
- uncertainty about whether a video is risky enough to rewrite or re-edit
Content Shield is built to make that first review faster. You upload a video, choose the platform, and get a simple risk assessment with flagged issues and a short explanation.
- lets you choose a target platform: YouTube, TikTok, Instagram, or X
- uploads a video to the backend for analysis
- uses Gemini to review the video
- pulls platform policy context from local policy documents using retrieval
- returns a
Low,Medium, orHighrisk level - returns a short summary of why that risk level was assigned
- returns flagged issues with timestamps, snippets, and rationale
- The React frontend lets the user pick a platform and upload a video.
- The FastAPI backend accepts the file at
POST /analyze. - The backend retrieves policy context from documents in
backend/policy_docs. - Gemini analyzes the uploaded video with that policy context.
- The app returns a structured result for the frontend to display.
- frontend: React, Vite, TypeScript, Tailwind
- backend: FastAPI
- AI: Google Gemini
- retrieval: LlamaIndex + ChromaDB
- caching and rate limiting: Redis
Docker is the easiest way to run the full project because it starts the frontend, backend, and Redis together.
Copy backend/env.example to backend/.env and add your Gemini key:
GEMINI_API_KEY=your_api_key_heredocker compose up --build- frontend:
http://localhost:8080 - backend docs:
http://localhost:8000/docs
Use this if you want to run the frontend and backend yourself.
- Python 3.10+
- Node.js 20+
- Redis
- FFmpeg
Make sure Redis is running locally, then create backend/.env and add your Gemini key. Set REDIS_URL to your local Redis instance.
Example:
GEMINI_API_KEY=your_api_key_here
REDIS_URL=redis://localhost:6379/0Install backend dependencies:
cd backend
python -m venv venvActivate the virtual environment, then install packages:
pip install -r requirements.txtStart the backend from the backend folder:
uvicorn app.main:app --reload --port 8000From the project root:
npm ci
npm run dev -- --port 8080Open http://localhost:8080.
- policy documents are stored in
backend/policy_docs - the local vector database is stored in
backend/chroma_db - Redis is used for caching analysis results and rate limiting
- the frontend defaults to
http://localhost:8000for the API ifVITE_API_URLis not set