# kijimoshi/padellic architecture

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

- Interactive diagram: https://gitdiagram.com/kijimoshi/padellic
- Repository: https://github.com/kijimoshi/padellic

## Overview

Padellic is a web app for creating and running Americano and Mexicano padel tournaments, with Swiss described as forthcoming. Organizers sign in, create tournaments, manage players and settings, generate rounds, record scores, and view standings; spectators can follow standings through a shared public link without an account. Tournament data and authentication use Supabase. The repository also exposes an MCP integration. Some routes and integrations were not excerpted, so their internal call paths are not inferred here.

Main entry points: [`src/integrations/supabase/client.ts`](https://github.com/kijimoshi/padellic/blob/main/src/integrations/supabase/client.ts) (Supabase client), [`src/routes/_authenticated/tournament.$id.tsx`](https://github.com/kijimoshi/padellic/blob/main/src/routes/_authenticated/tournament.%24id.tsx) (Tournament management), [`src/routes/t.$code.tsx`](https://github.com/kijimoshi/padellic/blob/main/src/routes/t.%24code.tsx) (Public tournament page), [`src/routes/auth.tsx`](https://github.com/kijimoshi/padellic/blob/main/src/routes/auth.tsx) (Sign-in and signup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Web experience"]
  node_landing["Landing page<br/>[index.tsx]"]
  node_auth["Sign-in and signup<br/>[auth.tsx]"]
  node_auth_guard["Auth guard<br/>[route.tsx]"]
  node_public_page["Public tournament page<br/>[t.$code.tsx]"]
  node_header["Site header<br/>[site-header.tsx]"]
end

subgraph group_tournament["Tournament operations"]
  node_dashboard["Tournament dashboard<br/>[dashboard.tsx]"]
  node_tournament_detail["Tournament management<br/>[tournament.$id.tsx]"]
  node_schedule["Pairing algorithms<br/>[padel.ts]"]
  node_tournament_data["Tournament data access<br/>[tournament-data.ts]"]
  node_standings["Standings table"]
  node_public_data["Public tournament functions"]
end

subgraph group_services["Identity and data"]
  node_supabase_client["Supabase client<br/>[client.ts]"]
  node_supabase[("Supabase backend")]
  node_preview_storage["Preview auth storage"]
end

subgraph group_automation["MCP access"]
  node_mcp_endpoint["MCP route<br/>[mcp.ts]"]
  node_mcp_tools["Tournament MCP tools"]
  node_mcp_backend["MCP Supabase access<br/>[supabase.ts]"]
  node_mcp_metadata["Protected-resource metadata"]
  node_mcp_registry["MCP registry<br/>[index.ts]"]
end

node_visitor(("Visitor / organizer"))
node_spectator(("Spectator"))

node_visitor -->|"opens"| node_landing
node_landing -->|"starts tournament"| node_auth
node_visitor -->|"signs in"| node_auth
node_auth -->|"authenticates with"| node_supabase_client
node_auth_guard -->|"checks user"| node_supabase_client
node_dashboard -->|"loads and saves"| node_tournament_data
node_dashboard -->|"queries"| node_supabase_client
node_tournament_detail -->|"loads data"| node_tournament_data
node_tournament_detail -->|"updates tournament"| node_supabase_client
node_tournament_detail -->|"generates rounds and standings"| node_schedule
node_tournament_detail -->|"renders standings"| node_standings
node_public_page -->|"loads public data"| node_public_data
node_public_page -->|"renders standings"| node_standings
node_spectator -->|"follows link"| node_public_page
node_header -->|"reads auth and signs out"| node_supabase_client
node_supabase_client -->|"configures auth storage"| node_preview_storage
node_supabase_client -->|"connects"| node_supabase
node_mcp_endpoint -.->|"dispatches tools"| node_mcp_tools
node_mcp_tools -->|"uses data access"| node_mcp_backend
node_mcp_backend -.->|"accesses data"| node_supabase
node_mcp_metadata -->|"reads metadata"| node_mcp_registry

click node_landing "https://github.com/kijimoshi/padellic/blob/main/src/routes/index.tsx"
click node_auth "https://github.com/kijimoshi/padellic/blob/main/src/routes/auth.tsx"
click node_auth_guard "https://github.com/kijimoshi/padellic/blob/main/src/routes/_authenticated/route.tsx"
click node_dashboard "https://github.com/kijimoshi/padellic/blob/main/src/routes/_authenticated/dashboard.tsx"
click node_tournament_detail "https://github.com/kijimoshi/padellic/blob/main/src/routes/_authenticated/tournament.%24id.tsx"
click node_schedule "https://github.com/kijimoshi/padellic/blob/main/src/lib/padel.ts"
click node_tournament_data "https://github.com/kijimoshi/padellic/blob/main/src/lib/tournament-data.ts"
click node_standings "https://github.com/kijimoshi/padellic/blob/main/src/components/standings-table.tsx"
click node_public_page "https://github.com/kijimoshi/padellic/blob/main/src/routes/t.%24code.tsx"
click node_public_data "https://github.com/kijimoshi/padellic/blob/main/src/lib/public-tournament.functions.ts"
click node_header "https://github.com/kijimoshi/padellic/blob/main/src/components/site-header.tsx"
click node_supabase_client "https://github.com/kijimoshi/padellic/blob/main/src/integrations/supabase/client.ts"
click node_preview_storage "https://github.com/kijimoshi/padellic/blob/main/src/integrations/supabase/previewAuthStorage.ts"
click node_mcp_endpoint "https://github.com/kijimoshi/padellic/blob/main/src/routes/mcp.ts"
click node_mcp_tools "https://github.com/kijimoshi/padellic/tree/main/src/lib/mcp/tools"
click node_mcp_backend "https://github.com/kijimoshi/padellic/blob/main/src/lib/mcp/supabase.ts"
click node_mcp_metadata "https://github.com/kijimoshi/padellic/blob/main/src/routes/%5B.well-known%5D/oauth-protected-resource.ts"
click node_mcp_registry "https://github.com/kijimoshi/padellic/blob/main/src/lib/mcp/index.ts"

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_landing,node_auth,node_auth_guard,node_public_page,node_header toneBlue
class node_dashboard,node_tournament_detail,node_schedule,node_tournament_data,node_standings,node_public_data toneAmber
class node_supabase_client,node_supabase,node_preview_storage toneMint
class node_mcp_endpoint,node_mcp_tools,node_mcp_backend,node_mcp_metadata,node_mcp_registry toneRose
class node_visitor,node_spectator toneIndigo
```

## Components

### Web experience

- [Landing page](https://github.com/kijimoshi/padellic/blob/main/src/routes/index.tsx): `src/routes/index.tsx`
- [Sign-in and signup](https://github.com/kijimoshi/padellic/blob/main/src/routes/auth.tsx): `src/routes/auth.tsx`
- [Auth guard](https://github.com/kijimoshi/padellic/blob/main/src/routes/_authenticated/route.tsx): `src/routes/_authenticated/route.tsx`
- [Public tournament page](https://github.com/kijimoshi/padellic/blob/main/src/routes/t.%24code.tsx): `src/routes/t.$code.tsx`
- [Site header](https://github.com/kijimoshi/padellic/blob/main/src/components/site-header.tsx): `src/components/site-header.tsx`

### Tournament operations

- [Tournament dashboard](https://github.com/kijimoshi/padellic/blob/main/src/routes/_authenticated/dashboard.tsx): `src/routes/_authenticated/dashboard.tsx`
- [Tournament management](https://github.com/kijimoshi/padellic/blob/main/src/routes/_authenticated/tournament.%24id.tsx): `src/routes/_authenticated/tournament.$id.tsx`
- [Pairing algorithms](https://github.com/kijimoshi/padellic/blob/main/src/lib/padel.ts): `src/lib/padel.ts`
- [Tournament data access](https://github.com/kijimoshi/padellic/blob/main/src/lib/tournament-data.ts): `src/lib/tournament-data.ts`
- [Standings table](https://github.com/kijimoshi/padellic/blob/main/src/components/standings-table.tsx): `src/components/standings-table.tsx`
- [Public tournament functions](https://github.com/kijimoshi/padellic/blob/main/src/lib/public-tournament.functions.ts): `src/lib/public-tournament.functions.ts`

### Identity and data

- [Supabase client](https://github.com/kijimoshi/padellic/blob/main/src/integrations/supabase/client.ts): `src/integrations/supabase/client.ts`
- **Supabase backend**
- [Preview auth storage](https://github.com/kijimoshi/padellic/blob/main/src/integrations/supabase/previewAuthStorage.ts): `src/integrations/supabase/previewAuthStorage.ts`

### MCP access

- [MCP route](https://github.com/kijimoshi/padellic/blob/main/src/routes/mcp.ts): `src/routes/mcp.ts`
- [Tournament MCP tools](https://github.com/kijimoshi/padellic/tree/main/src/lib/mcp/tools): `src/lib/mcp/tools`
- [MCP Supabase access](https://github.com/kijimoshi/padellic/blob/main/src/lib/mcp/supabase.ts): `src/lib/mcp/supabase.ts`
- [Protected-resource metadata](https://github.com/kijimoshi/padellic/blob/main/src/routes/%5B.well-known%5D/oauth-protected-resource.ts): `src/routes/[.well-known]/oauth-protected-resource.ts`
- [MCP registry](https://github.com/kijimoshi/padellic/blob/main/src/lib/mcp/index.ts): `src/lib/mcp/index.ts`

### Other components

- **Visitor / organizer**
- **Spectator**

## Connections

- Visitor / organizer → Landing page: opens (evidence: `src/routes/index.tsx`)
- Landing page → Sign-in and signup: starts tournament (evidence: `src/routes/index.tsx`)
- Visitor / organizer → Sign-in and signup: signs in (evidence: `src/routes/auth.tsx`)
- Sign-in and signup → Supabase client: authenticates with (evidence: `src/routes/auth.tsx`)
- Auth guard → Supabase client: checks user (evidence: `src/routes/_authenticated/route.tsx`)
- Tournament dashboard → Tournament data access: loads and saves (evidence: `src/routes/_authenticated/dashboard.tsx`)
- Tournament dashboard → Supabase client: queries (evidence: `src/routes/_authenticated/dashboard.tsx`)
- Tournament management → Tournament data access: loads data (evidence: `src/routes/_authenticated/tournament.$id.tsx`)
- Tournament management → Supabase client: updates tournament (evidence: `src/routes/_authenticated/tournament.$id.tsx`)
- Tournament management → Pairing algorithms: generates rounds and standings (evidence: `src/routes/_authenticated/tournament.$id.tsx`)
- Tournament management → Standings table: renders standings (evidence: `src/routes/_authenticated/tournament.$id.tsx`)
- Public tournament page → Public tournament functions: loads public data (evidence: `src/routes/t.$code.tsx`)
- Public tournament page → Standings table: renders standings (evidence: `src/routes/t.$code.tsx`)
- Spectator → Public tournament page: follows link (evidence: `README.md`)
- Site header → Supabase client: reads auth and signs out (evidence: `src/components/site-header.tsx`)
- Supabase client → Preview auth storage: configures auth storage (evidence: `src/integrations/supabase/client.ts`)
- Supabase client → Supabase backend: connects (evidence: `src/integrations/supabase/client.ts`)
- MCP route → Tournament MCP tools: dispatches tools
- Tournament MCP tools → MCP Supabase access: uses data access (evidence: `src/lib/mcp/tools/get-tournament.ts`)
- MCP Supabase access → Supabase backend: accesses data
- Protected-resource metadata → MCP registry: reads metadata (evidence: `src/routes/[.well-known]/oauth-protected-resource.ts`)
