# shuganchauhan/game-ansh_ap_2026 architecture

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

- Interactive diagram: https://gitdiagram.com/shuganchauhan/game-ansh_ap_2026
- Repository: https://github.com/shuganchauhan/game-ansh_ap_2026

## Overview

Gamers’G is a full-stack esports platform for players, organizations, tournament organizers, and administrators. The client presents onboarding, discovery, teams, social, recruitment, tournaments, dashboards, and admin workflows; its auth context handles account sessions through an API client. The Express API routes requests into domain modules, with authentication, authorization, validation, and PostgreSQL support. The README documents the React/Vite-to-Express/PostgreSQL architecture; unsampled feature internals and most client-to-endpoint mappings are not asserted here.

Main entry points: [`frontend/src/app/App.jsx`](https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/frontend/src/app/App.jsx) (Client app shell), [`Backend/src/shared/db/index.js`](https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/Backend/src/shared/db/index.js) (PostgreSQL access), [`Backend/src/app.js`](https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/Backend/src/app.js) (Express API app), [`frontend/src/features/auth/AuthModal.jsx`](https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/frontend/src/features/auth/AuthModal.jsx) (Sign-in and signup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client Experience"]
  node_app["Client app shell<br/>[App.jsx]"]
  node_authui["Sign-in and signup<br/>[AuthModal.jsx]"]
  node_authstate["Session context<br/>[authContext.jsx]"]
  node_api["API client<br/>[api.js]"]
  node_landing["Landing experience<br/>[LandingPage.jsx]"]
end

subgraph group_community["Player Community"]
  node_discoveryui["Discovery<br/>[DiscoveryPage.jsx]"]
  node_profileui["Player profiles"]
  node_socialui["Social feed<br/>[SocialFeedPage.jsx]"]
  node_chatui["Live chat<br/>[ChatDrawer.jsx]"]
end

subgraph group_competition["Competition Operations"]
  node_teamsui["Teams<br/>[TeamsPage.jsx]"]
  node_teamcreate["Team creation"]
  node_recruitui["Recruitment"]
  node_tournamentui["Tournaments"]
  node_scrimui["Scrim lobby<br/>[ScrimLobbyPage.jsx]"]
  node_dashboards["Role dashboards"]
  node_adminui["Admin portal"]
end

subgraph group_platform["API Platform"]
  node_serverapp["Express API app<br/>[app.js]"]
  node_authroutes["Authentication routes<br/>[auth.routes.js]"]
  node_authservice["Account service<br/>[auth.service.js]"]
  node_teamscontroller["Team operations"]
  node_tournamentcontroller["Tournament operations"]
  node_socialcontroller["Social operations"]
  node_recruitcontroller["Recruitment operations"]
  node_admincontroller["Admin operations"]
  node_db[("PostgreSQL access<br/>[index.js]")]
  node_middleware["Auth middleware<br/>[middleware.js]"]
  node_uploads["File uploads<br/>[uploads.routes.js]"]
end

node_user(("Platform users"))

node_user -->|"uses"| node_app
node_app -->|"renders"| node_landing
node_app -->|"renders"| node_authui
node_app -->|"routes to"| node_discoveryui
node_app -->|"routes to"| node_socialui
node_app -->|"routes to"| node_teamsui
node_app -->|"renders"| node_teamcreate
node_app -->|"routes to"| node_recruitui
node_app -->|"routes to"| node_tournamentui
node_app -->|"routes to"| node_scrimui
node_app -->|"routes to"| node_dashboards
node_app -->|"routes to"| node_adminui
node_authui -->|"uses"| node_authstate
node_authstate -->|"calls"| node_api
node_api -.->|"sends requests"| node_serverapp
node_serverapp -->|"mounts"| node_authroutes
node_serverapp -->|"mounts"| node_uploads
node_authroutes -->|"dispatches"| node_authservice
node_authservice -->|"queries"| node_db
node_serverapp -.->|"uses for routes"| node_middleware
node_teamscontroller -.->|"persists through"| node_db
node_tournamentcontroller -.->|"persists through"| node_db
node_socialcontroller -.->|"persists through"| node_db
node_recruitcontroller -.->|"persists through"| node_db
node_admincontroller -.->|"persists through"| node_db
node_teamsui -.->|"uses API"| node_teamscontroller
node_tournamentui -.->|"uses API"| node_tournamentcontroller
node_socialui -.->|"uses API"| node_socialcontroller
node_recruitui -.->|"uses API"| node_recruitcontroller
node_adminui -.->|"uses API"| node_admincontroller

click node_app "https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/frontend/src/app/App.jsx"
click node_authui "https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/frontend/src/features/auth/AuthModal.jsx"
click node_authstate "https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/frontend/src/stores/authContext.jsx"
click node_api "https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/frontend/src/lib/api.js"
click node_landing "https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/frontend/src/features/landing/LandingPage.jsx"
click node_discoveryui "https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/frontend/src/features/discovery/DiscoveryPage.jsx"
click node_profileui "https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/frontend/src/features/profile/PlayerProfilePage.jsx"
click node_socialui "https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/frontend/src/features/social/SocialFeedPage.jsx"
click node_chatui "https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/frontend/src/features/chat/ChatDrawer.jsx"
click node_teamsui "https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/frontend/src/features/teams/TeamsPage.jsx"
click node_teamcreate "https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/frontend/src/features/teams/TeamCreationModal.jsx"
click node_recruitui "https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/frontend/src/features/recruitment/ApplicationsPage.jsx"
click node_tournamentui "https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/frontend/src/features/tournaments/TournamentsPage.jsx"
click node_scrimui "https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/frontend/src/features/tournaments/ScrimLobbyPage.jsx"
click node_dashboards "https://github.com/shuganchauhan/game-ansh_ap_2026/tree/main/frontend/src/features/dashboard"
click node_adminui "https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/frontend/src/features/admin/AdminPortalPage.jsx"
click node_serverapp "https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/Backend/src/app.js"
click node_authroutes "https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/Backend/src/modules/auth/auth.routes.js"
click node_authservice "https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/Backend/src/modules/auth/auth.service.js"
click node_teamscontroller "https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/Backend/src/modules/teams/teams.controller.js"
click node_tournamentcontroller "https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/Backend/src/modules/tournaments/tournaments.controller.js"
click node_socialcontroller "https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/Backend/src/modules/social/social.controller.js"
click node_recruitcontroller "https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/Backend/src/modules/recruitment/recruitment.controller.js"
click node_admincontroller "https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/Backend/src/modules/admin/admin.controller.js"
click node_db "https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/Backend/src/shared/db/index.js"
click node_middleware "https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/Backend/src/shared/auth/middleware.js"
click node_uploads "https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/Backend/src/modules/uploads/uploads.routes.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_app,node_authui,node_authstate,node_api,node_landing,node_user toneBlue
class node_discoveryui,node_profileui,node_socialui,node_chatui toneAmber
class node_teamsui,node_teamcreate,node_recruitui,node_tournamentui,node_scrimui,node_dashboards,node_adminui toneMint
class node_serverapp,node_authroutes,node_authservice,node_teamscontroller,node_tournamentcontroller,node_socialcontroller,node_recruitcontroller,node_admincontroller,node_db,node_middleware,node_uploads toneRose
```

## Components

### Client Experience

- [Client app shell](https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/frontend/src/app/App.jsx): `frontend/src/app/App.jsx`
- [Sign-in and signup](https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/frontend/src/features/auth/AuthModal.jsx): `frontend/src/features/auth/AuthModal.jsx`
- [Session context](https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/frontend/src/stores/authContext.jsx): `frontend/src/stores/authContext.jsx`
- [API client](https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/frontend/src/lib/api.js): `frontend/src/lib/api.js`
- [Landing experience](https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/frontend/src/features/landing/LandingPage.jsx): `frontend/src/features/landing/LandingPage.jsx`

### Player Community

- [Discovery](https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/frontend/src/features/discovery/DiscoveryPage.jsx): `frontend/src/features/discovery/DiscoveryPage.jsx`
- [Player profiles](https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/frontend/src/features/profile/PlayerProfilePage.jsx): `frontend/src/features/profile/PlayerProfilePage.jsx`
- [Social feed](https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/frontend/src/features/social/SocialFeedPage.jsx): `frontend/src/features/social/SocialFeedPage.jsx`
- [Live chat](https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/frontend/src/features/chat/ChatDrawer.jsx): `frontend/src/features/chat/ChatDrawer.jsx`

### Competition Operations

- [Teams](https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/frontend/src/features/teams/TeamsPage.jsx): `frontend/src/features/teams/TeamsPage.jsx`
- [Team creation](https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/frontend/src/features/teams/TeamCreationModal.jsx): `frontend/src/features/teams/TeamCreationModal.jsx`
- [Recruitment](https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/frontend/src/features/recruitment/ApplicationsPage.jsx): `frontend/src/features/recruitment/ApplicationsPage.jsx`
- [Tournaments](https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/frontend/src/features/tournaments/TournamentsPage.jsx): `frontend/src/features/tournaments/TournamentsPage.jsx`
- [Scrim lobby](https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/frontend/src/features/tournaments/ScrimLobbyPage.jsx): `frontend/src/features/tournaments/ScrimLobbyPage.jsx`
- [Role dashboards](https://github.com/shuganchauhan/game-ansh_ap_2026/tree/main/frontend/src/features/dashboard): `frontend/src/features/dashboard`
- [Admin portal](https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/frontend/src/features/admin/AdminPortalPage.jsx): `frontend/src/features/admin/AdminPortalPage.jsx`

### API Platform

- [Express API app](https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/Backend/src/app.js): `Backend/src/app.js`
- [Authentication routes](https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/Backend/src/modules/auth/auth.routes.js): `Backend/src/modules/auth/auth.routes.js`
- [Account service](https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/Backend/src/modules/auth/auth.service.js): `Backend/src/modules/auth/auth.service.js`
- [Team operations](https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/Backend/src/modules/teams/teams.controller.js): `Backend/src/modules/teams/teams.controller.js`
- [Tournament operations](https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/Backend/src/modules/tournaments/tournaments.controller.js): `Backend/src/modules/tournaments/tournaments.controller.js`
- [Social operations](https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/Backend/src/modules/social/social.controller.js): `Backend/src/modules/social/social.controller.js`
- [Recruitment operations](https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/Backend/src/modules/recruitment/recruitment.controller.js): `Backend/src/modules/recruitment/recruitment.controller.js`
- [Admin operations](https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/Backend/src/modules/admin/admin.controller.js): `Backend/src/modules/admin/admin.controller.js`
- [PostgreSQL access](https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/Backend/src/shared/db/index.js): `Backend/src/shared/db/index.js`
- [Auth middleware](https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/Backend/src/shared/auth/middleware.js): `Backend/src/shared/auth/middleware.js`
- [File uploads](https://github.com/shuganchauhan/game-ansh_ap_2026/blob/main/Backend/src/modules/uploads/uploads.routes.js): `Backend/src/modules/uploads/uploads.routes.js`

### Other components

- **Platform users**

## Connections

- Platform users → Client app shell: uses (evidence: `frontend/src/app/App.jsx`)
- Client app shell → Landing experience: renders (evidence: `frontend/src/app/App.jsx`)
- Client app shell → Sign-in and signup: renders (evidence: `frontend/src/app/App.jsx`)
- Client app shell → Discovery: routes to (evidence: `frontend/src/app/App.jsx`)
- Client app shell → Social feed: routes to (evidence: `frontend/src/app/App.jsx`)
- Client app shell → Teams: routes to (evidence: `frontend/src/app/App.jsx`)
- Client app shell → Team creation: renders (evidence: `frontend/src/app/App.jsx`)
- Client app shell → Recruitment: routes to (evidence: `frontend/src/app/App.jsx`)
- Client app shell → Tournaments: routes to (evidence: `frontend/src/app/App.jsx`)
- Client app shell → Scrim lobby: routes to (evidence: `frontend/src/app/App.jsx`)
- Client app shell → Role dashboards: routes to (evidence: `frontend/src/app/App.jsx`)
- Client app shell → Admin portal: routes to (evidence: `frontend/src/app/App.jsx`)
- Sign-in and signup → Session context: uses (evidence: `frontend/src/features/auth/AuthModal.jsx`)
- Session context → API client: calls (evidence: `frontend/src/stores/authContext.jsx`)
- API client → Express API app: sends requests
- Express API app → Authentication routes: mounts (evidence: `Backend/src/app.js`)
- Express API app → File uploads: mounts (evidence: `Backend/src/app.js`)
- Authentication routes → Account service: dispatches (evidence: `Backend/src/modules/auth/auth.routes.js`)
- Account service → PostgreSQL access: queries (evidence: `Backend/src/modules/auth/auth.service.js`)
- Express API app → Auth middleware: uses for routes
- Team operations → PostgreSQL access: persists through
- Tournament operations → PostgreSQL access: persists through
- Social operations → PostgreSQL access: persists through
- Recruitment operations → PostgreSQL access: persists through
- Admin operations → PostgreSQL access: persists through
- Teams → Team operations: uses API
- Tournaments → Tournament operations: uses API
- Social feed → Social operations: uses API
- Recruitment → Recruitment operations: uses API
- Admin portal → Admin operations: uses API
