# vamsinaidu18/cricket-predictor- architecture

> Architecture diagram of the GitHub repository vamsinaidu18/cricket-predictor-, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vamsinaidu18/cricket-predictor-
- Repository: https://github.com/vamsinaidu18/cricket-predictor-

## Overview

This is a Django cricket-prediction web application. Users select two teams and optionally a venue and format; the documented workflow gathers historical data, analyzes performance, predicts win probabilities, and produces an explanation for the dashboard. The README also describes a cricket knowledge-base retrieval branch and optional Granite/Groq integration. The supplied tree contains no application source files, so component paths and most implementation details cannot be verified; relationships shown are documented in the README.

Main entry points: [`db.sqlite3`](https://github.com/vamsinaidu18/cricket-predictor-/blob/main/db.sqlite3) (Match History)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User Experience"]
  node_dashboard["Interactive Dashboard"]
  node_api["REST API"]
end

subgraph group_prediction["Prediction Workflow"]
  node_collection["Data Collection Agent"]
  node_analysis["Performance Analysis"]
  node_predictor["Prediction Agent"]
  node_fallback["Statistical Fallback"]
end

subgraph group_knowledge["Knowledge and Insights"]
  node_insights["Insight Generation"]
  node_retriever["RAG Retriever"]
  node_knowledgebase["Cricket Knowledge Base"]
end

subgraph group_data["Data and Models"]
  node_history[("Match History<br/>[db.sqlite3]")]
  node_model["RandomForest Model"]
end

node_user(("Browser User"))
node_granite["Granite via Groq"]

node_user -->|"selects teams"| node_dashboard
node_dashboard -->|"requests prediction"| node_api
node_api -->|"dispatches request"| node_collection
node_collection -->|"queries history"| node_history
node_collection -->|"passes match data"| node_analysis
node_analysis -->|"provides features"| node_predictor
node_predictor -->|"loads model"| node_model
node_predictor -->|"uses if unavailable"| node_fallback
node_predictor -->|"provides prediction"| node_insights
node_insights -->|"retrieves context"| node_retriever
node_retriever -->|"searches profiles"| node_knowledgebase
node_insights -->|"requests explanation"| node_granite
node_insights -->|"returns explanation"| node_api
node_api -->|"returns prediction"| node_dashboard

click node_history "https://github.com/vamsinaidu18/cricket-predictor-/blob/main/db.sqlite3"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_dashboard,node_api,node_user toneBlue
class node_collection,node_analysis,node_predictor,node_fallback toneAmber
class node_insights,node_retriever,node_knowledgebase toneMint
class node_history,node_model toneRose
class node_granite toneIndigo
```

## Components

### User Experience

- **Interactive Dashboard**
- **REST API**

### Prediction Workflow

- **Data Collection Agent**
- **Performance Analysis**
- **Prediction Agent**
- **Statistical Fallback**

### Knowledge and Insights

- **Insight Generation**
- **RAG Retriever**
- **Cricket Knowledge Base**

### Data and Models

- [Match History](https://github.com/vamsinaidu18/cricket-predictor-/blob/main/db.sqlite3): `db.sqlite3`
- **RandomForest Model**

### Other components

- **Browser User**
- **Granite via Groq**

## Connections

- Browser User → Interactive Dashboard: selects teams (evidence: `README.md`)
- Interactive Dashboard → REST API: requests prediction (evidence: `README.md`)
- REST API → Data Collection Agent: dispatches request (evidence: `README.md`)
- Data Collection Agent → Match History: queries history (evidence: `README.md`)
- Data Collection Agent → Performance Analysis: passes match data (evidence: `README.md`)
- Performance Analysis → Prediction Agent: provides features (evidence: `README.md`)
- Prediction Agent → RandomForest Model: loads model (evidence: `README.md`)
- Prediction Agent → Statistical Fallback: uses if unavailable (evidence: `README.md`)
- Prediction Agent → Insight Generation: provides prediction (evidence: `README.md`)
- Insight Generation → RAG Retriever: retrieves context (evidence: `README.md`)
- RAG Retriever → Cricket Knowledge Base: searches profiles (evidence: `README.md`)
- Insight Generation → Granite via Groq: requests explanation (evidence: `README.md`)
- Insight Generation → REST API: returns explanation (evidence: `README.md`)
- REST API → Interactive Dashboard: returns prediction (evidence: `README.md`)
