# curious9rahul/athnexus-smart-athlete-enablement-scouting-platform-using-ml architecture

> Architecture diagram of the GitHub repository curious9rahul/athnexus-smart-athlete-enablement-scouting-platform-using-ml, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/curious9rahul/athnexus-smart-athlete-enablement-scouting-platform-using-ml
- Repository: https://github.com/curious9rahul/athnexus-smart-athlete-enablement-scouting-platform-using-ml

## Overview

AthNexus is an athlete enablement and scouting platform: athletes authenticate, complete profiles, discover events and submit registrations; verifiers manage events and review registrations, with smart ranking and analytics as supporting capabilities. The React app routes users into role-specific pages, while hooks call the Express API. Authentication persists users through the User model, and event registration and moderation are handled by the backend. A separate Flask inference service exposes selection predictions. Email and some service wiring are only partially evidenced in the supplied excerpts, so uncertain connections are omitted.

Main entry points: [`app/src/App.tsx`](https://github.com/curious9rahul/athnexus-smart-athlete-enablement-scouting-platform-using-ml/blob/main/app/src/App.tsx) (App routing), [`app/src/hooks/useEvents.ts`](https://github.com/curious9rahul/athnexus-smart-athlete-enablement-scouting-platform-using-ml/blob/main/app/src/hooks/useEvents.ts) (Event operations), [`backend/server.cjs`](https://github.com/curious9rahul/athnexus-smart-athlete-enablement-scouting-platform-using-ml/blob/main/backend/server.cjs) (Express API), [`app/src/context/AuthContext.tsx`](https://github.com/curious9rahul/athnexus-smart-athlete-enablement-scouting-platform-using-ml/blob/main/app/src/context/AuthContext.tsx) (Session and profile state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_app["App routing<br/>[App.tsx]"]
end

subgraph group_identity["Identity and profiles"]
  node_authui["Sign-in and signup<br/>[AuthPage.tsx]"]
  node_authstate["Session and profile state<br/>[AuthContext.tsx]"]
  node_authapi["Authentication API<br/>[auth.js]"]
  node_users[("User records<br/>[User.js]")]
  node_profile["Athlete profile<br/>[ProfileForm.tsx]"]
end

subgraph group_events["Events and review"]
  node_eventshook["Event operations<br/>[useEvents.ts]"]
  node_registration["Event registration form"]
  node_eventpages["Event discovery and details<br/>[EventPage.tsx]"]
  node_athletedash["Athlete dashboard<br/>[EventsPage.tsx]"]
  node_verifierdash["Verifier event review"]
  node_regreview["Registration review"]
  node_admin["User administration"]
end

subgraph group_scouting["Scouting and insights"]
  node_rankui["Smart ranking"]
  node_athletedata["Athlete dataset access<br/>[useAthletes.ts]"]
  node_analytics["Event analytics<br/>[Analytics.tsx]"]
end

subgraph group_services["Platform services"]
  node_api["Express API<br/>[server.cjs]"]
  node_mlroutes["ML endpoints<br/>[ml.js]"]
  node_inference["Selection inference<br/>[inference_api.py]"]
  node_emailer["Email notifications<br/>[server.cjs]"]
end

node_athlete(("Athlete"))
node_verifier(("Verifier"))
node_emailservice["Resend email service"]

node_athlete -->|"uses"| node_app
node_verifier -->|"uses"| node_app
node_app -->|"routes to"| node_authui
node_app -->|"provides session"| node_authstate
node_app -->|"routes to"| node_eventpages
node_app -->|"routes to"| node_athletedash
node_app -->|"routes to"| node_verifierdash
node_athlete -->|"signs in"| node_authui
node_authui -->|"authenticates"| node_authstate
node_authstate -->|"requests session"| node_authapi
node_authapi -->|"reads and updates"| node_users
node_athlete -->|"completes profile"| node_profile
node_profile -->|"updates profile"| node_authstate
node_eventpages -->|"loads events"| node_eventshook
node_athletedash -->|"loads events"| node_eventshook
node_athlete -->|"submits details"| node_registration
node_registration -->|"registers athlete"| node_eventshook
node_eventshook -->|"requests event actions"| node_api
node_verifierdash -->|"reviews events"| node_eventshook
node_regreview -->|"reviews registrations"| node_eventshook
node_eventshook -->|"sends review actions"| node_api
node_admin -->|"manages users"| node_api
node_api -->|"mounts auth routes"| node_authapi
node_api -->|"mounts ML routes"| node_mlroutes
node_rankui -.->|"requests ranking"| node_mlroutes
node_mlroutes -.->|"invokes inference"| node_inference
node_rankui -->|"loads athlete data"| node_athletedata
node_athletedash -->|"opens analytics"| node_analytics
node_api -->|"handles email endpoints"| node_emailer
node_emailer -.->|"sends mail"| node_emailservice

click node_app "https://github.com/curious9rahul/athnexus-smart-athlete-enablement-scouting-platform-using-ml/blob/main/app/src/App.tsx"
click node_authui "https://github.com/curious9rahul/athnexus-smart-athlete-enablement-scouting-platform-using-ml/blob/main/app/src/pages/AuthPage.tsx"
click node_authstate "https://github.com/curious9rahul/athnexus-smart-athlete-enablement-scouting-platform-using-ml/blob/main/app/src/context/AuthContext.tsx"
click node_authapi "https://github.com/curious9rahul/athnexus-smart-athlete-enablement-scouting-platform-using-ml/blob/main/backend/routes/auth.js"
click node_users "https://github.com/curious9rahul/athnexus-smart-athlete-enablement-scouting-platform-using-ml/blob/main/backend/models/User.js"
click node_profile "https://github.com/curious9rahul/athnexus-smart-athlete-enablement-scouting-platform-using-ml/blob/main/app/src/pages/ProfileForm.tsx"
click node_eventshook "https://github.com/curious9rahul/athnexus-smart-athlete-enablement-scouting-platform-using-ml/blob/main/app/src/hooks/useEvents.ts"
click node_registration "https://github.com/curious9rahul/athnexus-smart-athlete-enablement-scouting-platform-using-ml/blob/main/app/src/components/RegistrationFormModal.tsx"
click node_eventpages "https://github.com/curious9rahul/athnexus-smart-athlete-enablement-scouting-platform-using-ml/blob/main/app/src/pages/dashboard/events/pages/EventPage.tsx"
click node_athletedash "https://github.com/curious9rahul/athnexus-smart-athlete-enablement-scouting-platform-using-ml/blob/main/app/src/pages/dashboard/EventsPage.tsx"
click node_verifierdash "https://github.com/curious9rahul/athnexus-smart-athlete-enablement-scouting-platform-using-ml/blob/main/app/src/pages/verifier/EventApprovalPage.tsx"
click node_regreview "https://github.com/curious9rahul/athnexus-smart-athlete-enablement-scouting-platform-using-ml/blob/main/app/src/pages/verifier/RegistrationApprovalPage.tsx"
click node_admin "https://github.com/curious9rahul/athnexus-smart-athlete-enablement-scouting-platform-using-ml/blob/main/app/src/pages/verifier/UserManagementPage.tsx"
click node_rankui "https://github.com/curious9rahul/athnexus-smart-athlete-enablement-scouting-platform-using-ml/blob/main/app/src/pages/verifier/SmartRankingPage.tsx"
click node_athletedata "https://github.com/curious9rahul/athnexus-smart-athlete-enablement-scouting-platform-using-ml/blob/main/app/src/hooks/useAthletes.ts"
click node_analytics "https://github.com/curious9rahul/athnexus-smart-athlete-enablement-scouting-platform-using-ml/blob/main/app/src/pages/dashboard/Analytics.tsx"
click node_api "https://github.com/curious9rahul/athnexus-smart-athlete-enablement-scouting-platform-using-ml/blob/main/backend/server.cjs"
click node_mlroutes "https://github.com/curious9rahul/athnexus-smart-athlete-enablement-scouting-platform-using-ml/blob/main/backend/routes/ml.js"
click node_inference "https://github.com/curious9rahul/athnexus-smart-athlete-enablement-scouting-platform-using-ml/blob/main/backend/ml/inference_api.py"
click node_emailer "https://github.com/curious9rahul/athnexus-smart-athlete-enablement-scouting-platform-using-ml/blob/main/backend/server.cjs"

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_app toneBlue
class node_authui,node_authstate,node_authapi,node_users,node_profile toneAmber
class node_eventshook,node_registration,node_eventpages,node_athletedash,node_verifierdash,node_regreview,node_admin toneMint
class node_rankui,node_athletedata,node_analytics toneRose
class node_api,node_mlroutes,node_inference,node_emailer,node_athlete,node_verifier,node_emailservice toneIndigo
```

## Components

### Web application

- [App routing](https://github.com/curious9rahul/athnexus-smart-athlete-enablement-scouting-platform-using-ml/blob/main/app/src/App.tsx): `app/src/App.tsx`

### Identity and profiles

- [Sign-in and signup](https://github.com/curious9rahul/athnexus-smart-athlete-enablement-scouting-platform-using-ml/blob/main/app/src/pages/AuthPage.tsx): `app/src/pages/AuthPage.tsx`
- [Session and profile state](https://github.com/curious9rahul/athnexus-smart-athlete-enablement-scouting-platform-using-ml/blob/main/app/src/context/AuthContext.tsx): `app/src/context/AuthContext.tsx`
- [Authentication API](https://github.com/curious9rahul/athnexus-smart-athlete-enablement-scouting-platform-using-ml/blob/main/backend/routes/auth.js): `backend/routes/auth.js`
- [User records](https://github.com/curious9rahul/athnexus-smart-athlete-enablement-scouting-platform-using-ml/blob/main/backend/models/User.js): `backend/models/User.js`
- [Athlete profile](https://github.com/curious9rahul/athnexus-smart-athlete-enablement-scouting-platform-using-ml/blob/main/app/src/pages/ProfileForm.tsx): `app/src/pages/ProfileForm.tsx`

### Events and review

- [Event operations](https://github.com/curious9rahul/athnexus-smart-athlete-enablement-scouting-platform-using-ml/blob/main/app/src/hooks/useEvents.ts): `app/src/hooks/useEvents.ts`
- [Event registration form](https://github.com/curious9rahul/athnexus-smart-athlete-enablement-scouting-platform-using-ml/blob/main/app/src/components/RegistrationFormModal.tsx): `app/src/components/RegistrationFormModal.tsx`
- [Event discovery and details](https://github.com/curious9rahul/athnexus-smart-athlete-enablement-scouting-platform-using-ml/blob/main/app/src/pages/dashboard/events/pages/EventPage.tsx): `app/src/pages/dashboard/events/pages/EventPage.tsx`
- [Athlete dashboard](https://github.com/curious9rahul/athnexus-smart-athlete-enablement-scouting-platform-using-ml/blob/main/app/src/pages/dashboard/EventsPage.tsx): `app/src/pages/dashboard/EventsPage.tsx`
- [Verifier event review](https://github.com/curious9rahul/athnexus-smart-athlete-enablement-scouting-platform-using-ml/blob/main/app/src/pages/verifier/EventApprovalPage.tsx): `app/src/pages/verifier/EventApprovalPage.tsx`
- [Registration review](https://github.com/curious9rahul/athnexus-smart-athlete-enablement-scouting-platform-using-ml/blob/main/app/src/pages/verifier/RegistrationApprovalPage.tsx): `app/src/pages/verifier/RegistrationApprovalPage.tsx`
- [User administration](https://github.com/curious9rahul/athnexus-smart-athlete-enablement-scouting-platform-using-ml/blob/main/app/src/pages/verifier/UserManagementPage.tsx): `app/src/pages/verifier/UserManagementPage.tsx`

### Scouting and insights

- [Smart ranking](https://github.com/curious9rahul/athnexus-smart-athlete-enablement-scouting-platform-using-ml/blob/main/app/src/pages/verifier/SmartRankingPage.tsx): `app/src/pages/verifier/SmartRankingPage.tsx`
- [Athlete dataset access](https://github.com/curious9rahul/athnexus-smart-athlete-enablement-scouting-platform-using-ml/blob/main/app/src/hooks/useAthletes.ts): `app/src/hooks/useAthletes.ts`
- [Event analytics](https://github.com/curious9rahul/athnexus-smart-athlete-enablement-scouting-platform-using-ml/blob/main/app/src/pages/dashboard/Analytics.tsx): `app/src/pages/dashboard/Analytics.tsx`

### Platform services

- [Express API](https://github.com/curious9rahul/athnexus-smart-athlete-enablement-scouting-platform-using-ml/blob/main/backend/server.cjs): `backend/server.cjs`
- [ML endpoints](https://github.com/curious9rahul/athnexus-smart-athlete-enablement-scouting-platform-using-ml/blob/main/backend/routes/ml.js): `backend/routes/ml.js`
- [Selection inference](https://github.com/curious9rahul/athnexus-smart-athlete-enablement-scouting-platform-using-ml/blob/main/backend/ml/inference_api.py): `backend/ml/inference_api.py`
- [Email notifications](https://github.com/curious9rahul/athnexus-smart-athlete-enablement-scouting-platform-using-ml/blob/main/backend/server.cjs): `backend/server.cjs`

### Other components

- **Athlete**
- **Verifier**
- **Resend email service**

## Connections

- Athlete → App routing: uses
- Verifier → App routing: uses
- App routing → Sign-in and signup: routes to
- App routing → Session and profile state: provides session
- App routing → Event discovery and details: routes to
- App routing → Athlete dashboard: routes to
- App routing → Verifier event review: routes to
- Athlete → Sign-in and signup: signs in
- Sign-in and signup → Session and profile state: authenticates
- Session and profile state → Authentication API: requests session
- Authentication API → User records: reads and updates
- Athlete → Athlete profile: completes profile
- Athlete profile → Session and profile state: updates profile
- Event discovery and details → Event operations: loads events
- Athlete dashboard → Event operations: loads events
- Athlete → Event registration form: submits details
- Event registration form → Event operations: registers athlete
- Event operations → Express API: requests event actions
- Verifier event review → Event operations: reviews events
- Registration review → Event operations: reviews registrations
- Event operations → Express API: sends review actions
- User administration → Express API: manages users
- Express API → Authentication API: mounts auth routes
- Express API → ML endpoints: mounts ML routes
- Smart ranking → ML endpoints: requests ranking
- ML endpoints → Selection inference: invokes inference
- Smart ranking → Athlete dataset access: loads athlete data
- Athlete dashboard → Event analytics: opens analytics
- Express API → Email notifications: handles email endpoints
- Email notifications → Resend email service: sends mail
