How wefanull/nfl-local works
NFL Local downloads nflverse data into DuckDB, then provides statistics through a local Ollama tool-calling chat and a web dashboard with game reports and charts. The optional terminal bet log separately records bets and computes results. The graph follows the documented workflows and sampled imports/calls; the frontend’s individual API requests and some tool internals were not sampled.
Main entry points: chat.py Tool-calling chat · api.py Web API · bets.py Bet tracking · tools.py Read-only analysis tools
Components 11
Data ingestion
- Data builder
fetch_data.py - Stats database
fetch_data.py
Stats and reports
- Read-only analysis tools
tools.py
User interfaces
- Tool-calling chat
chat.py - Web API
api.py - Dashboard and charts
static/index.html
Optional bet log
- Bet tracking
bets.py - Bet database
bets.py
Other components
- nflverse
- User
- Ollama model
Connections 15
- nflverse → Data builder: supplies data
README.md - Data builder → Stats database: builds tables
fetch_data.py - Read-only analysis tools → Stats database: reads statistics
tools.py - User → Tool-calling chat: asks questions
README.md - Tool-calling chat → Ollama model: sends prompts
chat.py - Ollama model → Tool-calling chat: requests tools
chat.py - Tool-calling chat → Read-only analysis tools: dispatches calls
chat.py - Tool-calling chat → Bet tracking: dispatches optional tools
chat.py - User → Dashboard and charts: uses dashboard
README.md - Dashboard and charts → Web API: uses web API
README.md - Web API → Read-only analysis tools: queries reports
api.py - Web API → Tool-calling chat: delegates chat
api.py - Web API → Ollama model: serves model chat
README.md - Bet tracking → Stats database: validates games
bets.py - Bet tracking → Bet database: stores and summarizes
bets.py