How dhruvasai/edge---evidence-driven-game-engine works
EDGE is a cricket intelligence platform that turns ball-by-ball and player data into analytics, recommendations, and dashboards. Its main user workflow is to explore the dashboard or submit a match situation, which is served by API routes that query cricket data and return statistics or advice. The repository also documents an ingestion and processing path for enriching its data. The tree contains parallel layered and root-level copies; this map uses the sampled root-level serving modules and documented capabilities. Unsampled route internals are represented at subsystem level.
Main entry points: api Feature API routes · recommend/route.ts Match recommendations · xi-recommendations/route.ts Playing XI advice · cricapi_ingest.py Live data ingestion
Components 20
User experience
- Dashboard
src/app/page.tsx - Player form view
src/components/dashboard/PlayerFormDashboard/index.tsx
API and advice
- Feature API routes
src/app/api - Match recommendations
src/app/api/recommend/route.ts - Playing XI advice
src/app/api/xi-recommendations/route.ts - AI engine
src/ai/ai_engine.py - AI provider
src/lib/aiProvider.ts
Analytics
- Analytics engine
src/processing/analytics_engine.py - Form features
edge_pipeline/features/compute_form_features.py - Form scoring
edge_pipeline/scoring/compute_form_score.py - Match aggregates
edge_pipeline/transform/build_match_aggregates.py
Data foundation
- Cricsheet ingestion
edge_pipeline/ingest/parse_cricsheet.py - Dataset ingestion
tools/etl/ingest_jsons.py - PostgreSQL
- Prisma client
src/lib/prisma.ts - BigQuery client
src/lib/bigquery.ts
Live cricket
- CricAPI
- Live data ingestion
src/ingestion/cricapi_ingest.py - Response cache
src/ingestion/cache.py
Other components
- Cricket user
Connections 21
- Cricket user → Dashboard: opens
README.md - Dashboard → Feature API routes: requests data
README.md - Player form view → Feature API routes: requests insights
- Feature API routes → Prisma client: queries
README.md - Prisma client → PostgreSQL: reads data
README.md - Feature API routes → Live data ingestion: fetches live scores
README.md - Live data ingestion → CricAPI: fetches
src/ingestion/cricapi_ingest.py - Live data ingestion → Response cache: reads and writes
src/ingestion/cricapi_ingest.py - Feature API routes → Match recommendations: routes advice
- Match recommendations → AI provider: calls
src/app/api/recommend/route.ts - Match recommendations → PostgreSQL: queries match data
src/app/api/recommend/route.ts - Feature API routes → Playing XI advice: routes XI requests
- Playing XI advice → BigQuery client: queries scores
src/app/api/xi-recommendations/route.ts - Playing XI advice → Prisma client: loads fallback
src/app/api/xi-recommendations/route.ts - Cricsheet ingestion → Match aggregates: transforms matches
- Match aggregates → Form features: supports feature building
- Form features → Form scoring: supports scoring
- Form scoring → BigQuery client: loads analytics
README.md - Dataset ingestion → PostgreSQL: loads datasets
README.md - AI engine → CricAPI: uses AI service
- Feature API routes → Analytics engine: serves analytics