# naitik2004/showup.v2 architecture

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

- Interactive diagram: https://gitdiagram.com/naitik2004/showup.v2
- Repository: https://github.com/naitik2004/showup.v2

## Overview

ShowUp is a pickup-sports coordination app. Players discover nearby games, host or join within capacity, coordinate in member-only chat, then complete matches and rate participants. The map/browse, match lifecycle, and ratings form the main workflow; social connections, partner discovery, clubs, moderation, account security, and notifications are substantial supporting capabilities. The README documents these relationships; sampled source excerpts are partial, so unsampled internal call paths are not inferred.

Main entry points: [`apps/web/app/matches/[id]/page.tsx`](https://github.com/naitik2004/showup.v2/blob/main/apps/web/app/matches/%5Bid%5D/page.tsx) (Match workspace), [`apps/api/src/index.ts`](https://github.com/naitik2004/showup.v2/blob/main/apps/api/src/index.ts) (API server), [`apps/web/app/browse/page.tsx`](https://github.com/naitik2004/showup.v2/blob/main/apps/web/app/browse/page.tsx) (Map and browse), [`apps/api/src/prisma.ts`](https://github.com/naitik2004/showup.v2/blob/main/apps/api/src/prisma.ts) (PostgreSQL)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Game discovery"]
  node_web_discovery["Map and browse<br/>[page.tsx]"]
  node_discovery_api["Match discovery<br/>[matches.ts]"]
end

subgraph group_play["Match coordination"]
  node_hosting["Host match<br/>[page.tsx]"]
  node_match_api["Match management<br/>[matches.ts]"]
  node_membership["Join and approvals<br/>[membership.ts]"]
  node_match_detail["Match workspace<br/>[page.tsx]"]
  node_chat["Realtime match chat<br/>[chat.ts]"]
  node_realtime["Socket.IO<br/>[realtime.ts]"]
  node_lifecycle["Match lifecycle<br/>[lifecycle.ts]"]
  node_ratings["Ratings and reputation<br/>[ratings.ts]"]
end

subgraph group_community["Player community"]
  node_friends["Friends and invites<br/>[friends.ts]"]
  node_clubs["Clubs and fixtures<br/>[clubs.ts]"]
  node_partners["Partner discovery<br/>[partners.ts]"]
  node_partner_ui["Partner experience<br/>[page.tsx]"]
end

subgraph group_platform["Accounts and operations"]
  node_auth["Authentication<br/>[auth.ts]"]
  node_google_auth["Google sign-in<br/>[googleAuth.ts]"]
  node_notifications["Notifications"]
  node_moderation["Moderation and appeals<br/>[admin.ts]"]
  node_operations["Service operations<br/>[operations.ts]"]
  node_database[("PostgreSQL<br/>[prisma.ts]")]
  node_api_server["API server<br/>[index.ts]"]
end

node_player(("Player"))

node_player -->|"finds games"| node_web_discovery
node_web_discovery -->|"requests matches"| node_discovery_api
node_player -->|"hosts game"| node_hosting
node_hosting -->|"creates match"| node_match_api
node_web_discovery -->|"opens match"| node_match_detail
node_match_detail -->|"requests to join"| node_membership
node_membership -->|"reserves capacity"| node_database
node_match_detail -->|"uses member chat"| node_chat
node_chat -->|"communicates live"| node_realtime
node_match_detail -->|"starts or finishes"| node_lifecycle
node_match_detail -->|"rates participants"| node_ratings
node_ratings -->|"stores ratings"| node_database
node_player -->|"connects and invites"| node_friends
node_player -->|"discovers partners"| node_partner_ui
node_partner_ui -->|"requests discovery"| node_partners
node_player -->|"uses clubs"| node_clubs
node_player -->|"signs in"| node_auth
node_player -->|"signs in with Google"| node_google_auth
node_api_server -->|"uses Prisma"| node_database
node_api_server -->|"starts worker"| node_notifications
node_api_server -->|"mounts routes"| node_auth
node_api_server -->|"mounts routes"| node_google_auth
node_player -->|"reports issues"| node_moderation
node_player -->|"owner monitors"| node_operations

click node_web_discovery "https://github.com/naitik2004/showup.v2/blob/main/apps/web/app/browse/page.tsx"
click node_discovery_api "https://github.com/naitik2004/showup.v2/blob/main/apps/api/src/routes/matches.ts"
click node_hosting "https://github.com/naitik2004/showup.v2/blob/main/apps/web/app/new/page.tsx"
click node_match_api "https://github.com/naitik2004/showup.v2/blob/main/apps/api/src/routes/matches.ts"
click node_membership "https://github.com/naitik2004/showup.v2/blob/main/apps/api/src/routes/membership.ts"
click node_match_detail "https://github.com/naitik2004/showup.v2/blob/main/apps/web/app/matches/%5Bid%5D/page.tsx"
click node_chat "https://github.com/naitik2004/showup.v2/blob/main/apps/api/src/routes/chat.ts"
click node_realtime "https://github.com/naitik2004/showup.v2/blob/main/apps/api/src/realtime.ts"
click node_lifecycle "https://github.com/naitik2004/showup.v2/blob/main/apps/api/src/lib/lifecycle.ts"
click node_ratings "https://github.com/naitik2004/showup.v2/blob/main/apps/api/src/routes/ratings.ts"
click node_friends "https://github.com/naitik2004/showup.v2/blob/main/apps/api/src/routes/friends.ts"
click node_clubs "https://github.com/naitik2004/showup.v2/blob/main/apps/api/src/routes/clubs.ts"
click node_partners "https://github.com/naitik2004/showup.v2/blob/main/apps/api/src/routes/partners.ts"
click node_partner_ui "https://github.com/naitik2004/showup.v2/blob/main/apps/web/app/partners/page.tsx"
click node_auth "https://github.com/naitik2004/showup.v2/blob/main/apps/api/src/routes/auth.ts"
click node_google_auth "https://github.com/naitik2004/showup.v2/blob/main/apps/api/src/routes/googleAuth.ts"
click node_notifications "https://github.com/naitik2004/showup.v2/blob/main/apps/api/src/lib/notificationWorker.ts"
click node_moderation "https://github.com/naitik2004/showup.v2/blob/main/apps/api/src/routes/admin.ts"
click node_operations "https://github.com/naitik2004/showup.v2/blob/main/apps/api/src/lib/operations.ts"
click node_database "https://github.com/naitik2004/showup.v2/blob/main/apps/api/src/prisma.ts"
click node_api_server "https://github.com/naitik2004/showup.v2/blob/main/apps/api/src/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_web_discovery,node_discovery_api toneBlue
class node_hosting,node_match_api,node_membership,node_match_detail,node_chat,node_realtime,node_lifecycle,node_ratings toneAmber
class node_friends,node_clubs,node_partners,node_partner_ui toneMint
class node_auth,node_google_auth,node_notifications,node_moderation,node_operations,node_database,node_api_server toneRose
class node_player toneIndigo
```

## Components

### Game discovery

- [Map and browse](https://github.com/naitik2004/showup.v2/blob/main/apps/web/app/browse/page.tsx): `apps/web/app/browse/page.tsx`
- [Match discovery](https://github.com/naitik2004/showup.v2/blob/main/apps/api/src/routes/matches.ts): `apps/api/src/routes/matches.ts`

### Match coordination

- [Host match](https://github.com/naitik2004/showup.v2/blob/main/apps/web/app/new/page.tsx): `apps/web/app/new/page.tsx`
- [Match management](https://github.com/naitik2004/showup.v2/blob/main/apps/api/src/routes/matches.ts): `apps/api/src/routes/matches.ts`
- [Join and approvals](https://github.com/naitik2004/showup.v2/blob/main/apps/api/src/routes/membership.ts): `apps/api/src/routes/membership.ts`
- [Match workspace](https://github.com/naitik2004/showup.v2/blob/main/apps/web/app/matches/%5Bid%5D/page.tsx): `apps/web/app/matches/[id]/page.tsx`
- [Realtime match chat](https://github.com/naitik2004/showup.v2/blob/main/apps/api/src/routes/chat.ts): `apps/api/src/routes/chat.ts`
- [Socket.IO](https://github.com/naitik2004/showup.v2/blob/main/apps/api/src/realtime.ts): `apps/api/src/realtime.ts`
- [Match lifecycle](https://github.com/naitik2004/showup.v2/blob/main/apps/api/src/lib/lifecycle.ts): `apps/api/src/lib/lifecycle.ts`
- [Ratings and reputation](https://github.com/naitik2004/showup.v2/blob/main/apps/api/src/routes/ratings.ts): `apps/api/src/routes/ratings.ts`

### Player community

- [Friends and invites](https://github.com/naitik2004/showup.v2/blob/main/apps/api/src/routes/friends.ts): `apps/api/src/routes/friends.ts`
- [Clubs and fixtures](https://github.com/naitik2004/showup.v2/blob/main/apps/api/src/routes/clubs.ts): `apps/api/src/routes/clubs.ts`
- [Partner discovery](https://github.com/naitik2004/showup.v2/blob/main/apps/api/src/routes/partners.ts): `apps/api/src/routes/partners.ts`
- [Partner experience](https://github.com/naitik2004/showup.v2/blob/main/apps/web/app/partners/page.tsx): `apps/web/app/partners/page.tsx`

### Accounts and operations

- [Authentication](https://github.com/naitik2004/showup.v2/blob/main/apps/api/src/routes/auth.ts): `apps/api/src/routes/auth.ts`
- [Google sign-in](https://github.com/naitik2004/showup.v2/blob/main/apps/api/src/routes/googleAuth.ts): `apps/api/src/routes/googleAuth.ts`
- [Notifications](https://github.com/naitik2004/showup.v2/blob/main/apps/api/src/lib/notificationWorker.ts): `apps/api/src/lib/notificationWorker.ts`
- [Moderation and appeals](https://github.com/naitik2004/showup.v2/blob/main/apps/api/src/routes/admin.ts): `apps/api/src/routes/admin.ts`
- [Service operations](https://github.com/naitik2004/showup.v2/blob/main/apps/api/src/lib/operations.ts): `apps/api/src/lib/operations.ts`
- [PostgreSQL](https://github.com/naitik2004/showup.v2/blob/main/apps/api/src/prisma.ts): `apps/api/src/prisma.ts`
- [API server](https://github.com/naitik2004/showup.v2/blob/main/apps/api/src/index.ts): `apps/api/src/index.ts`

### Other components

- **Player**

## Connections

- Player → Map and browse: finds games (evidence: `README.md`)
- Map and browse → Match discovery: requests matches (evidence: `README.md`)
- Player → Host match: hosts game (evidence: `README.md`)
- Host match → Match management: creates match (evidence: `README.md`)
- Map and browse → Match workspace: opens match (evidence: `README.md`)
- Match workspace → Join and approvals: requests to join (evidence: `README.md`)
- Join and approvals → PostgreSQL: reserves capacity (evidence: `README.md`)
- Match workspace → Realtime match chat: uses member chat (evidence: `README.md`)
- Realtime match chat → Socket.IO: communicates live (evidence: `README.md`)
- Match workspace → Match lifecycle: starts or finishes (evidence: `README.md`)
- Match workspace → Ratings and reputation: rates participants (evidence: `README.md`)
- Ratings and reputation → PostgreSQL: stores ratings (evidence: `README.md`)
- Player → Friends and invites: connects and invites (evidence: `README.md`)
- Player → Partner experience: discovers partners (evidence: `README.md`)
- Partner experience → Partner discovery: requests discovery (evidence: `apps/web/app/partners/page.tsx`)
- Player → Clubs and fixtures: uses clubs (evidence: `README.md`)
- Player → Authentication: signs in (evidence: `README.md`)
- Player → Google sign-in: signs in with Google (evidence: `README.md`)
- API server → PostgreSQL: uses Prisma (evidence: `apps/api/src/index.ts`)
- API server → Notifications: starts worker (evidence: `apps/api/src/index.ts`)
- API server → Authentication: mounts routes (evidence: `apps/api/src/index.ts`)
- API server → Google sign-in: mounts routes (evidence: `apps/api/src/index.ts`)
- Player → Moderation and appeals: reports issues (evidence: `README.md`)
- Player → Service operations: owner monitors (evidence: `README.md`)
