# shaurya01836/ipl-auction architecture

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

- Interactive diagram: https://gitdiagram.com/shaurya01836/ipl-auction
- Repository: https://github.com/shaurya01836/ipl-auction

## Overview

Crick Auction is a multiplayer cricket-auction application. Users enter through the landing page to create or find a room, claim franchises in a lobby, participate in synchronized live bidding and chat, then review completed squads and ratings. AuctionContext is the central coordination layer, with Firebase supporting authentication and live room state and Supabase providing documented directory and long-term storage roles. The README documents several capabilities whose implementation was not sampled; those relationships are shown only where documented, and unsampled details are omitted.

Main entry points: [`src/contexts/AuctionContext.jsx`](https://github.com/shaurya01836/ipl-auction/blob/main/src/contexts/AuctionContext.jsx) (Auction state), [`src/App.jsx`](https://github.com/shaurya01836/ipl-auction/blob/main/src/App.jsx) (App routing), [`src/pages/AuctionRoom.jsx`](https://github.com/shaurya01836/ipl-auction/blob/main/src/pages/AuctionRoom.jsx) (Live auction room), [`src/pages/AuctionSummary.jsx`](https://github.com/shaurya01836/ipl-auction/blob/main/src/pages/AuctionSummary.jsx) (Squad results)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and identity"]
  node_app["App routing<br/>[App.jsx]"]
  node_auth["Authentication<br/>[AuthContext.jsx]"]
end

subgraph group_auction["Auction experience"]
  node_landing["Landing and rooms<br/>[LandingPage.jsx]"]
  node_lobby["Franchise lobby<br/>[Lobby.jsx]"]
  node_live["Live auction room<br/>[AuctionRoom.jsx]"]
  node_chat["Live chat<br/>[TextChat.jsx]"]
  node_summary["Squad results<br/>[AuctionSummary.jsx]"]
  node_ratings["Squad ratings<br/>[SquadRating.jsx]"]
  node_admin["Administration<br/>[AdminPanel.jsx]"]
  node_admin_views["Admin views"]
end

subgraph group_coordination["Auction coordination"]
  node_auction_state["Auction state<br/>[AuctionContext.jsx]"]
  node_bots["Bot bidding<br/>[botEngine.js]"]
  node_catalog["Player and team catalog<br/>[players.js]"]
  node_team_data["Team definitions<br/>[teams.js]"]
end

subgraph group_services["Data and services"]
  node_firebase_client["Firebase client<br/>[firebase.js]"]
  node_firebase_auth(("Firebase Auth"))
  node_rtdb[("Realtime room state")]
  node_supabase_client["Supabase client<br/>[supabase.js]"]
  node_supabase[("Supabase PostgreSQL")]
end

node_visitor(("Visitor / player"))

node_visitor -->|"opens"| node_app
node_app -->|"provides auth"| node_auth
node_app -->|"routes to"| node_landing
node_app -->|"routes to"| node_lobby
node_app -->|"routes to"| node_live
node_app -->|"routes to"| node_summary
node_app -->|"routes to"| node_admin
node_auth -->|"uses"| node_firebase_client
node_auth -->|"authenticates"| node_firebase_auth
node_landing -->|"manages rooms"| node_auction_state
node_lobby -->|"manages room"| node_auction_state
node_live -->|"reads and bids"| node_auction_state
node_live -->|"renders"| node_chat
node_chat -->|"uses auction state"| node_auction_state
node_auction_state -->|"uses"| node_firebase_client
node_firebase_client -->|"connects"| node_rtdb
node_auction_state -->|"syncs live state"| node_rtdb
node_auction_state -->|"uses"| node_supabase_client
node_supabase_client -->|"connects"| node_supabase
node_landing -->|"reads public directory"| node_supabase
node_auction_state -->|"uses bidding strategy"| node_bots
node_bots -->|"scores players"| node_catalog
node_bots -->|"uses team data"| node_team_data
node_live -->|"shows auction players"| node_catalog
node_summary -->|"reads completed auction"| node_auction_state
node_summary -->|"evaluates squads"| node_ratings
node_summary -->|"archives results"| node_supabase
node_admin -->|"renders"| node_admin_views
node_admin -->|"uses"| node_firebase_client
node_admin -->|"uses"| node_supabase_client

click node_app "https://github.com/shaurya01836/ipl-auction/blob/main/src/App.jsx"
click node_auth "https://github.com/shaurya01836/ipl-auction/blob/main/src/contexts/AuthContext.jsx"
click node_landing "https://github.com/shaurya01836/ipl-auction/blob/main/src/pages/LandingPage.jsx"
click node_lobby "https://github.com/shaurya01836/ipl-auction/blob/main/src/pages/Lobby.jsx"
click node_live "https://github.com/shaurya01836/ipl-auction/blob/main/src/pages/AuctionRoom.jsx"
click node_chat "https://github.com/shaurya01836/ipl-auction/blob/main/src/components/TextChat.jsx"
click node_summary "https://github.com/shaurya01836/ipl-auction/blob/main/src/pages/AuctionSummary.jsx"
click node_ratings "https://github.com/shaurya01836/ipl-auction/blob/main/src/components/SquadRating.jsx"
click node_admin "https://github.com/shaurya01836/ipl-auction/blob/main/src/pages/AdminPanel.jsx"
click node_admin_views "https://github.com/shaurya01836/ipl-auction/tree/main/src/components/admin"
click node_auction_state "https://github.com/shaurya01836/ipl-auction/blob/main/src/contexts/AuctionContext.jsx"
click node_bots "https://github.com/shaurya01836/ipl-auction/blob/main/src/lib/botEngine.js"
click node_catalog "https://github.com/shaurya01836/ipl-auction/blob/main/src/data/players.js"
click node_team_data "https://github.com/shaurya01836/ipl-auction/blob/main/src/data/teams.js"
click node_firebase_client "https://github.com/shaurya01836/ipl-auction/blob/main/src/lib/firebase.js"
click node_supabase_client "https://github.com/shaurya01836/ipl-auction/blob/main/src/lib/supabase.js"

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_app,node_auth toneBlue
class node_landing,node_lobby,node_live,node_chat,node_summary,node_ratings,node_admin,node_admin_views toneAmber
class node_auction_state,node_bots,node_catalog,node_team_data toneMint
class node_firebase_client,node_firebase_auth,node_rtdb,node_supabase_client,node_supabase toneRose
class node_visitor toneIndigo
```

## Components

### Entry and identity

- [App routing](https://github.com/shaurya01836/ipl-auction/blob/main/src/App.jsx): `src/App.jsx`
- [Authentication](https://github.com/shaurya01836/ipl-auction/blob/main/src/contexts/AuthContext.jsx): `src/contexts/AuthContext.jsx`

### Auction experience

- [Landing and rooms](https://github.com/shaurya01836/ipl-auction/blob/main/src/pages/LandingPage.jsx): `src/pages/LandingPage.jsx`
- [Franchise lobby](https://github.com/shaurya01836/ipl-auction/blob/main/src/pages/Lobby.jsx): `src/pages/Lobby.jsx`
- [Live auction room](https://github.com/shaurya01836/ipl-auction/blob/main/src/pages/AuctionRoom.jsx): `src/pages/AuctionRoom.jsx`
- [Live chat](https://github.com/shaurya01836/ipl-auction/blob/main/src/components/TextChat.jsx): `src/components/TextChat.jsx`
- [Squad results](https://github.com/shaurya01836/ipl-auction/blob/main/src/pages/AuctionSummary.jsx): `src/pages/AuctionSummary.jsx`
- [Squad ratings](https://github.com/shaurya01836/ipl-auction/blob/main/src/components/SquadRating.jsx): `src/components/SquadRating.jsx`
- [Administration](https://github.com/shaurya01836/ipl-auction/blob/main/src/pages/AdminPanel.jsx): `src/pages/AdminPanel.jsx`
- [Admin views](https://github.com/shaurya01836/ipl-auction/tree/main/src/components/admin): `src/components/admin`

### Auction coordination

- [Auction state](https://github.com/shaurya01836/ipl-auction/blob/main/src/contexts/AuctionContext.jsx): `src/contexts/AuctionContext.jsx`
- [Bot bidding](https://github.com/shaurya01836/ipl-auction/blob/main/src/lib/botEngine.js): `src/lib/botEngine.js`
- [Player and team catalog](https://github.com/shaurya01836/ipl-auction/blob/main/src/data/players.js): `src/data/players.js`
- [Team definitions](https://github.com/shaurya01836/ipl-auction/blob/main/src/data/teams.js): `src/data/teams.js`

### Data and services

- [Firebase client](https://github.com/shaurya01836/ipl-auction/blob/main/src/lib/firebase.js): `src/lib/firebase.js`
- **Firebase Auth**
- **Realtime room state**
- [Supabase client](https://github.com/shaurya01836/ipl-auction/blob/main/src/lib/supabase.js): `src/lib/supabase.js`
- **Supabase PostgreSQL**

### Other components

- **Visitor / player**

## Connections

- Visitor / player → App routing: opens (evidence: `src/App.jsx`)
- App routing → Authentication: provides auth (evidence: `src/App.jsx`)
- App routing → Landing and rooms: routes to (evidence: `src/App.jsx`)
- App routing → Franchise lobby: routes to (evidence: `src/App.jsx`)
- App routing → Live auction room: routes to (evidence: `src/App.jsx`)
- App routing → Squad results: routes to (evidence: `src/App.jsx`)
- App routing → Administration: routes to (evidence: `src/App.jsx`)
- Authentication → Firebase client: uses (evidence: `src/contexts/AuthContext.jsx`)
- Authentication → Firebase Auth: authenticates (evidence: `src/contexts/AuthContext.jsx`)
- Landing and rooms → Auction state: manages rooms (evidence: `src/pages/LandingPage.jsx`)
- Franchise lobby → Auction state: manages room (evidence: `src/pages/Lobby.jsx`)
- Live auction room → Auction state: reads and bids (evidence: `src/pages/AuctionRoom.jsx`)
- Live auction room → Live chat: renders (evidence: `src/pages/AuctionRoom.jsx`)
- Live chat → Auction state: uses auction state (evidence: `src/components/TextChat.jsx`)
- Auction state → Firebase client: uses (evidence: `src/contexts/AuctionContext.jsx`)
- Firebase client → Realtime room state: connects (evidence: `src/lib/firebase.js`)
- Auction state → Realtime room state: syncs live state (evidence: `README.md`)
- Auction state → Supabase client: uses (evidence: `src/contexts/AuctionContext.jsx`)
- Supabase client → Supabase PostgreSQL: connects (evidence: `README.md`)
- Landing and rooms → Supabase PostgreSQL: reads public directory (evidence: `README.md`)
- Auction state → Bot bidding: uses bidding strategy (evidence: `src/contexts/AuctionContext.jsx`)
- Bot bidding → Player and team catalog: scores players (evidence: `src/lib/botEngine.js`)
- Bot bidding → Team definitions: uses team data (evidence: `src/lib/botEngine.js`)
- Live auction room → Player and team catalog: shows auction players (evidence: `src/pages/AuctionRoom.jsx`)
- Squad results → Auction state: reads completed auction (evidence: `src/pages/AuctionSummary.jsx`)
- Squad results → Squad ratings: evaluates squads (evidence: `src/pages/AuctionSummary.jsx`)
- Squad results → Supabase PostgreSQL: archives results (evidence: `README.md`)
- Administration → Admin views: renders (evidence: `src/pages/AdminPanel.jsx`)
- Administration → Firebase client: uses (evidence: `src/pages/AdminPanel.jsx`)
- Administration → Supabase client: uses (evidence: `src/pages/AdminPanel.jsx`)
