# iam-hemanth/cricket-lake-unfiltered architecture

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

- Interactive diagram: https://gitdiagram.com/iam-hemanth/cricket-lake-unfiltered
- Repository: https://github.com/iam-hemanth/cricket-lake-unfiltered

## Overview

Cricket Lake Unfiltered is an ESPNcricinfo match-data extraction, normalization, validation, consolidation, and download product. Its principal workflow fetches and preserves raw match payloads, constructs normalized match JSON, validates and consolidates records, then publishes catalogs and downloadable slices. The graph also includes documented discovery/update and calendar capabilities. Some workflow and download implementation files were not sampled, so those relationships are shown only where the README documents them.

Main entry points: [`src/validator.py`](https://github.com/iam-hemanth/cricket-lake-unfiltered/blob/main/src/validator.py) (Match Validation), [`src/constructor.py`](https://github.com/iam-hemanth/cricket-lake-unfiltered/blob/main/src/constructor.py) (Match Constructor), [`src/commentary.py`](https://github.com/iam-hemanth/cricket-lake-unfiltered/blob/main/src/commentary.py) (Match Fetching), [`scripts/build_lake_catalog.py`](https://github.com/iam-hemanth/cricket-lake-unfiltered/blob/main/scripts/build_lake_catalog.py) (Lake Catalog)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Extraction &amp; Parsing"]
  node_fetch["Match Fetching<br/>[commentary.py]"]
  node_auth["Request Signing<br/>[auth.py]"]
  node_http["HTTP Client<br/>[client.py]"]
  node_discovery["Match Discovery<br/>[discover_delta.py]"]
end

subgraph group_normalize["Match Normalization"]
  node_reparse["Offline Reparse<br/>[reparse.py]"]
  node_constructor["Match Constructor<br/>[constructor.py]"]
  node_classification["Match Classification<br/>[classification.py]"]
  node_participants["Player Mapping<br/>[participants.py]"]
  node_stage["Stage Metadata<br/>[stage.py]"]
  node_sourcefacts["Source Facts<br/>[source_facts.py]"]
  node_hundred["Hundred Rules<br/>[hundred.py]"]
end

subgraph group_lake["Lake &amp; Quality"]
  node_validator["Match Validation<br/>[validator.py]"]
  node_repair["Source-Gap Policy"]
  node_consolidate["Lake Consolidation<br/>[consolidate.py]"]
  node_master[("Master Lake")]
end

subgraph group_delivery["Catalog &amp; Downloads"]
  node_catalog["Lake Catalog"]
  node_shards["Download Slices<br/>[build_shard.py]"]
  node_metadata["Slice Metadata<br/>[metadata.py]"]
  node_calendar["Match Calendar<br/>[calendar.py]"]
end

node_espn(("ESPNcricinfo"))
node_users(("Data Consumers"))

node_espn -->|"provides payloads"| node_fetch
node_fetch -->|"signs requests"| node_auth
node_fetch -->|"sends requests"| node_http
node_espn -.->|"supplies match updates"| node_discovery
node_reparse -->|"constructs matches"| node_constructor
node_reparse -->|"validates matches"| node_validator
node_constructor -->|"classifies matches"| node_classification
node_constructor -->|"maps players"| node_participants
node_constructor -->|"derives stages"| node_stage
node_constructor -->|"uses source facts"| node_sourcefacts
node_constructor -->|"applies rules"| node_hundred
node_validator -->|"checks classification"| node_classification
node_validator -->|"checks source facts"| node_sourcefacts
node_validator -->|"checks Hundred rules"| node_hundred
node_repair -->|"uses validation"| node_validator
node_consolidate -->|"validates inventory"| node_validator
node_consolidate -->|"writes lake archive"| node_master
node_master -.->|"indexes matches"| node_catalog
node_catalog -->|"checks candidates"| node_validator
node_catalog -.->|"feeds slice builds"| node_shards
node_shards -->|"uses slice metadata"| node_metadata
node_shards -->|"publishes zip slices"| node_users
node_calendar -->|"uses stage fields"| node_stage
node_calendar -->|"serves match calendar"| node_users

click node_fetch "https://github.com/iam-hemanth/cricket-lake-unfiltered/blob/main/src/commentary.py"
click node_auth "https://github.com/iam-hemanth/cricket-lake-unfiltered/blob/main/src/auth.py"
click node_http "https://github.com/iam-hemanth/cricket-lake-unfiltered/blob/main/src/client.py"
click node_discovery "https://github.com/iam-hemanth/cricket-lake-unfiltered/blob/main/scripts/discover_delta.py"
click node_reparse "https://github.com/iam-hemanth/cricket-lake-unfiltered/blob/main/reparse.py"
click node_constructor "https://github.com/iam-hemanth/cricket-lake-unfiltered/blob/main/src/constructor.py"
click node_classification "https://github.com/iam-hemanth/cricket-lake-unfiltered/blob/main/src/classification.py"
click node_participants "https://github.com/iam-hemanth/cricket-lake-unfiltered/blob/main/src/participants.py"
click node_stage "https://github.com/iam-hemanth/cricket-lake-unfiltered/blob/main/src/stage.py"
click node_sourcefacts "https://github.com/iam-hemanth/cricket-lake-unfiltered/blob/main/src/source_facts.py"
click node_hundred "https://github.com/iam-hemanth/cricket-lake-unfiltered/blob/main/src/hundred.py"
click node_validator "https://github.com/iam-hemanth/cricket-lake-unfiltered/blob/main/src/validator.py"
click node_repair "https://github.com/iam-hemanth/cricket-lake-unfiltered/blob/main/scripts/apply_source_gap_policy.py"
click node_consolidate "https://github.com/iam-hemanth/cricket-lake-unfiltered/blob/main/consolidate.py"
click node_master "https://github.com/iam-hemanth/cricket-lake-unfiltered/blob/main/data/manifest_unfiltered_delta.json"
click node_catalog "https://github.com/iam-hemanth/cricket-lake-unfiltered/blob/main/scripts/build_lake_catalog.py"
click node_shards "https://github.com/iam-hemanth/cricket-lake-unfiltered/blob/main/scripts/downloads/build_shard.py"
click node_metadata "https://github.com/iam-hemanth/cricket-lake-unfiltered/blob/main/scripts/downloads/metadata.py"
click node_calendar "https://github.com/iam-hemanth/cricket-lake-unfiltered/blob/main/scripts/downloads/calendar.py"

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_fetch,node_auth,node_http,node_discovery toneBlue
class node_reparse,node_constructor,node_classification,node_participants,node_stage,node_sourcefacts,node_hundred toneAmber
class node_validator,node_repair,node_consolidate,node_master toneMint
class node_catalog,node_shards,node_metadata,node_calendar toneRose
class node_espn,node_users toneIndigo
```

## Components

### Extraction & Parsing

- [Match Fetching](https://github.com/iam-hemanth/cricket-lake-unfiltered/blob/main/src/commentary.py): `src/commentary.py`
- [Request Signing](https://github.com/iam-hemanth/cricket-lake-unfiltered/blob/main/src/auth.py): `src/auth.py`
- [HTTP Client](https://github.com/iam-hemanth/cricket-lake-unfiltered/blob/main/src/client.py): `src/client.py`
- [Match Discovery](https://github.com/iam-hemanth/cricket-lake-unfiltered/blob/main/scripts/discover_delta.py): `scripts/discover_delta.py`

### Match Normalization

- [Offline Reparse](https://github.com/iam-hemanth/cricket-lake-unfiltered/blob/main/reparse.py): `reparse.py`
- [Match Constructor](https://github.com/iam-hemanth/cricket-lake-unfiltered/blob/main/src/constructor.py): `src/constructor.py`
- [Match Classification](https://github.com/iam-hemanth/cricket-lake-unfiltered/blob/main/src/classification.py): `src/classification.py`
- [Player Mapping](https://github.com/iam-hemanth/cricket-lake-unfiltered/blob/main/src/participants.py): `src/participants.py`
- [Stage Metadata](https://github.com/iam-hemanth/cricket-lake-unfiltered/blob/main/src/stage.py): `src/stage.py`
- [Source Facts](https://github.com/iam-hemanth/cricket-lake-unfiltered/blob/main/src/source_facts.py): `src/source_facts.py`
- [Hundred Rules](https://github.com/iam-hemanth/cricket-lake-unfiltered/blob/main/src/hundred.py): `src/hundred.py`

### Lake & Quality

- [Match Validation](https://github.com/iam-hemanth/cricket-lake-unfiltered/blob/main/src/validator.py): `src/validator.py`
- [Source-Gap Policy](https://github.com/iam-hemanth/cricket-lake-unfiltered/blob/main/scripts/apply_source_gap_policy.py): `scripts/apply_source_gap_policy.py`
- [Lake Consolidation](https://github.com/iam-hemanth/cricket-lake-unfiltered/blob/main/consolidate.py): `consolidate.py`
- [Master Lake](https://github.com/iam-hemanth/cricket-lake-unfiltered/blob/main/data/manifest_unfiltered_delta.json): `data/manifest_unfiltered_delta.json`

### Catalog & Downloads

- [Lake Catalog](https://github.com/iam-hemanth/cricket-lake-unfiltered/blob/main/scripts/build_lake_catalog.py): `scripts/build_lake_catalog.py`
- [Download Slices](https://github.com/iam-hemanth/cricket-lake-unfiltered/blob/main/scripts/downloads/build_shard.py): `scripts/downloads/build_shard.py`
- [Slice Metadata](https://github.com/iam-hemanth/cricket-lake-unfiltered/blob/main/scripts/downloads/metadata.py): `scripts/downloads/metadata.py`
- [Match Calendar](https://github.com/iam-hemanth/cricket-lake-unfiltered/blob/main/scripts/downloads/calendar.py): `scripts/downloads/calendar.py`

### Other components

- **ESPNcricinfo**
- **Data Consumers**

## Connections

- ESPNcricinfo → Match Fetching: provides payloads (evidence: `README.md`)
- Match Fetching → Request Signing: signs requests (evidence: `src/commentary.py`)
- Match Fetching → HTTP Client: sends requests (evidence: `src/commentary.py`)
- ESPNcricinfo → Match Discovery: supplies match updates
- Offline Reparse → Match Constructor: constructs matches (evidence: `reparse.py`)
- Offline Reparse → Match Validation: validates matches (evidence: `reparse.py`)
- Match Constructor → Match Classification: classifies matches (evidence: `src/constructor.py`)
- Match Constructor → Player Mapping: maps players (evidence: `src/constructor.py`)
- Match Constructor → Stage Metadata: derives stages (evidence: `src/constructor.py`)
- Match Constructor → Source Facts: uses source facts (evidence: `src/constructor.py`)
- Match Constructor → Hundred Rules: applies rules (evidence: `src/constructor.py`)
- Match Validation → Match Classification: checks classification (evidence: `src/validator.py`)
- Match Validation → Source Facts: checks source facts (evidence: `src/validator.py`)
- Match Validation → Hundred Rules: checks Hundred rules (evidence: `src/validator.py`)
- Source-Gap Policy → Match Validation: uses validation (evidence: `scripts/apply_source_gap_policy.py`)
- Lake Consolidation → Match Validation: validates inventory (evidence: `consolidate.py`)
- Lake Consolidation → Master Lake: writes lake archive (evidence: `README.md`)
- Master Lake → Lake Catalog: indexes matches
- Lake Catalog → Match Validation: checks candidates (evidence: `scripts/build_lake_catalog.py`)
- Lake Catalog → Download Slices: feeds slice builds (evidence: `README.md`)
- Download Slices → Slice Metadata: uses slice metadata (evidence: `scripts/downloads/build_shard.py`)
- Download Slices → Data Consumers: publishes zip slices (evidence: `README.md`)
- Match Calendar → Stage Metadata: uses stage fields (evidence: `scripts/downloads/calendar.py`)
- Match Calendar → Data Consumers: serves match calendar (evidence: `README.md`)
