# ragavu1430/club-management-portal architecture

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

- Interactive diagram: https://gitdiagram.com/ragavu1430/club-management-portal
- Repository: https://github.com/ragavu1430/club-management-portal

## Overview

AI Frontier Club is a club portal for browsing activities and events, registering for events, and managing club operations. The client routes users to public pages and an admin console; its API adapter supports Supabase-backed operations and a conventional HTTP backend. On the backend, Express routes requests to domain controllers backed by SQLite, with email and Google Sheets integrations. Several client pages and backend controllers are represented at subsystem level where source was not sampled; those relationships are included only when supported by the README or source index.

Main entry points: [`client/src/App.tsx`](https://github.com/ragavu1430/club-management-portal/blob/main/client/src/App.tsx) (Route application), [`client/src/utils/api.ts`](https://github.com/ragavu1430/club-management-portal/blob/main/client/src/utils/api.ts) (API adapter), [`server/src/server.js`](https://github.com/ragavu1430/club-management-portal/blob/main/server/src/server.js) (Express API), [`server/src/config/db.js`](https://github.com/ragavu1430/club-management-portal/blob/main/server/src/config/db.js) (SQLite database)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Portal client"]
  node_app["Route application<br/>[App.tsx]"]
  node_layout["Shared layout<br/>[Layout.tsx]"]
  node_theme["Theme state<br/>[ThemeContext.tsx]"]
  node_visuals["Hero visuals"]
  node_api_adapter["API adapter<br/>[api.ts]"]
  node_supabase_service["Supabase operations<br/>[supabaseService.ts]"]
  node_supabase_config["Supabase config<br/>[supabase.ts]"]
end

subgraph group_features["Club features"]
  node_events["Events portal<br/>[Events.tsx]"]
  node_registration["Event registration"]
  node_admin["Admin console<br/>[Admin.tsx]"]
  node_team["Coordinator directory<br/>[Team.tsx]"]
  node_club_pages["Club pages<br/>[About.tsx]"]
  node_games["Games hub<br/>[Games.tsx]"]
end

subgraph group_backend["API backend"]
  node_api_server["Express API<br/>[server.js]"]
  node_auth["Authentication<br/>[auth.js]"]
  node_event_controller["Event operations<br/>[events.js]"]
  node_team_controller["Team operations<br/>[team.js]"]
  node_club_controller["Club operations<br/>[club.js]"]
  node_game_controller["Game operations<br/>[games.js]"]
  node_settings_controller["Settings operations<br/>[settings.js]"]
  node_sqlite[("SQLite database<br/>[db.js]")]
end

subgraph group_integrations["External services"]
  node_email_service["Email delivery<br/>[emailService.js]"]
  node_sheets_service["Sheets sync<br/>[googleSheets.js]"]
  node_confirmation_api["Confirmation endpoint"]
end

node_visitor(("Portal user"))
node_email_provider["Gmail SMTP"]
node_sheets_provider["Google Sheets"]

node_visitor -->|"opens"| node_app
node_app -->|"renders"| node_layout
node_app -->|"provides theme"| node_theme
node_layout -->|"renders"| node_visuals
node_app -->|"routes to"| node_events
node_app -->|"routes to"| node_team
node_app -->|"routes to"| node_club_pages
node_app -->|"routes to"| node_admin
node_app -->|"routes to"| node_games
node_events -->|"opens"| node_registration
node_events -->|"requests data"| node_api_adapter
node_registration -->|"submits registration"| node_api_adapter
node_admin -->|"manages portal"| node_api_adapter
node_team -->|"requests data"| node_api_adapter
node_club_pages -->|"requests data"| node_api_adapter
node_games -->|"requests data"| node_api_adapter
node_api_adapter -->|"delegates operations"| node_supabase_service
node_supabase_service -->|"uses client"| node_supabase_config
node_api_adapter -.->|"HTTP fallback"| node_api_server
node_api_server -->|"routes requests"| node_auth
node_api_server -->|"routes requests"| node_event_controller
node_api_server -->|"routes requests"| node_team_controller
node_api_server -->|"routes requests"| node_club_controller
node_api_server -->|"routes requests"| node_game_controller
node_api_server -->|"routes requests"| node_settings_controller
node_auth -->|"reads and writes"| node_sqlite
node_event_controller -->|"reads and writes"| node_sqlite
node_team_controller -->|"reads and writes"| node_sqlite
node_club_controller -->|"reads and writes"| node_sqlite
node_game_controller -->|"reads and writes"| node_sqlite
node_settings_controller -->|"reads and writes"| node_sqlite
node_event_controller -->|"sends notices"| node_email_service
node_settings_controller -->|"configures email"| node_email_service
node_settings_controller -->|"syncs sheets"| node_sheets_service
node_event_controller -->|"syncs event"| node_sheets_service
node_email_service -->|"reads club details"| node_sqlite
node_email_service -.->|"sends mail"| node_email_provider
node_sheets_service -.->|"syncs data"| node_sheets_provider

click node_app "https://github.com/ragavu1430/club-management-portal/blob/main/client/src/App.tsx"
click node_layout "https://github.com/ragavu1430/club-management-portal/blob/main/client/src/components/Layout.tsx"
click node_theme "https://github.com/ragavu1430/club-management-portal/blob/main/client/src/context/ThemeContext.tsx"
click node_visuals "https://github.com/ragavu1430/club-management-portal/blob/main/client/src/components/GlobalVideoBackground.tsx"
click node_events "https://github.com/ragavu1430/club-management-portal/blob/main/client/src/pages/Events.tsx"
click node_registration "https://github.com/ragavu1430/club-management-portal/blob/main/client/src/components/RegistrationModal.tsx"
click node_admin "https://github.com/ragavu1430/club-management-portal/blob/main/client/src/pages/Admin.tsx"
click node_team "https://github.com/ragavu1430/club-management-portal/blob/main/client/src/pages/Team.tsx"
click node_club_pages "https://github.com/ragavu1430/club-management-portal/blob/main/client/src/pages/About.tsx"
click node_games "https://github.com/ragavu1430/club-management-portal/blob/main/client/src/pages/Games.tsx"
click node_api_adapter "https://github.com/ragavu1430/club-management-portal/blob/main/client/src/utils/api.ts"
click node_supabase_service "https://github.com/ragavu1430/club-management-portal/blob/main/client/src/services/supabaseService.ts"
click node_supabase_config "https://github.com/ragavu1430/club-management-portal/blob/main/client/src/config/supabase.ts"
click node_api_server "https://github.com/ragavu1430/club-management-portal/blob/main/server/src/server.js"
click node_auth "https://github.com/ragavu1430/club-management-portal/blob/main/server/src/controllers/auth.js"
click node_event_controller "https://github.com/ragavu1430/club-management-portal/blob/main/server/src/controllers/events.js"
click node_team_controller "https://github.com/ragavu1430/club-management-portal/blob/main/server/src/controllers/team.js"
click node_club_controller "https://github.com/ragavu1430/club-management-portal/blob/main/server/src/controllers/club.js"
click node_game_controller "https://github.com/ragavu1430/club-management-portal/blob/main/server/src/controllers/games.js"
click node_settings_controller "https://github.com/ragavu1430/club-management-portal/blob/main/server/src/controllers/settings.js"
click node_sqlite "https://github.com/ragavu1430/club-management-portal/blob/main/server/src/config/db.js"
click node_email_service "https://github.com/ragavu1430/club-management-portal/blob/main/server/src/services/emailService.js"
click node_sheets_service "https://github.com/ragavu1430/club-management-portal/blob/main/server/src/services/googleSheets.js"
click node_confirmation_api "https://github.com/ragavu1430/club-management-portal/blob/main/api/send-confirmation.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_layout,node_theme,node_visuals,node_api_adapter,node_supabase_service,node_supabase_config,node_visitor toneBlue
class node_events,node_registration,node_admin,node_team,node_club_pages,node_games toneAmber
class node_api_server,node_auth,node_event_controller,node_team_controller,node_club_controller,node_game_controller,node_settings_controller,node_sqlite toneMint
class node_email_service,node_sheets_service,node_confirmation_api toneRose
class node_email_provider,node_sheets_provider toneIndigo
```

## Components

### Portal client

- [Route application](https://github.com/ragavu1430/club-management-portal/blob/main/client/src/App.tsx): `client/src/App.tsx`
- [Shared layout](https://github.com/ragavu1430/club-management-portal/blob/main/client/src/components/Layout.tsx): `client/src/components/Layout.tsx`
- [Theme state](https://github.com/ragavu1430/club-management-portal/blob/main/client/src/context/ThemeContext.tsx): `client/src/context/ThemeContext.tsx`
- [Hero visuals](https://github.com/ragavu1430/club-management-portal/blob/main/client/src/components/GlobalVideoBackground.tsx): `client/src/components/GlobalVideoBackground.tsx`
- [API adapter](https://github.com/ragavu1430/club-management-portal/blob/main/client/src/utils/api.ts): `client/src/utils/api.ts`
- [Supabase operations](https://github.com/ragavu1430/club-management-portal/blob/main/client/src/services/supabaseService.ts): `client/src/services/supabaseService.ts`
- [Supabase config](https://github.com/ragavu1430/club-management-portal/blob/main/client/src/config/supabase.ts): `client/src/config/supabase.ts`

### Club features

- [Events portal](https://github.com/ragavu1430/club-management-portal/blob/main/client/src/pages/Events.tsx): `client/src/pages/Events.tsx`
- [Event registration](https://github.com/ragavu1430/club-management-portal/blob/main/client/src/components/RegistrationModal.tsx): `client/src/components/RegistrationModal.tsx`
- [Admin console](https://github.com/ragavu1430/club-management-portal/blob/main/client/src/pages/Admin.tsx): `client/src/pages/Admin.tsx`
- [Coordinator directory](https://github.com/ragavu1430/club-management-portal/blob/main/client/src/pages/Team.tsx): `client/src/pages/Team.tsx`
- [Club pages](https://github.com/ragavu1430/club-management-portal/blob/main/client/src/pages/About.tsx): `client/src/pages/About.tsx`
- [Games hub](https://github.com/ragavu1430/club-management-portal/blob/main/client/src/pages/Games.tsx): `client/src/pages/Games.tsx`

### API backend

- [Express API](https://github.com/ragavu1430/club-management-portal/blob/main/server/src/server.js): `server/src/server.js`
- [Authentication](https://github.com/ragavu1430/club-management-portal/blob/main/server/src/controllers/auth.js): `server/src/controllers/auth.js`
- [Event operations](https://github.com/ragavu1430/club-management-portal/blob/main/server/src/controllers/events.js): `server/src/controllers/events.js`
- [Team operations](https://github.com/ragavu1430/club-management-portal/blob/main/server/src/controllers/team.js): `server/src/controllers/team.js`
- [Club operations](https://github.com/ragavu1430/club-management-portal/blob/main/server/src/controllers/club.js): `server/src/controllers/club.js`
- [Game operations](https://github.com/ragavu1430/club-management-portal/blob/main/server/src/controllers/games.js): `server/src/controllers/games.js`
- [Settings operations](https://github.com/ragavu1430/club-management-portal/blob/main/server/src/controllers/settings.js): `server/src/controllers/settings.js`
- [SQLite database](https://github.com/ragavu1430/club-management-portal/blob/main/server/src/config/db.js): `server/src/config/db.js`

### External services

- [Email delivery](https://github.com/ragavu1430/club-management-portal/blob/main/server/src/services/emailService.js): `server/src/services/emailService.js`
- [Sheets sync](https://github.com/ragavu1430/club-management-portal/blob/main/server/src/services/googleSheets.js): `server/src/services/googleSheets.js`
- [Confirmation endpoint](https://github.com/ragavu1430/club-management-portal/blob/main/api/send-confirmation.js): `api/send-confirmation.js`

### Other components

- **Portal user**
- **Gmail SMTP**
- **Google Sheets**

## Connections

- Portal user → Route application: opens (evidence: `client/src/App.tsx`)
- Route application → Shared layout: renders (evidence: `client/src/App.tsx`)
- Route application → Theme state: provides theme (evidence: `client/src/App.tsx`)
- Shared layout → Hero visuals: renders (evidence: `client/src/components/Layout.tsx`)
- Route application → Events portal: routes to (evidence: `client/src/App.tsx`)
- Route application → Coordinator directory: routes to (evidence: `client/src/App.tsx`)
- Route application → Club pages: routes to (evidence: `client/src/App.tsx`)
- Route application → Admin console: routes to (evidence: `client/src/App.tsx`)
- Route application → Games hub: routes to (evidence: `client/src/App.tsx`)
- Events portal → Event registration: opens (evidence: `client/src/pages/Events.tsx`)
- Events portal → API adapter: requests data (evidence: `client/src/pages/Events.tsx`)
- Event registration → API adapter: submits registration (evidence: `client/src/components/RegistrationModal.tsx`)
- Admin console → API adapter: manages portal (evidence: `client/src/pages/Admin.tsx`)
- Coordinator directory → API adapter: requests data (evidence: `client/src/pages/Team.tsx`)
- Club pages → API adapter: requests data (evidence: `client/src/pages/About.tsx`)
- Games hub → API adapter: requests data (evidence: `client/src/pages/Games.tsx`)
- API adapter → Supabase operations: delegates operations (evidence: `client/src/utils/api.ts`)
- Supabase operations → Supabase config: uses client (evidence: `client/src/services/supabaseService.ts`)
- API adapter → Express API: HTTP fallback (evidence: `client/src/utils/api.ts`)
- Express API → Authentication: routes requests (evidence: `server/src/server.js`)
- Express API → Event operations: routes requests (evidence: `server/src/server.js`)
- Express API → Team operations: routes requests (evidence: `server/src/server.js`)
- Express API → Club operations: routes requests (evidence: `server/src/server.js`)
- Express API → Game operations: routes requests (evidence: `server/src/server.js`)
- Express API → Settings operations: routes requests (evidence: `server/src/server.js`)
- Authentication → SQLite database: reads and writes (evidence: `server/src/controllers/auth.js`)
- Event operations → SQLite database: reads and writes (evidence: `server/src/controllers/events.js`)
- Team operations → SQLite database: reads and writes (evidence: `server/src/controllers/team.js`)
- Club operations → SQLite database: reads and writes (evidence: `server/src/controllers/club.js`)
- Game operations → SQLite database: reads and writes (evidence: `server/src/controllers/games.js`)
- Settings operations → SQLite database: reads and writes (evidence: `server/src/controllers/settings.js`)
- Event operations → Email delivery: sends notices (evidence: `server/src/controllers/events.js`)
- Settings operations → Email delivery: configures email (evidence: `server/src/controllers/settings.js`)
- Settings operations → Sheets sync: syncs sheets (evidence: `server/src/controllers/settings.js`)
- Event operations → Sheets sync: syncs event (evidence: `server/src/controllers/events.js`)
- Email delivery → SQLite database: reads club details (evidence: `server/src/services/emailService.js`)
- Email delivery → Gmail SMTP: sends mail
- Sheets sync → Google Sheets: syncs data
