# bouazz-a/mtym-2026 architecture

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

- Interactive diagram: https://gitdiagram.com/bouazz-a/mtym-2026
- Repository: https://github.com/bouazz-a/mtym-2026

## Overview

This tree contains two related tournament-management applications: a participant/workshop platform under `backend/` and `frontend/`, and a jury-focused tournament platform under `jury_platform/`. Their main user journey is role-based access to tournament information and tasks, followed by administration or jury evaluation; the jury platform additionally supports draws, report assignments, convocations, and results. Source excerpts establish app routing, API route registration, and authentication-to-database behavior. Other feature connections are kept at subsystem level where implementation details were not sampled.

Main entry points: [`frontend/src/App.tsx`](https://github.com/bouazz-a/mtym-2026/blob/main/frontend/src/App.tsx) (Role routing), [`jury_platform/frontend/src/App.tsx`](https://github.com/bouazz-a/mtym-2026/blob/main/jury_platform/frontend/src/App.tsx) (Role routing), [`jury_platform/backend/src/routes/auth.ts`](https://github.com/bouazz-a/mtym-2026/blob/main/jury_platform/backend/src/routes/auth.ts) (Account authentication), [`backend/src/routes/index.ts`](https://github.com/bouazz-a/mtym-2026/blob/main/backend/src/routes/index.ts) (API routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_participant_app["Participant platform"]
  node_participants["Participants"]
  node_jury_users["Jury users"]
  node_organizer_users["Organizers"]
  node_participant_router["Role routing<br/>[App.tsx]"]
  node_participant_api_client["API client<br/>[client.ts]"]
end

subgraph group_participant_api["Participant API"]
  node_participant_routes["API routes<br/>[index.ts]"]
  node_participant_auth["Identity and roles<br/>[auth.ts]"]
  node_participant_data["Tournament data"]
end

subgraph group_jury_app["Jury platform"]
  node_jury_admin["Administration"]
  node_jury_jurors["Jury workflow"]
  node_jury_router["Role routing<br/>[App.tsx]"]
  node_jury_api_client["API client<br/>[client.ts]"]
  node_jury_exports["Exports and results<br/>[exportService.ts]"]
end

subgraph group_jury_api["Jury API"]
  node_jury_routes["API routes<br/>[index.ts]"]
  node_jury_auth_routes["Account authentication<br/>[auth.ts]"]
  node_jury_access["Token and access checks<br/>[auth.ts]"]
  node_jury_domain["Tournament operations"]
  node_jury_services["Tournament services"]
end

subgraph group_shared_runtime["Runtime infrastructure"]
  node_participant_db[("Postgres access<br/>[db.ts]")]
  node_jury_db[("Postgres access<br/>[db.ts]")]
end

node_participants_actor(("Participant"))
node_jury_actor(("Jury member"))
node_organizer_actor(("Organizer"))
node_admin_actor(("Administrator"))

node_participants_actor -.->|"uses"| node_participant_router
node_jury_actor -.->|"uses"| node_participant_router
node_organizer_actor -.->|"uses"| node_participant_router
node_participant_router -->|"routes to"| node_participants
node_participant_router -->|"routes to"| node_jury_users
node_participant_router -->|"routes to"| node_organizer_users
node_participant_routes -->|"uses"| node_participant_auth
node_participant_routes -->|"registers"| node_participant_data
node_participant_auth -->|"looks up users"| node_participant_db
node_admin_actor -.->|"uses"| node_jury_router
node_jury_actor -.->|"uses"| node_jury_router
node_jury_router -->|"routes to"| node_jury_admin
node_jury_router -->|"routes to"| node_jury_jurors
node_jury_admin -.->|"uses"| node_jury_exports
node_jury_routes -.->|"registers"| node_jury_auth_routes
node_jury_routes -.->|"registers"| node_jury_domain
node_jury_auth_routes -->|"authenticates with"| node_jury_access
node_jury_access -->|"reads accounts"| node_jury_db
node_jury_auth_routes -->|"reads and updates"| node_jury_db
node_jury_exports -->|"computes results"| node_jury_services

click node_participants "https://github.com/bouazz-a/mtym-2026/tree/main/frontend/src/features/participant"
click node_jury_users "https://github.com/bouazz-a/mtym-2026/tree/main/frontend/src/features/jury"
click node_organizer_users "https://github.com/bouazz-a/mtym-2026/tree/main/frontend/src/features/organizer"
click node_participant_router "https://github.com/bouazz-a/mtym-2026/blob/main/frontend/src/App.tsx"
click node_participant_api_client "https://github.com/bouazz-a/mtym-2026/blob/main/frontend/src/lib/api/client.ts"
click node_participant_routes "https://github.com/bouazz-a/mtym-2026/blob/main/backend/src/routes/index.ts"
click node_participant_auth "https://github.com/bouazz-a/mtym-2026/blob/main/backend/src/middleware/auth.ts"
click node_participant_data "https://github.com/bouazz-a/mtym-2026/tree/main/backend/src/routes"
click node_participant_db "https://github.com/bouazz-a/mtym-2026/blob/main/backend/src/db.ts"
click node_jury_admin "https://github.com/bouazz-a/mtym-2026/tree/main/jury_platform/frontend/src/features/admin"
click node_jury_jurors "https://github.com/bouazz-a/mtym-2026/tree/main/jury_platform/frontend/src/features/jury"
click node_jury_router "https://github.com/bouazz-a/mtym-2026/blob/main/jury_platform/frontend/src/App.tsx"
click node_jury_api_client "https://github.com/bouazz-a/mtym-2026/blob/main/jury_platform/frontend/src/lib/api/client.ts"
click node_jury_exports "https://github.com/bouazz-a/mtym-2026/blob/main/jury_platform/frontend/src/lib/services/exportService.ts"
click node_jury_routes "https://github.com/bouazz-a/mtym-2026/blob/main/jury_platform/backend/src/routes/index.ts"
click node_jury_auth_routes "https://github.com/bouazz-a/mtym-2026/blob/main/jury_platform/backend/src/routes/auth.ts"
click node_jury_access "https://github.com/bouazz-a/mtym-2026/blob/main/jury_platform/backend/src/middleware/auth.ts"
click node_jury_domain "https://github.com/bouazz-a/mtym-2026/tree/main/jury_platform/backend/src/routes"
click node_jury_services "https://github.com/bouazz-a/mtym-2026/tree/main/jury_platform/backend/src/services"
click node_jury_db "https://github.com/bouazz-a/mtym-2026/blob/main/jury_platform/backend/src/db.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_participants,node_jury_users,node_organizer_users,node_participant_router,node_participant_api_client toneBlue
class node_participant_routes,node_participant_auth,node_participant_data toneAmber
class node_jury_admin,node_jury_jurors,node_jury_router,node_jury_api_client,node_jury_exports toneMint
class node_jury_routes,node_jury_auth_routes,node_jury_access,node_jury_domain,node_jury_services toneRose
class node_participant_db,node_jury_db,node_participants_actor,node_jury_actor,node_organizer_actor,node_admin_actor toneIndigo
```

## Components

### Participant platform

- [Participants](https://github.com/bouazz-a/mtym-2026/tree/main/frontend/src/features/participant): `frontend/src/features/participant`
- [Jury users](https://github.com/bouazz-a/mtym-2026/tree/main/frontend/src/features/jury): `frontend/src/features/jury`
- [Organizers](https://github.com/bouazz-a/mtym-2026/tree/main/frontend/src/features/organizer): `frontend/src/features/organizer`
- [Role routing](https://github.com/bouazz-a/mtym-2026/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [API client](https://github.com/bouazz-a/mtym-2026/blob/main/frontend/src/lib/api/client.ts): `frontend/src/lib/api/client.ts`

### Participant API

- [API routes](https://github.com/bouazz-a/mtym-2026/blob/main/backend/src/routes/index.ts): `backend/src/routes/index.ts`
- [Identity and roles](https://github.com/bouazz-a/mtym-2026/blob/main/backend/src/middleware/auth.ts): `backend/src/middleware/auth.ts`
- [Tournament data](https://github.com/bouazz-a/mtym-2026/tree/main/backend/src/routes): `backend/src/routes`

### Jury platform

- [Administration](https://github.com/bouazz-a/mtym-2026/tree/main/jury_platform/frontend/src/features/admin): `jury_platform/frontend/src/features/admin`
- [Jury workflow](https://github.com/bouazz-a/mtym-2026/tree/main/jury_platform/frontend/src/features/jury): `jury_platform/frontend/src/features/jury`
- [Role routing](https://github.com/bouazz-a/mtym-2026/blob/main/jury_platform/frontend/src/App.tsx): `jury_platform/frontend/src/App.tsx`
- [API client](https://github.com/bouazz-a/mtym-2026/blob/main/jury_platform/frontend/src/lib/api/client.ts): `jury_platform/frontend/src/lib/api/client.ts`
- [Exports and results](https://github.com/bouazz-a/mtym-2026/blob/main/jury_platform/frontend/src/lib/services/exportService.ts): `jury_platform/frontend/src/lib/services/exportService.ts`

### Jury API

- [API routes](https://github.com/bouazz-a/mtym-2026/blob/main/jury_platform/backend/src/routes/index.ts): `jury_platform/backend/src/routes/index.ts`
- [Account authentication](https://github.com/bouazz-a/mtym-2026/blob/main/jury_platform/backend/src/routes/auth.ts): `jury_platform/backend/src/routes/auth.ts`
- [Token and access checks](https://github.com/bouazz-a/mtym-2026/blob/main/jury_platform/backend/src/middleware/auth.ts): `jury_platform/backend/src/middleware/auth.ts`
- [Tournament operations](https://github.com/bouazz-a/mtym-2026/tree/main/jury_platform/backend/src/routes): `jury_platform/backend/src/routes`
- [Tournament services](https://github.com/bouazz-a/mtym-2026/tree/main/jury_platform/backend/src/services): `jury_platform/backend/src/services`

### Runtime infrastructure

- [Postgres access](https://github.com/bouazz-a/mtym-2026/blob/main/backend/src/db.ts): `backend/src/db.ts`
- [Postgres access](https://github.com/bouazz-a/mtym-2026/blob/main/jury_platform/backend/src/db.ts): `jury_platform/backend/src/db.ts`

### Other components

- **Participant**
- **Jury member**
- **Organizer**
- **Administrator**

## Connections

- Participant → Role routing: uses
- Jury member → Role routing: uses
- Organizer → Role routing: uses
- Role routing → Participants: routes to (evidence: `frontend/src/App.tsx`)
- Role routing → Jury users: routes to (evidence: `frontend/src/App.tsx`)
- Role routing → Organizers: routes to (evidence: `frontend/src/App.tsx`)
- API routes → Identity and roles: uses (evidence: `backend/src/routes/index.ts`)
- API routes → Tournament data: registers (evidence: `backend/src/routes/index.ts`)
- Identity and roles → Postgres access: looks up users (evidence: `backend/src/middleware/auth.ts`)
- Administrator → Role routing: uses
- Jury member → Role routing: uses
- Role routing → Administration: routes to (evidence: `jury_platform/frontend/src/App.tsx`)
- Role routing → Jury workflow: routes to (evidence: `jury_platform/frontend/src/App.tsx`)
- Administration → Exports and results: uses
- API routes → Account authentication: registers
- API routes → Tournament operations: registers
- Account authentication → Token and access checks: authenticates with (evidence: `jury_platform/backend/src/routes/auth.ts`)
- Token and access checks → Postgres access: reads accounts (evidence: `jury_platform/backend/src/middleware/auth.ts`)
- Account authentication → Postgres access: reads and updates (evidence: `jury_platform/backend/src/routes/auth.ts`)
- Exports and results → Tournament services: computes results (evidence: `jury_platform/frontend/src/lib/services/exportService.ts`)
