# escillex/joust-backend architecture

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

- Interactive diagram: https://gitdiagram.com/escillex/joust-backend
- Repository: https://github.com/escillex/joust-backend

## Overview

This appears to be a tournament-community backend: users and organizers manage tournaments, entrants, formats and match play, while participants follow results and discover community content. The README is unmodified NestJS starter text and does not document the product; the tree and sampled controllers/services support the feature map below. Some major subsystems are represented from their exact directory paths, but their internal wiring is omitted where source excerpts were unavailable.

Main entry points: [`src/tournament/tournament.controller.ts`](https://github.com/escillex/joust-backend/blob/main/src/tournament/tournament.controller.ts) (Tournament management), [`src/auth/auth.controller.ts`](https://github.com/escillex/joust-backend/blob/main/src/auth/auth.controller.ts) (Accounts and sign-in), [`src/settings/settings.controller.ts`](https://github.com/escillex/joust-backend/blob/main/src/settings/settings.controller.ts) (Settings and audit), [`src/tournament/match/match.controller.ts`](https://github.com/escillex/joust-backend/blob/main/src/tournament/match/match.controller.ts) (Match scoring)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Identity and access"]
  node_auth["Accounts and sign-in<br/>[auth.controller.ts]"]
  node_users["User profiles<br/>[user.controller.ts]"]
  node_organizers["Organizer tools"]
end

subgraph group_tournament["Tournament operations"]
  node_tournaments["Tournament management"]
  node_participants["Entrants and invites"]
  node_formats["Formats and seeding<br/>[formats.service.ts]"]
  node_rounds["Rounds and brackets"]
  node_matches["Match scoring"]
  node_matchtools["Trackers and utilities"]
  node_games["Game catalog<br/>[game.controller.ts]"]
end

subgraph group_community["Community features"]
  node_discovery["Search and rankings"]
  node_content["Builds and galleries"]
  node_images["Image assets"]
  node_awards["Awards and showcases"]
  node_notifications["Notifications and live updates"]
  node_store["Store catalog"]
end

subgraph group_platform["Platform services"]
  node_admin["Settings and audit"]
  node_backups["Backup and restore"]
  node_analytics["Analytics and dashboard"]
  node_database[("Application database<br/>[prisma.service.ts]")]
end

node_visitor(("Visitor or user"))
node_smtp(("SMTP mail relay"))
node_google(("Google identity"))

node_visitor -->|"signs in"| node_auth
node_auth -->|"reads and writes"| node_database
node_auth -.->|"authenticates with"| node_google
node_auth -->|"manages accounts"| node_users
node_visitor -->|"browses or creates"| node_tournaments
node_tournaments -->|"uses format"| node_formats
node_tournaments -->|"assigns game"| node_games
node_tournaments -->|"manages entrants"| node_participants
node_tournaments -->|"generates bracket"| node_rounds
node_rounds -->|"organizes play"| node_matches
node_visitor -->|"reports scores"| node_matches
node_matches -->|"supports match play"| node_matchtools
node_visitor -->|"searches"| node_discovery
node_visitor -->|"submits builds"| node_content
node_content -->|"uploads media"| node_images
node_visitor -->|"views showcase"| node_awards
node_admin -.->|"tests delivery"| node_smtp
node_visitor -->|"browses catalog"| node_store
node_admin -->|"configures backups"| node_backups
node_admin -->|"views reports"| node_analytics
node_organizers -->|"organizes"| node_tournaments

click node_auth "https://github.com/escillex/joust-backend/blob/main/src/auth/auth.controller.ts"
click node_users "https://github.com/escillex/joust-backend/blob/main/src/user/user.controller.ts"
click node_organizers "https://github.com/escillex/joust-backend/blob/main/src/organizer/organizer.controller.ts"
click node_tournaments "https://github.com/escillex/joust-backend/blob/main/src/tournament/tournament.controller.ts"
click node_participants "https://github.com/escillex/joust-backend/blob/main/src/tournament/participant/participant.controller.ts"
click node_formats "https://github.com/escillex/joust-backend/blob/main/src/Formats/formats.service.ts"
click node_rounds "https://github.com/escillex/joust-backend/blob/main/src/tournament/round/round.controller.ts"
click node_matches "https://github.com/escillex/joust-backend/blob/main/src/tournament/match/match.controller.ts"
click node_matchtools "https://github.com/escillex/joust-backend/blob/main/src/tournament/match/tracker/tracker.controller.ts"
click node_games "https://github.com/escillex/joust-backend/blob/main/src/game/game.controller.ts"
click node_discovery "https://github.com/escillex/joust-backend/blob/main/src/search/search.controller.ts"
click node_content "https://github.com/escillex/joust-backend/blob/main/src/content/content.controller.ts"
click node_images "https://github.com/escillex/joust-backend/blob/main/src/images/images.controller.ts"
click node_awards "https://github.com/escillex/joust-backend/blob/main/src/award/award.controller.ts"
click node_notifications "https://github.com/escillex/joust-backend/blob/main/src/notification/notification.controller.ts"
click node_store "https://github.com/escillex/joust-backend/blob/main/src/store/store.controller.ts"
click node_admin "https://github.com/escillex/joust-backend/blob/main/src/settings/settings.controller.ts"
click node_backups "https://github.com/escillex/joust-backend/blob/main/src/backup/backup.controller.ts"
click node_analytics "https://github.com/escillex/joust-backend/blob/main/src/analytics/analytics.controller.ts"
click node_database "https://github.com/escillex/joust-backend/blob/main/prisma/prisma.service.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_auth,node_users,node_organizers,node_visitor toneBlue
class node_tournaments,node_participants,node_formats,node_rounds,node_matches,node_matchtools,node_games toneAmber
class node_discovery,node_content,node_images,node_awards,node_notifications,node_store toneMint
class node_admin,node_backups,node_analytics,node_database toneRose
class node_smtp,node_google toneIndigo
```

## Components

### Identity and access

- [Accounts and sign-in](https://github.com/escillex/joust-backend/blob/main/src/auth/auth.controller.ts): `src/auth/auth.controller.ts`
- [User profiles](https://github.com/escillex/joust-backend/blob/main/src/user/user.controller.ts): `src/user/user.controller.ts`
- [Organizer tools](https://github.com/escillex/joust-backend/blob/main/src/organizer/organizer.controller.ts): `src/organizer/organizer.controller.ts`

### Tournament operations

- [Tournament management](https://github.com/escillex/joust-backend/blob/main/src/tournament/tournament.controller.ts): `src/tournament/tournament.controller.ts`
- [Entrants and invites](https://github.com/escillex/joust-backend/blob/main/src/tournament/participant/participant.controller.ts): `src/tournament/participant/participant.controller.ts`
- [Formats and seeding](https://github.com/escillex/joust-backend/blob/main/src/Formats/formats.service.ts): `src/Formats/formats.service.ts`
- [Rounds and brackets](https://github.com/escillex/joust-backend/blob/main/src/tournament/round/round.controller.ts): `src/tournament/round/round.controller.ts`
- [Match scoring](https://github.com/escillex/joust-backend/blob/main/src/tournament/match/match.controller.ts): `src/tournament/match/match.controller.ts`
- [Trackers and utilities](https://github.com/escillex/joust-backend/blob/main/src/tournament/match/tracker/tracker.controller.ts): `src/tournament/match/tracker/tracker.controller.ts`
- [Game catalog](https://github.com/escillex/joust-backend/blob/main/src/game/game.controller.ts): `src/game/game.controller.ts`

### Community features

- [Search and rankings](https://github.com/escillex/joust-backend/blob/main/src/search/search.controller.ts): `src/search/search.controller.ts`
- [Builds and galleries](https://github.com/escillex/joust-backend/blob/main/src/content/content.controller.ts): `src/content/content.controller.ts`
- [Image assets](https://github.com/escillex/joust-backend/blob/main/src/images/images.controller.ts): `src/images/images.controller.ts`
- [Awards and showcases](https://github.com/escillex/joust-backend/blob/main/src/award/award.controller.ts): `src/award/award.controller.ts`
- [Notifications and live updates](https://github.com/escillex/joust-backend/blob/main/src/notification/notification.controller.ts): `src/notification/notification.controller.ts`
- [Store catalog](https://github.com/escillex/joust-backend/blob/main/src/store/store.controller.ts): `src/store/store.controller.ts`

### Platform services

- [Settings and audit](https://github.com/escillex/joust-backend/blob/main/src/settings/settings.controller.ts): `src/settings/settings.controller.ts`
- [Backup and restore](https://github.com/escillex/joust-backend/blob/main/src/backup/backup.controller.ts): `src/backup/backup.controller.ts`
- [Analytics and dashboard](https://github.com/escillex/joust-backend/blob/main/src/analytics/analytics.controller.ts): `src/analytics/analytics.controller.ts`
- [Application database](https://github.com/escillex/joust-backend/blob/main/prisma/prisma.service.ts): `prisma/prisma.service.ts`

### Other components

- **Visitor or user**
- **SMTP mail relay**
- **Google identity**

## Connections

- Visitor or user → Accounts and sign-in: signs in
- Accounts and sign-in → Application database: reads and writes
- Accounts and sign-in → Google identity: authenticates with
- Accounts and sign-in → User profiles: manages accounts
- Visitor or user → Tournament management: browses or creates
- Tournament management → Formats and seeding: uses format
- Tournament management → Game catalog: assigns game
- Tournament management → Entrants and invites: manages entrants
- Tournament management → Rounds and brackets: generates bracket
- Rounds and brackets → Match scoring: organizes play
- Visitor or user → Match scoring: reports scores
- Match scoring → Trackers and utilities: supports match play
- Visitor or user → Search and rankings: searches
- Visitor or user → Builds and galleries: submits builds
- Builds and galleries → Image assets: uploads media
- Visitor or user → Awards and showcases: views showcase
- Settings and audit → SMTP mail relay: tests delivery
- Visitor or user → Store catalog: browses catalog
- Settings and audit → Backup and restore: configures backups
- Settings and audit → Analytics and dashboard: views reports
- Organizer tools → Tournament management: organizes
