# mstrat2/senior_is_tennis_app architecture

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

- Interactive diagram: https://gitdiagram.com/mstrat2/senior_is_tennis_app
- Repository: https://github.com/mstrat2/senior_is_tennis_app

## Overview

This is a React tennis-spectator learning site whose implemented workflow loads the home page, polls for live match data, and displays a scorecard. The polling hook requests the matches endpoint; the serverless handler fetches live data from Live Tennis API. The README describes only a generic React/Vite template, so broader lesson content is not established. About and Watch Live are placeholders; scoring and etiquette links exist, but their destination pages are not implemented in the sampled routes. Supabase is configured but no sampled runtime code uses it.

Main entry points: [`src/App.jsx`](https://github.com/mstrat2/senior_is_tennis_app/blob/main/src/App.jsx) (App Shell and Routes), [`src/pages/Home.jsx`](https://github.com/mstrat2/senior_is_tennis_app/blob/main/src/pages/Home.jsx) (Home Landing Page), [`api/matches.js`](https://github.com/mstrat2/senior_is_tennis_app/blob/main/api/matches.js) (Matches Endpoint), [`src/hooks/useLiveMatch.js`](https://github.com/mstrat2/senior_is_tennis_app/blob/main/src/hooks/useLiveMatch.js) (Live Match Poller)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application UI"]
  node_bootstrap["React Bootstrap<br/>[main.jsx]"]
  node_router["App Shell and Routes<br/>[App.jsx]"]
  node_home["Home Landing Page<br/>[Home.jsx]"]
  node_about["About Placeholder<br/>[About.jsx]"]
end

subgraph group_match["Live Match Display"]
  node_poller["Live Match Poller<br/>[useLiveMatch.js]"]
  node_scorecard["Scorecard<br/>[ScoreCard.jsx]"]
end

subgraph group_data["Live Data"]
  node_endpoint["Matches Endpoint<br/>[matches.js]"]
end

node_visitor(("Spectator"))
node_tennisapi["Live Tennis API"]

node_visitor -.->|"opens site"| node_bootstrap
node_bootstrap -->|"renders"| node_router
node_router -->|"routes to"| node_home
node_router -->|"routes to"| node_about
node_home -->|"reads match state"| node_poller
node_home -->|"renders"| node_scorecard
node_poller -->|"requests"| node_endpoint
node_endpoint -->|"fetches live matches"| node_tennisapi
node_endpoint -->|"returns JSON"| node_poller

click node_bootstrap "https://github.com/mstrat2/senior_is_tennis_app/blob/main/src/main.jsx"
click node_router "https://github.com/mstrat2/senior_is_tennis_app/blob/main/src/App.jsx"
click node_home "https://github.com/mstrat2/senior_is_tennis_app/blob/main/src/pages/Home.jsx"
click node_about "https://github.com/mstrat2/senior_is_tennis_app/blob/main/src/pages/About.jsx"
click node_poller "https://github.com/mstrat2/senior_is_tennis_app/blob/main/src/hooks/useLiveMatch.js"
click node_scorecard "https://github.com/mstrat2/senior_is_tennis_app/blob/main/src/components/ScoreCard.jsx"
click node_endpoint "https://github.com/mstrat2/senior_is_tennis_app/blob/main/api/matches.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_bootstrap,node_router,node_home,node_about toneBlue
class node_poller,node_scorecard toneAmber
class node_endpoint,node_tennisapi toneMint
class node_visitor toneIndigo
```

## Components

### Application UI

- [React Bootstrap](https://github.com/mstrat2/senior_is_tennis_app/blob/main/src/main.jsx): `src/main.jsx`
- [App Shell and Routes](https://github.com/mstrat2/senior_is_tennis_app/blob/main/src/App.jsx): `src/App.jsx`
- [Home Landing Page](https://github.com/mstrat2/senior_is_tennis_app/blob/main/src/pages/Home.jsx): `src/pages/Home.jsx`
- [About Placeholder](https://github.com/mstrat2/senior_is_tennis_app/blob/main/src/pages/About.jsx): `src/pages/About.jsx`

### Live Match Display

- [Live Match Poller](https://github.com/mstrat2/senior_is_tennis_app/blob/main/src/hooks/useLiveMatch.js): `src/hooks/useLiveMatch.js`
- [Scorecard](https://github.com/mstrat2/senior_is_tennis_app/blob/main/src/components/ScoreCard.jsx): `src/components/ScoreCard.jsx`

### Live Data

- [Matches Endpoint](https://github.com/mstrat2/senior_is_tennis_app/blob/main/api/matches.js): `api/matches.js`

### Other components

- **Spectator**
- **Live Tennis API**

## Connections

- Spectator → React Bootstrap: opens site
- React Bootstrap → App Shell and Routes: renders (evidence: `src/main.jsx`)
- App Shell and Routes → Home Landing Page: routes to (evidence: `src/App.jsx`)
- App Shell and Routes → About Placeholder: routes to (evidence: `src/App.jsx`)
- Home Landing Page → Live Match Poller: reads match state (evidence: `src/pages/Home.jsx`)
- Home Landing Page → Scorecard: renders (evidence: `src/pages/Home.jsx`)
- Live Match Poller → Matches Endpoint: requests (evidence: `src/hooks/useLiveMatch.js`)
- Matches Endpoint → Live Tennis API: fetches live matches (evidence: `api/matches.js`)
- Matches Endpoint → Live Match Poller: returns JSON (evidence: `src/hooks/useLiveMatch.js`)
