Skip to content

edgardopaz/hackpsu26

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fact Checker

React + FastAPI app for an upload-first fact-checking workflow:

  1. Upload a screenshot, audio/video clip, or social media link.
  2. Extract visible text or transcribe spoken content.
  3. Analyze bait-like or misleading framing.
  4. Compare against broader reporting.
  5. Return a neutral summary.

Structure

backend/
  api/         FastAPI routes
  core/        Settings and app config
  schemas/     Request and response models
  services/    OCR, transcription, framing, search, summarization pipeline
  scripts/     Smoke tests for live backend services
  tests/       Basic API tests
frontend/
  src/api/         Backend client helpers
  src/components/  UI building blocks

Backend

Windows

cd backend
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt
python -m uvicorn main:app --reload

Linux/Mac

cd backend
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
uvicorn main:app --reload

For video uploads, install the ffmpeg system binary and make sure it is on PATH.

Ubuntu / WSL:

sudo apt update
sudo apt install ffmpeg

Required environment variables in the repo-root .env:

GEMINI_API_KEY=
TAVILY_API_KEY=
FRONTEND_ORIGIN=http://localhost:5173

Current backend inputs:

  • screenshot/image upload
  • audio upload
  • video upload
  • social media link

The /api/analyze route routes images through OCR, audio/video through transcription, and links through Tavily extraction before running the shared framing/search/summary pipeline.

Smoke Tests

Run these from backend/ after activating the virtualenv:

python scripts/ocr_smoke_test.py
python scripts/analyzer_smoke_test.py
python scripts/search_smoke_test.py
python scripts/summary_smoke_test.py
python scripts/media_smoke_test.py /absolute/path/to/clip.mp3 or clip.mp4

Frontend

cd frontend
npm install
npm run dev

Vite proxies /api requests to http://localhost:8000.

Tests

From backend/:

python -m pytest

About

tool that allows you verify information you see online

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors