How jodhbirs/fightev works
FightEV serves UFC card predictions and fighter profiles: users browse odds, Elo probabilities, expected value and quarter-Kelly sizing, then explore a searchable fighter directory and Elo/fight histories. The frontend pages call a FastAPI API; it computes card metrics and reads fighter data backed by SQLite. Separate ingestion/update scripts maintain historical ratings and the upcoming card. Their detailed external data flows are documented at a high level but not excerpted here, so those links are shown as unverified. API and page implementations were sampled; unsampled ingestion details are not inferred.
Main entry points: App.tsx Web app routes · main.py FastAPI endpoints · database.py DB sessions · api.ts API client
Components 18
Web experience
- Web app routes
frontend/src/App.tsx - Navigation
frontend/src/components/Navbar.tsx - Fight card
frontend/src/pages/CardPage.tsx - Fighter directory
frontend/src/pages/FightersPage.tsx - Fighter profile
frontend/src/pages/FighterDetailPage.tsx - API client
frontend/src/api.ts
Prediction API
- FastAPI endpoints
backend/main.py - Elo and EV metrics
backend/elo_engine.py
Ratings data
- DB sessions
backend/database.py - Fight and rating schema
backend/models.py - SQLite database
backend/data/fightev.db - Database configuration
backend/config.py
Data refresh
- Upcoming card data
backend/data/card.json - Card refresh
backend/update_card.py - Fight history scraper
backend/scrape_new_fights.py
Other components
- FightEV user
- The Odds API
- UFC fight data
Connections 21
- FightEV user → Web app routes: browses
- Web app routes → Navigation: renders
frontend/src/App.tsx - Web app routes → Fight card: routes to
frontend/src/App.tsx - Web app routes → Fighter directory: routes to
frontend/src/App.tsx - Web app routes → Fighter profile: routes to
frontend/src/App.tsx - Fight card → API client: requests fights/history
frontend/src/pages/CardPage.tsx - Fighter directory → API client: requests fighters
frontend/src/pages/FightersPage.tsx - Fighter profile → API client: requests profile
frontend/src/pages/FighterDetailPage.tsx - API client → FastAPI endpoints: HTTP requests
frontend/src/api.ts - FastAPI endpoints → Elo and EV metrics: computes card metrics
backend/main.py - FastAPI endpoints → DB sessions: queries via
backend/main.py - DB sessions → Database configuration: uses URL
backend/database.py - DB sessions → SQLite database: connects to
- FastAPI endpoints → Fight and rating schema: queries models
backend/main.py - Fight and rating schema → DB sessions: declares on
backend/models.py - Card refresh → Upcoming card data: writes card
- Card refresh → The Odds API: fetches odds
- Fight history scraper → UFC fight data: collects results
- Fight history scraper → Fight and rating schema: updates history/ratings
backend/scrape_new_fights.py - Fight history scraper → Elo and EV metrics: uses Elo engine
backend/scrape_new_fights.py - Card refresh → Fight and rating schema: uses fight models
backend/update_card.py