# pnd0805/project-soeftwareen-ltms architecture

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

- Interactive diagram: https://gitdiagram.com/pnd0805/project-soeftwareen-ltms
- Repository: https://github.com/pnd0805/project-soeftwareen-ltms

## Overview

This repository implements a tournament and team-management platform, with a React frontend and an Express/MySQL backend. Users authenticate, browse and manage tournaments, apply with teams, and participate in match workflows; organizers and administrators have additional oversight tools. The graph emphasizes those domain stages and the sampled application flow. Many feature modules are present in the tree but were not excerpted, so their internal call relationships are omitted rather than inferred.

Main entry points: [`frontend/src/App.tsx`](https://github.com/pnd0805/project-soeftwareen-ltms/blob/main/frontend/src/App.tsx) (React application), [`backend/src/controllers/application.controller.ts`](https://github.com/pnd0805/project-soeftwareen-ltms/blob/main/backend/src/controllers/application.controller.ts) (Tournament applications), [`frontend/src/api/client.ts`](https://github.com/pnd0805/project-soeftwareen-ltms/blob/main/frontend/src/api/client.ts) (API client), [`frontend/src/hooks/useAuth.ts`](https://github.com/pnd0805/project-soeftwareen-ltms/blob/main/frontend/src/hooks/useAuth.ts) (Authentication hooks)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_webapp["React application<br/>[App.tsx]"]
  node_home["Home task feed<br/>[homeTasks.ts]"]
  node_clientapi["API client<br/>[client.ts]"]
  node_frontendstate["Client state<br/>[store.ts]"]
  node_frontendtypes["API data types<br/>[dto.ts]"]
end

subgraph group_identity["Identity and access"]
  node_authui["Sign-in flows"]
  node_authhook["Authentication hooks<br/>[useAuth.ts]"]
  node_authservice["Authentication service<br/>[auth.service.ts]"]
  node_users["User accounts<br/>[user.repo.ts]"]
end

subgraph group_tournament["Tournament operations"]
  node_appflow["Tournament applications"]
  node_applicationservice["Application rules"]
  node_applications["Application records"]
  node_tournamentfeatures["Tournament management"]
  node_tournamentdata["Tournament records<br/>[tournament.repo.ts]"]
end

subgraph group_competition["Competition workflows"]
  node_matchfeatures["Match and results"]
  node_matchservice["Match workflows<br/>[match.service.ts]"]
  node_matchdata["Match records<br/>[match.repo.ts]"]
  node_otherfeatures["Teams, check-in, inbox"]
end

subgraph group_platform["Backend platform"]
  node_apiapp["HTTP application<br/>[app.ts]"]
  node_routes["API routes<br/>[index.ts]"]
  node_database[("MySQL database<br/>[db.ts]")]
  node_dbtypes["Database types<br/>[db.ts]"]
  node_pagination["Pagination utilities<br/>[pagination.ts]"]
  node_idparse["ID parsing<br/>[parseId.ts]"]
  node_suspension["Suspension rules<br/>[suspension.ts]"]
end

node_participant(("Players and organizers"))

node_participant -.->|"uses"| node_webapp
node_webapp -->|"routes to"| node_authui
node_webapp -->|"routes to"| node_tournamentfeatures
node_webapp -->|"routes to"| node_matchfeatures
node_webapp -->|"routes to"| node_otherfeatures
node_authui -.->|"uses"| node_authhook
node_authhook -->|"calls"| node_clientapi
node_authhook -->|"updates"| node_frontendstate
node_clientapi -->|"uses types"| node_frontendtypes
node_clientapi -->|"sends requests"| node_apiapp
node_apiapp -->|"mounts"| node_routes
node_routes -->|"routes to"| node_appflow
node_appflow -->|"calls"| node_applicationservice
node_applicationservice -->|"reads and writes"| node_applications
node_applicationservice -->|"checks tournament"| node_tournamentdata
node_applications -->|"queries"| node_database
node_applications -->|"uses types"| node_dbtypes
node_appflow -->|"parses IDs"| node_idparse
node_appflow -->|"parses pages"| node_pagination
node_routes -.->|"authenticates via"| node_authservice
node_authservice -->|"reads and updates"| node_users
node_authservice -->|"checks suspension"| node_suspension
node_matchfeatures -.->|"requests data"| node_clientapi
node_matchservice -->|"uses repository"| node_matchdata
node_matchdata -.->|"queries"| node_database
node_home -.->|"uses"| node_frontendstate

click node_webapp "https://github.com/pnd0805/project-soeftwareen-ltms/blob/main/frontend/src/App.tsx"
click node_home "https://github.com/pnd0805/project-soeftwareen-ltms/blob/main/frontend/src/features/home/homeTasks.ts"
click node_clientapi "https://github.com/pnd0805/project-soeftwareen-ltms/blob/main/frontend/src/api/client.ts"
click node_frontendstate "https://github.com/pnd0805/project-soeftwareen-ltms/blob/main/frontend/src/shared/store.ts"
click node_frontendtypes "https://github.com/pnd0805/project-soeftwareen-ltms/blob/main/frontend/src/types/dto.ts"
click node_authui "https://github.com/pnd0805/project-soeftwareen-ltms/tree/main/frontend/src/features/auth"
click node_authhook "https://github.com/pnd0805/project-soeftwareen-ltms/blob/main/frontend/src/hooks/useAuth.ts"
click node_authservice "https://github.com/pnd0805/project-soeftwareen-ltms/blob/main/backend/src/services/auth.service.ts"
click node_users "https://github.com/pnd0805/project-soeftwareen-ltms/blob/main/backend/src/repositories/user.repo.ts"
click node_appflow "https://github.com/pnd0805/project-soeftwareen-ltms/blob/main/backend/src/controllers/application.controller.ts"
click node_applicationservice "https://github.com/pnd0805/project-soeftwareen-ltms/blob/main/backend/src/services/application.service.ts"
click node_applications "https://github.com/pnd0805/project-soeftwareen-ltms/blob/main/backend/src/repositories/application.repo.ts"
click node_tournamentfeatures "https://github.com/pnd0805/project-soeftwareen-ltms/tree/main/frontend/src/features/tournament"
click node_tournamentdata "https://github.com/pnd0805/project-soeftwareen-ltms/blob/main/backend/src/repositories/tournament.repo.ts"
click node_matchfeatures "https://github.com/pnd0805/project-soeftwareen-ltms/tree/main/frontend/src/features/match"
click node_matchservice "https://github.com/pnd0805/project-soeftwareen-ltms/blob/main/backend/src/services/match.service.ts"
click node_matchdata "https://github.com/pnd0805/project-soeftwareen-ltms/blob/main/backend/src/repositories/match.repo.ts"
click node_otherfeatures "https://github.com/pnd0805/project-soeftwareen-ltms/tree/main/frontend/src/features"
click node_apiapp "https://github.com/pnd0805/project-soeftwareen-ltms/blob/main/backend/src/app.ts"
click node_routes "https://github.com/pnd0805/project-soeftwareen-ltms/blob/main/backend/src/routes/index.ts"
click node_database "https://github.com/pnd0805/project-soeftwareen-ltms/blob/main/backend/src/config/db.ts"
click node_dbtypes "https://github.com/pnd0805/project-soeftwareen-ltms/blob/main/backend/src/types/db.ts"
click node_pagination "https://github.com/pnd0805/project-soeftwareen-ltms/blob/main/backend/src/utils/pagination.ts"
click node_idparse "https://github.com/pnd0805/project-soeftwareen-ltms/blob/main/backend/src/utils/parseId.ts"
click node_suspension "https://github.com/pnd0805/project-soeftwareen-ltms/blob/main/backend/src/utils/suspension.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_webapp,node_home,node_clientapi,node_frontendstate,node_frontendtypes toneBlue
class node_authui,node_authhook,node_authservice,node_users toneAmber
class node_appflow,node_applicationservice,node_applications,node_tournamentfeatures,node_tournamentdata toneMint
class node_matchfeatures,node_matchservice,node_matchdata,node_otherfeatures toneRose
class node_apiapp,node_routes,node_database,node_dbtypes,node_pagination,node_idparse,node_suspension,node_participant toneIndigo
```

## Components

### Web client

- [React application](https://github.com/pnd0805/project-soeftwareen-ltms/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Home task feed](https://github.com/pnd0805/project-soeftwareen-ltms/blob/main/frontend/src/features/home/homeTasks.ts): `frontend/src/features/home/homeTasks.ts`
- [API client](https://github.com/pnd0805/project-soeftwareen-ltms/blob/main/frontend/src/api/client.ts): `frontend/src/api/client.ts`
- [Client state](https://github.com/pnd0805/project-soeftwareen-ltms/blob/main/frontend/src/shared/store.ts): `frontend/src/shared/store.ts`
- [API data types](https://github.com/pnd0805/project-soeftwareen-ltms/blob/main/frontend/src/types/dto.ts): `frontend/src/types/dto.ts`

### Identity and access

- [Sign-in flows](https://github.com/pnd0805/project-soeftwareen-ltms/tree/main/frontend/src/features/auth): `frontend/src/features/auth`
- [Authentication hooks](https://github.com/pnd0805/project-soeftwareen-ltms/blob/main/frontend/src/hooks/useAuth.ts): `frontend/src/hooks/useAuth.ts`
- [Authentication service](https://github.com/pnd0805/project-soeftwareen-ltms/blob/main/backend/src/services/auth.service.ts): `backend/src/services/auth.service.ts`
- [User accounts](https://github.com/pnd0805/project-soeftwareen-ltms/blob/main/backend/src/repositories/user.repo.ts): `backend/src/repositories/user.repo.ts`

### Tournament operations

- [Tournament applications](https://github.com/pnd0805/project-soeftwareen-ltms/blob/main/backend/src/controllers/application.controller.ts): `backend/src/controllers/application.controller.ts`
- [Application rules](https://github.com/pnd0805/project-soeftwareen-ltms/blob/main/backend/src/services/application.service.ts): `backend/src/services/application.service.ts`
- [Application records](https://github.com/pnd0805/project-soeftwareen-ltms/blob/main/backend/src/repositories/application.repo.ts): `backend/src/repositories/application.repo.ts`
- [Tournament management](https://github.com/pnd0805/project-soeftwareen-ltms/tree/main/frontend/src/features/tournament): `frontend/src/features/tournament`
- [Tournament records](https://github.com/pnd0805/project-soeftwareen-ltms/blob/main/backend/src/repositories/tournament.repo.ts): `backend/src/repositories/tournament.repo.ts`

### Competition workflows

- [Match and results](https://github.com/pnd0805/project-soeftwareen-ltms/tree/main/frontend/src/features/match): `frontend/src/features/match`
- [Match workflows](https://github.com/pnd0805/project-soeftwareen-ltms/blob/main/backend/src/services/match.service.ts): `backend/src/services/match.service.ts`
- [Match records](https://github.com/pnd0805/project-soeftwareen-ltms/blob/main/backend/src/repositories/match.repo.ts): `backend/src/repositories/match.repo.ts`
- [Teams, check-in, inbox](https://github.com/pnd0805/project-soeftwareen-ltms/tree/main/frontend/src/features): `frontend/src/features`

### Backend platform

- [HTTP application](https://github.com/pnd0805/project-soeftwareen-ltms/blob/main/backend/src/app.ts): `backend/src/app.ts`
- [API routes](https://github.com/pnd0805/project-soeftwareen-ltms/blob/main/backend/src/routes/index.ts): `backend/src/routes/index.ts`
- [MySQL database](https://github.com/pnd0805/project-soeftwareen-ltms/blob/main/backend/src/config/db.ts): `backend/src/config/db.ts`
- [Database types](https://github.com/pnd0805/project-soeftwareen-ltms/blob/main/backend/src/types/db.ts): `backend/src/types/db.ts`
- [Pagination utilities](https://github.com/pnd0805/project-soeftwareen-ltms/blob/main/backend/src/utils/pagination.ts): `backend/src/utils/pagination.ts`
- [ID parsing](https://github.com/pnd0805/project-soeftwareen-ltms/blob/main/backend/src/utils/parseId.ts): `backend/src/utils/parseId.ts`
- [Suspension rules](https://github.com/pnd0805/project-soeftwareen-ltms/blob/main/backend/src/utils/suspension.ts): `backend/src/utils/suspension.ts`

### Other components

- **Players and organizers**

## Connections

- Players and organizers → React application: uses
- React application → Sign-in flows: routes to (evidence: `frontend/src/App.tsx`)
- React application → Tournament management: routes to (evidence: `frontend/src/App.tsx`)
- React application → Match and results: routes to (evidence: `frontend/src/App.tsx`)
- React application → Teams, check-in, inbox: routes to (evidence: `frontend/src/App.tsx`)
- Sign-in flows → Authentication hooks: uses
- Authentication hooks → API client: calls (evidence: `frontend/src/hooks/useAuth.ts`)
- Authentication hooks → Client state: updates (evidence: `frontend/src/hooks/useAuth.ts`)
- API client → API data types: uses types (evidence: `frontend/src/api/client.ts`)
- API client → HTTP application: sends requests (evidence: `frontend/src/api/client.ts`)
- HTTP application → API routes: mounts (evidence: `backend/src/app.ts`)
- API routes → Tournament applications: routes to
- Tournament applications → Application rules: calls (evidence: `backend/src/controllers/application.controller.ts`)
- Application rules → Application records: reads and writes (evidence: `backend/src/services/application.service.ts`)
- Application rules → Tournament records: checks tournament (evidence: `backend/src/services/application.service.ts`)
- Application records → MySQL database: queries (evidence: `backend/src/repositories/application.repo.ts`)
- Application records → Database types: uses types (evidence: `backend/src/repositories/application.repo.ts`)
- Tournament applications → ID parsing: parses IDs (evidence: `backend/src/controllers/application.controller.ts`)
- Tournament applications → Pagination utilities: parses pages (evidence: `backend/src/controllers/application.controller.ts`)
- API routes → Authentication service: authenticates via
- Authentication service → User accounts: reads and updates (evidence: `backend/src/services/auth.service.ts`)
- Authentication service → Suspension rules: checks suspension (evidence: `backend/src/services/auth.service.ts`)
- Match and results → API client: requests data
- Match workflows → Match records: uses repository
- Match records → MySQL database: queries
- Home task feed → Client state: uses
