# ashutosh-1407/friendly-tennis-tournaments architecture

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

- Interactive diagram: https://gitdiagram.com/ashutosh-1407/friendly-tennis-tournaments
- Repository: https://github.com/ashutosh-1407/friendly-tennis-tournaments

## Overview

Rally is a web app for organizing casual weekly court sessions and competitive tennis tournaments. Players sign in, join sessions or tournaments, follow draws, submit scores, and view tournament points; organizers also manage events and access. The React app is the user-facing entry point, while an Express server handles API operations and SQLite-backed state. The sampled code is partial and the backend is a monolith, so several documented capabilities are represented as server responsibilities without inferred internal call chains.

Main entry points: [`server/index.js`](https://github.com/ashutosh-1407/friendly-tennis-tournaments/blob/main/server/index.js) (Express API), [`src/main.jsx`](https://github.com/ashutosh-1407/friendly-tennis-tournaments/blob/main/src/main.jsx) (Tournament pages), [`db/schema.sql`](https://github.com/ashutosh-1407/friendly-tennis-tournaments/blob/main/db/schema.sql) (Tournament state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web app"]
  node_rally_ui["Rally interface<br/>[main.jsx]"]
  node_organizer_tools["Organizer tools<br/>[main.jsx]"]
end

subgraph group_competition["Tournament play"]
  node_tournament_ui["Tournament pages<br/>[main.jsx]"]
  node_tournament_ops["Tournament management<br/>[index.js]"]
  node_registrations["Player registration<br/>[index.js]"]
  node_draws["Draw generation<br/>[index.js]"]
  node_scores["Scores and advancement<br/>[index.js]"]
  node_leaderboard["Leaderboard points<br/>[index.js]"]
end

subgraph group_sessions["Weekly sessions"]
  node_weekly_ui["Weekly matches<br/>[main.jsx]"]
  node_weekly_api["Session operations<br/>[index.js]"]
end

subgraph group_platform["API and state"]
  node_identity["Accounts and sign-in<br/>[index.js]"]
  node_api["Express API<br/>[index.js]"]
  node_state[("Tournament state<br/>[schema.sql]")]
end

node_players(("Players and organizers"))

node_players -->|"uses"| node_rally_ui
node_rally_ui -->|"signs in"| node_identity
node_rally_ui -->|"opens"| node_weekly_ui
node_weekly_ui -->|"loads sessions"| node_weekly_api
node_weekly_api -.->|"reads and writes"| node_state
node_rally_ui -->|"opens"| node_tournament_ui
node_tournament_ui -.->|"registers players"| node_registrations
node_tournament_ui -.->|"views draws"| node_draws
node_tournament_ui -.->|"submits scores"| node_scores
node_tournament_ui -.->|"views points"| node_leaderboard
node_players -->|"organizes events"| node_organizer_tools
node_organizer_tools -.->|"manages tournaments"| node_tournament_ops
node_api -->|"handles accounts"| node_identity
node_api -.->|"manages events"| node_tournament_ops
node_api -.->|"handles registration"| node_registrations
node_api -->|"generates draws"| node_draws
node_api -.->|"records results"| node_scores
node_api -.->|"serves points"| node_leaderboard
node_api -->|"queries SQLite"| node_state

click node_rally_ui "https://github.com/ashutosh-1407/friendly-tennis-tournaments/blob/main/src/main.jsx"
click node_identity "https://github.com/ashutosh-1407/friendly-tennis-tournaments/blob/main/server/index.js"
click node_weekly_ui "https://github.com/ashutosh-1407/friendly-tennis-tournaments/blob/main/src/main.jsx"
click node_weekly_api "https://github.com/ashutosh-1407/friendly-tennis-tournaments/blob/main/server/index.js"
click node_tournament_ui "https://github.com/ashutosh-1407/friendly-tennis-tournaments/blob/main/src/main.jsx"
click node_tournament_ops "https://github.com/ashutosh-1407/friendly-tennis-tournaments/blob/main/server/index.js"
click node_registrations "https://github.com/ashutosh-1407/friendly-tennis-tournaments/blob/main/server/index.js"
click node_draws "https://github.com/ashutosh-1407/friendly-tennis-tournaments/blob/main/server/index.js"
click node_scores "https://github.com/ashutosh-1407/friendly-tennis-tournaments/blob/main/server/index.js"
click node_leaderboard "https://github.com/ashutosh-1407/friendly-tennis-tournaments/blob/main/server/index.js"
click node_organizer_tools "https://github.com/ashutosh-1407/friendly-tennis-tournaments/blob/main/src/main.jsx"
click node_api "https://github.com/ashutosh-1407/friendly-tennis-tournaments/blob/main/server/index.js"
click node_state "https://github.com/ashutosh-1407/friendly-tennis-tournaments/blob/main/db/schema.sql"

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_rally_ui,node_organizer_tools toneBlue
class node_tournament_ui,node_tournament_ops,node_registrations,node_draws,node_scores,node_leaderboard toneAmber
class node_weekly_ui,node_weekly_api toneMint
class node_identity,node_api,node_state toneRose
class node_players toneIndigo
```

## Components

### Web app

- [Rally interface](https://github.com/ashutosh-1407/friendly-tennis-tournaments/blob/main/src/main.jsx): `src/main.jsx`
- [Organizer tools](https://github.com/ashutosh-1407/friendly-tennis-tournaments/blob/main/src/main.jsx): `src/main.jsx`

### Tournament play

- [Tournament pages](https://github.com/ashutosh-1407/friendly-tennis-tournaments/blob/main/src/main.jsx): `src/main.jsx`
- [Tournament management](https://github.com/ashutosh-1407/friendly-tennis-tournaments/blob/main/server/index.js): `server/index.js`
- [Player registration](https://github.com/ashutosh-1407/friendly-tennis-tournaments/blob/main/server/index.js): `server/index.js`
- [Draw generation](https://github.com/ashutosh-1407/friendly-tennis-tournaments/blob/main/server/index.js): `server/index.js`
- [Scores and advancement](https://github.com/ashutosh-1407/friendly-tennis-tournaments/blob/main/server/index.js): `server/index.js`
- [Leaderboard points](https://github.com/ashutosh-1407/friendly-tennis-tournaments/blob/main/server/index.js): `server/index.js`

### Weekly sessions

- [Weekly matches](https://github.com/ashutosh-1407/friendly-tennis-tournaments/blob/main/src/main.jsx): `src/main.jsx`
- [Session operations](https://github.com/ashutosh-1407/friendly-tennis-tournaments/blob/main/server/index.js): `server/index.js`

### API and state

- [Accounts and sign-in](https://github.com/ashutosh-1407/friendly-tennis-tournaments/blob/main/server/index.js): `server/index.js`
- [Express API](https://github.com/ashutosh-1407/friendly-tennis-tournaments/blob/main/server/index.js): `server/index.js`
- [Tournament state](https://github.com/ashutosh-1407/friendly-tennis-tournaments/blob/main/db/schema.sql): `db/schema.sql`

### Other components

- **Players and organizers**

## Connections

- Players and organizers → Rally interface: uses (evidence: `README.md`)
- Rally interface → Accounts and sign-in: signs in (evidence: `README.md`)
- Rally interface → Weekly matches: opens (evidence: `README.md`)
- Weekly matches → Session operations: loads sessions (evidence: `src/main.jsx`)
- Session operations → Tournament state: reads and writes
- Rally interface → Tournament pages: opens (evidence: `README.md`)
- Tournament pages → Player registration: registers players
- Tournament pages → Draw generation: views draws
- Tournament pages → Scores and advancement: submits scores
- Tournament pages → Leaderboard points: views points
- Players and organizers → Organizer tools: organizes events (evidence: `README.md`)
- Organizer tools → Tournament management: manages tournaments
- Express API → Accounts and sign-in: handles accounts (evidence: `server/index.js`)
- Express API → Tournament management: manages events (evidence: `server/index.js`)
- Express API → Player registration: handles registration (evidence: `server/index.js`)
- Express API → Draw generation: generates draws (evidence: `server/index.js`)
- Express API → Scores and advancement: records results (evidence: `server/index.js`)
- Express API → Leaderboard points: serves points (evidence: `server/index.js`)
- Express API → Tournament state: queries SQLite (evidence: `server/index.js`)
