How rangasiyaar/cricsynthsite works
CricSynthesis is a cricket analytics and forecasting platform: it ingests match data, builds simulation models, publishes match forecasts and player insights, and exposes those capabilities through a web app, API, and MCP tools. Users explore match centres, projections, fantasy picks, and scenario simulations; developers can also query the API or connect an MCP client. The workspace description establishes the package roles, and sampled code confirms browser-worker and local MCP simulation paths. Many web routes and backend subsystems are unsampled, so their internal links are omitted rather than inferred.
Main entry points: worker.ts Simulation worker · index.ts Remote API worker · bigquery.py BigQuery publishing · main.py Analytics API
Components 34
Web experience
- Web app
app/components/App.tsx - Match centre
app/components/MatchCentre.tsx - Scenario Lab
app/components/ScenarioLab.tsx - Fantasy views
app/app/fantasy/[id]/page.tsx - Simulation worker
app/lib/engine/worker.ts - Browser simulator
app/lib/engine/sim.ts - Match summary
app/lib/engine/full.ts - Lab summary
app/lib/engine/summary.ts - Fantasy picks
app/lib/engine/fantasy.ts - Player ratings
app/lib/ratings.ts
API and MCP
- Analytics API
cricapi/src/cricapi/main.py - Analytics routes
cricapi/src/cricapi/extra.py - Published content
cricapi/src/cricapi/store.py - Local MCP server
cricmcp/src/cricmcp/server.py - MCP simulations
cricmcp/src/cricmcp/sim.py
Cricket modelling
- Fitted model
cricsim/src/cricsim/engine/model.py - Match simulator
cricsim/src/cricsim/engine/simulate.py - Match states
cricsim/src/cricsim/engine/states.py - Match analytics
cricsim/src/cricsim/engine/analytics.py - Model fitting
cricsim/src/cricsim/engine/fit.py - Fantasy modelling
cricsim/src/cricsim/fantasy.py - Player features
cricsim/src/cricsim/direct_features.py
Data pipeline
- Match data ingest
cricdata/src/cricdata/parse.py - Parquet dataset
cricdata/src/cricdata/build.py - BigQuery publishing
cricdata/src/cricdata/bigquery.py
Remote access
- Remote API worker
edge/src/index.ts - API routes
edge/src/api.ts - Remote MCP
edge/src/mcp.ts - OAuth sign-in
edge/src/oauth.ts
Other components
- Cricket fan
- MCP client
- Firebase Auth
- Cloud Storage
- BigQuery
Connections 21
- Cricket fan → Web app: explores
- Scenario Lab → Simulation worker: runs scenarios
- Simulation worker → Browser simulator: simulates
app/lib/engine/worker.ts - Simulation worker → Match summary: summarizes full
app/lib/engine/worker.ts - Simulation worker → Lab summary: summarizes lab
app/lib/engine/worker.ts - Simulation worker → Fantasy picks: selects picks
app/lib/engine/worker.ts - Simulation worker → Player ratings: rates players
app/lib/engine/worker.ts - Analytics API → Analytics routes: registers routes
cricapi/src/cricapi/extra.py - Analytics API → Fitted model: loads model
cricapi/src/cricapi/main.py - Local MCP server → MCP simulations: runs simulations
cricmcp/src/cricmcp/server.py - Local MCP server → Published content: loads match pack
- Match simulator → Fitted model: uses model
cricsim/src/cricsim/engine/simulate.py - Match simulator → Match states: uses states
cricsim/src/cricsim/engine/simulate.py - Parquet dataset → BigQuery publishing: publishes tables
- BigQuery publishing → Cloud Storage: uploads Parquet
cricdata/src/cricdata/bigquery.py - BigQuery publishing → BigQuery: loads tables
cricdata/src/cricdata/bigquery.py - MCP client → Remote API worker: requests tools
- Remote API worker → Remote MCP: dispatches tools
edge/src/index.ts - Remote API worker → API routes: dispatches routes
edge/src/index.ts - Remote API worker → OAuth sign-in: handles tokens
edge/src/index.ts - OAuth sign-in → Firebase Auth: checks identity