# kylie122/react architecture

> Architecture diagram of the GitHub repository kylie122/react, 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/kylie122/react
- Repository: https://github.com/kylie122/react

## Overview

Dog Casino is a client-side Expo app for playing three betting games and reviewing performance. Players start at the home screen, choose a game, place bets, and see the result; game screens update shared balance and statistics state, which the statistics screen reads. The README documents only the Expo starter and file-based routing, so game capabilities come from the sampled screens. All edges below are supported by excerpts; state is in-memory, with no persistence or external casino service shown.

Main entry points: [`app/_layout.tsx`](https://github.com/kylie122/react/blob/main/app/_layout.tsx) (Balance and records), [`app/index.tsx`](https://github.com/kylie122/react/blob/main/app/index.tsx) (Game selection), [`app/dogfight.tsx`](https://github.com/kylie122/react/blob/main/app/dogfight.tsx) (Dog Fight betting), [`app/dice.tsx`](https://github.com/kylie122/react/blob/main/app/dice.tsx) (Dice betting)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["App navigation"]
  node_home["Game selection<br/>[index.tsx]"]
  node_router["Route stack<br/>[_layout.tsx]"]
end

subgraph group_games["Casino games"]
  node_dogfight["Dog Fight betting<br/>[dogfight.tsx]"]
  node_dice["Dice betting<br/>[dice.tsx]"]
  node_slots["Slots betting<br/>[slots.tsx]"]
  node_stats["Performance stats<br/>[stats.tsx]"]
end

subgraph group_state["Session state and stats"]
  node_money["Balance and records<br/>[_layout.tsx]"]
end

node_player(("Player"))

node_player -->|"opens app"| node_home
node_home -->|"navigates routes"| node_router
node_router -->|"renders route"| node_home
node_router -->|"renders route"| node_dogfight
node_router -->|"renders route"| node_dice
node_router -->|"renders route"| node_slots
node_router -->|"renders route"| node_stats
node_dogfight -->|"updates balance and record"| node_money
node_dice -->|"updates balance and record"| node_money
node_slots -->|"updates balance and record"| node_money
node_home -->|"reads balance"| node_money
node_dogfight -->|"reads balance"| node_money
node_dice -->|"reads balance"| node_money
node_slots -->|"reads balance"| node_money
node_stats -->|"reads records"| node_money
node_player -->|"places bet"| node_dogfight
node_player -->|"places bet"| node_dice
node_player -->|"places bet"| node_slots

click node_home "https://github.com/kylie122/react/blob/main/app/index.tsx"
click node_router "https://github.com/kylie122/react/blob/main/app/_layout.tsx"
click node_dogfight "https://github.com/kylie122/react/blob/main/app/dogfight.tsx"
click node_dice "https://github.com/kylie122/react/blob/main/app/dice.tsx"
click node_slots "https://github.com/kylie122/react/blob/main/app/slots.tsx"
click node_stats "https://github.com/kylie122/react/blob/main/app/stats.tsx"
click node_money "https://github.com/kylie122/react/blob/main/app/_layout.tsx"

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_home,node_router toneBlue
class node_dogfight,node_dice,node_slots,node_stats toneAmber
class node_money toneMint
class node_player toneIndigo
```

## Components

### App navigation

- [Game selection](https://github.com/kylie122/react/blob/main/app/index.tsx): `app/index.tsx`
- [Route stack](https://github.com/kylie122/react/blob/main/app/_layout.tsx): `app/_layout.tsx`

### Casino games

- [Dog Fight betting](https://github.com/kylie122/react/blob/main/app/dogfight.tsx): `app/dogfight.tsx`
- [Dice betting](https://github.com/kylie122/react/blob/main/app/dice.tsx): `app/dice.tsx`
- [Slots betting](https://github.com/kylie122/react/blob/main/app/slots.tsx): `app/slots.tsx`
- [Performance stats](https://github.com/kylie122/react/blob/main/app/stats.tsx): `app/stats.tsx`

### Session state and stats

- [Balance and records](https://github.com/kylie122/react/blob/main/app/_layout.tsx): `app/_layout.tsx`

### Other components

- **Player**

## Connections

- Player → Game selection: opens app (evidence: `app/index.tsx`)
- Game selection → Route stack: navigates routes (evidence: `app/index.tsx`)
- Route stack → Game selection: renders route (evidence: `app/_layout.tsx`)
- Route stack → Dog Fight betting: renders route (evidence: `app/_layout.tsx`)
- Route stack → Dice betting: renders route (evidence: `app/_layout.tsx`)
- Route stack → Slots betting: renders route (evidence: `app/_layout.tsx`)
- Route stack → Performance stats: renders route (evidence: `app/_layout.tsx`)
- Dog Fight betting → Balance and records: updates balance and record (evidence: `app/dogfight.tsx`)
- Dice betting → Balance and records: updates balance and record (evidence: `app/dice.tsx`)
- Slots betting → Balance and records: updates balance and record (evidence: `app/slots.tsx`)
- Game selection → Balance and records: reads balance (evidence: `app/index.tsx`)
- Dog Fight betting → Balance and records: reads balance (evidence: `app/dogfight.tsx`)
- Dice betting → Balance and records: reads balance (evidence: `app/dice.tsx`)
- Slots betting → Balance and records: reads balance (evidence: `app/slots.tsx`)
- Performance stats → Balance and records: reads records (evidence: `app/stats.tsx`)
- Player → Dog Fight betting: places bet (evidence: `app/dogfight.tsx`)
- Player → Dice betting: places bet (evidence: `app/dice.tsx`)
- Player → Slots betting: places bet (evidence: `app/slots.tsx`)
