# azlanmohd076-cmyk/playpro-platform architecture

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

- Interactive diagram: https://gitdiagram.com/azlanmohd076-cmyk/playpro-platform
- Repository: https://github.com/azlanmohd076-cmyk/playpro-platform

## Overview

PlayPro is a grassroots football management and intelligence platform backed by Supabase. Its user-facing journey spans account creation and role selection, club setup, player assessment and passport status, then league and matchday operations; discovery and scouting provide a separate talent-search branch. The README also documents DNA ratings, player-development projections, and real-time match observation. Those capabilities are represented at their supported module-directory level because their implementation was not sampled; the strongest explicit call evidence is for matchday eligibility checks.

Main entry points: [`src/modules/auth/auth-session.service.js`](https://github.com/azlanmohd076-cmyk/playpro-platform/blob/main/src/modules/auth/auth-session.service.js) (Auth sessions), [`src/modules/search/role-search-router.js`](https://github.com/azlanmohd076-cmyk/playpro-platform/blob/main/src/modules/search/role-search-router.js) (Role search), [`src/modules/league-os/matchday-engine.js`](https://github.com/azlanmohd076-cmyk/playpro-platform/blob/main/src/modules/league-os/matchday-engine.js) (Matchday validation), [`src/modules/league-os/eligibility-engine.js`](https://github.com/azlanmohd076-cmyk/playpro-platform/blob/main/src/modules/league-os/eligibility-engine.js) (Eligibility engine)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Identity and access"]
  node_auth["Auth sessions"]
  node_roles["Role routing<br/>[role-router.js]"]
end

subgraph group_club["Club and talent"]
  node_clubs["Club workspace<br/>[club-manager-ui.js]"]
  node_search["Role search"]
  node_scouting["Scout marketplace<br/>[scout.service.js]"]
end

subgraph group_player["Player intelligence"]
  node_coach["Coach assessment"]
  node_coachui["Coach experience<br/>[coach-ui.js]"]
  node_passport["Football passport"]
  node_passportstatus["Passport status<br/>[passport-status.js]"]
  node_development["DNA and development"]
end

subgraph group_competition["League operations"]
  node_league["League management"]
  node_eligibility["Eligibility engine"]
  node_matchday["Matchday validation<br/>[matchday-engine.js]"]
  node_observation["Match observation"]
end

subgraph group_platform["Platform services"]
  node_verification["Player verification"]
  node_kyc["KYC verification<br/>[index.ts]"]
  node_wallet["Player wallet<br/>[wallet.service.js]"]
  node_supabaseclient["Supabase client<br/>[supabase-client.js]"]
end

node_user(("Player or manager"))
node_supabase[("Supabase")]

node_user -->|"signs up"| node_auth
node_auth -->|"auth and profile"| node_supabase
node_auth -->|"resolves role"| node_roles
node_user -->|"sets up club"| node_clubs
node_user -->|"searches coaches"| node_search
node_search -->|"queries profiles"| node_supabase
node_search -->|"renders profile"| node_coachui
node_user -->|"assesses player"| node_coach
node_user -->|"checks passport"| node_passport
node_user -->|"manages league"| node_league
node_user -->|"checks squad"| node_matchday
node_matchday -->|"checks passport"| node_passportstatus
node_matchday -->|"checks suspension"| node_eligibility
node_eligibility -->|"reads suspensions"| node_supabase
node_user -->|"records match"| node_observation
node_user -->|"uses scouting"| node_scouting
node_user -->|"verifies player"| node_verification
node_verification -.->|"uses KYC"| node_kyc
node_user -->|"uses wallet"| node_wallet
node_supabaseclient -->|"connects"| node_supabase

click node_auth "https://github.com/azlanmohd076-cmyk/playpro-platform/blob/main/src/modules/auth/auth-session.service.js"
click node_roles "https://github.com/azlanmohd076-cmyk/playpro-platform/blob/main/src/modules/auth/role-router.js"
click node_clubs "https://github.com/azlanmohd076-cmyk/playpro-platform/blob/main/src/modules/club/club-manager-ui.js"
click node_search "https://github.com/azlanmohd076-cmyk/playpro-platform/blob/main/src/modules/search/role-search-router.js"
click node_scouting "https://github.com/azlanmohd076-cmyk/playpro-platform/blob/main/src/modules/scout-marketplace/scout.service.js"
click node_coach "https://github.com/azlanmohd076-cmyk/playpro-platform/blob/main/src/modules/coach/coach-assessment.js"
click node_coachui "https://github.com/azlanmohd076-cmyk/playpro-platform/blob/main/src/modules/coach/coach-ui.js"
click node_passport "https://github.com/azlanmohd076-cmyk/playpro-platform/blob/main/src/modules/passport/passport.service.js"
click node_passportstatus "https://github.com/azlanmohd076-cmyk/playpro-platform/blob/main/src/modules/passport/passport-status.js"
click node_development "https://github.com/azlanmohd076-cmyk/playpro-platform/tree/main/src/modules/coach"
click node_league "https://github.com/azlanmohd076-cmyk/playpro-platform/blob/main/src/modules/league-os/league-os.service.js"
click node_eligibility "https://github.com/azlanmohd076-cmyk/playpro-platform/blob/main/src/modules/league-os/eligibility-engine.js"
click node_matchday "https://github.com/azlanmohd076-cmyk/playpro-platform/blob/main/src/modules/league-os/matchday-engine.js"
click node_observation "https://github.com/azlanmohd076-cmyk/playpro-platform/tree/main/src/modules/league-os"
click node_verification "https://github.com/azlanmohd076-cmyk/playpro-platform/blob/main/src/modules/verification/verification.service.js"
click node_kyc "https://github.com/azlanmohd076-cmyk/playpro-platform/blob/main/supabase/functions/kyc-verify-player/index.ts"
click node_wallet "https://github.com/azlanmohd076-cmyk/playpro-platform/blob/main/src/modules/wallet/wallet.service.js"
click node_supabaseclient "https://github.com/azlanmohd076-cmyk/playpro-platform/blob/main/src/core/supabase-client.js"

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_roles toneBlue
class node_clubs,node_search,node_scouting,node_supabase toneAmber
class node_coach,node_coachui,node_passport,node_passportstatus,node_development toneMint
class node_league,node_eligibility,node_matchday,node_observation toneRose
class node_verification,node_kyc,node_wallet,node_supabaseclient,node_user toneIndigo
```

## Components

### Identity and access

- [Auth sessions](https://github.com/azlanmohd076-cmyk/playpro-platform/blob/main/src/modules/auth/auth-session.service.js): `src/modules/auth/auth-session.service.js`
- [Role routing](https://github.com/azlanmohd076-cmyk/playpro-platform/blob/main/src/modules/auth/role-router.js): `src/modules/auth/role-router.js`

### Club and talent

- [Club workspace](https://github.com/azlanmohd076-cmyk/playpro-platform/blob/main/src/modules/club/club-manager-ui.js): `src/modules/club/club-manager-ui.js`
- [Role search](https://github.com/azlanmohd076-cmyk/playpro-platform/blob/main/src/modules/search/role-search-router.js): `src/modules/search/role-search-router.js`
- [Scout marketplace](https://github.com/azlanmohd076-cmyk/playpro-platform/blob/main/src/modules/scout-marketplace/scout.service.js): `src/modules/scout-marketplace/scout.service.js`

### Player intelligence

- [Coach assessment](https://github.com/azlanmohd076-cmyk/playpro-platform/blob/main/src/modules/coach/coach-assessment.js): `src/modules/coach/coach-assessment.js`
- [Coach experience](https://github.com/azlanmohd076-cmyk/playpro-platform/blob/main/src/modules/coach/coach-ui.js): `src/modules/coach/coach-ui.js`
- [Football passport](https://github.com/azlanmohd076-cmyk/playpro-platform/blob/main/src/modules/passport/passport.service.js): `src/modules/passport/passport.service.js`
- [Passport status](https://github.com/azlanmohd076-cmyk/playpro-platform/blob/main/src/modules/passport/passport-status.js): `src/modules/passport/passport-status.js`
- [DNA and development](https://github.com/azlanmohd076-cmyk/playpro-platform/tree/main/src/modules/coach): `src/modules/coach`

### League operations

- [League management](https://github.com/azlanmohd076-cmyk/playpro-platform/blob/main/src/modules/league-os/league-os.service.js): `src/modules/league-os/league-os.service.js`
- [Eligibility engine](https://github.com/azlanmohd076-cmyk/playpro-platform/blob/main/src/modules/league-os/eligibility-engine.js): `src/modules/league-os/eligibility-engine.js`
- [Matchday validation](https://github.com/azlanmohd076-cmyk/playpro-platform/blob/main/src/modules/league-os/matchday-engine.js): `src/modules/league-os/matchday-engine.js`
- [Match observation](https://github.com/azlanmohd076-cmyk/playpro-platform/tree/main/src/modules/league-os): `src/modules/league-os`

### Platform services

- [Player verification](https://github.com/azlanmohd076-cmyk/playpro-platform/blob/main/src/modules/verification/verification.service.js): `src/modules/verification/verification.service.js`
- [KYC verification](https://github.com/azlanmohd076-cmyk/playpro-platform/blob/main/supabase/functions/kyc-verify-player/index.ts): `supabase/functions/kyc-verify-player/index.ts`
- [Player wallet](https://github.com/azlanmohd076-cmyk/playpro-platform/blob/main/src/modules/wallet/wallet.service.js): `src/modules/wallet/wallet.service.js`
- [Supabase client](https://github.com/azlanmohd076-cmyk/playpro-platform/blob/main/src/core/supabase-client.js): `src/core/supabase-client.js`

### Other components

- **Player or manager**
- **Supabase**

## Connections

- Player or manager → Auth sessions: signs up
- Auth sessions → Supabase: auth and profile
- Auth sessions → Role routing: resolves role
- Player or manager → Club workspace: sets up club
- Player or manager → Role search: searches coaches
- Role search → Supabase: queries profiles
- Role search → Coach experience: renders profile
- Player or manager → Coach assessment: assesses player
- Player or manager → Football passport: checks passport
- Player or manager → League management: manages league
- Player or manager → Matchday validation: checks squad
- Matchday validation → Passport status: checks passport
- Matchday validation → Eligibility engine: checks suspension
- Eligibility engine → Supabase: reads suspensions
- Player or manager → Match observation: records match
- Player or manager → Scout marketplace: uses scouting
- Player or manager → Player verification: verifies player
- Player verification → KYC verification: uses KYC
- Player or manager → Player wallet: uses wallet
- Supabase client → Supabase: connects
