# msvivekranjan/geekai architecture

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

- Interactive diagram: https://gitdiagram.com/msvivekranjan/geekai
- Repository: https://github.com/msvivekranjan/geekai

## Overview

GeekAI is a multi-event registration and attendance platform. The main workflow runs from event setup and dynamic form configuration, through participant registration, optional payment, QR ticketing, and staff check-in, with administration and exports supporting event operations. The graph includes the documented offline attendance sync and storage capabilities. Evidence is limited to the README and indexed excerpts; links for unsampled feature implementations are shown only where the README documents the relationship.

Main entry points: [`backend/app/main.py`](https://github.com/msvivekranjan/geekai/blob/v3.0/backend/app/main.py) (FastAPI application), [`frontend/src/api/client.js`](https://github.com/msvivekranjan/geekai/blob/v3.0/frontend/src/api/client.js) (API client), [`backend/app/api/participants.py`](https://github.com/msvivekranjan/geekai/blob/v3.0/backend/app/api/participants.py) (Participant registration), [`backend/app/models/models.py`](https://github.com/msvivekranjan/geekai/blob/v3.0/backend/app/models/models.py) (Domain models)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_webapp["Web routes<br/>[App.jsx]"]
  node_registration["Event registration<br/>[EventRegister.jsx]"]
  node_success["Registration result<br/>[EventSuccess.jsx]"]
  node_authstate["Login state<br/>[AuthContext.jsx]"]
  node_api_client["API client<br/>[client.js]"]
  node_event_admin["Event administration"]
  node_session_admin["Session management<br/>[Sessions.jsx]"]
  node_volunteer_tools["Check-in tools<br/>[QRScanner.jsx]"]
end

subgraph group_setup["Event setup"]
  node_super_admin_ui["Event editor<br/>[EventEditor.jsx]"]
  node_form_builder["Dynamic form builder<br/>[FormBuilder.jsx]"]
  node_super_api["Event configuration API<br/>[super_admin.py]"]
end

subgraph group_operations["Registration operations"]
  node_participant_api["Participant registration<br/>[participants.py]"]
  node_payment_api["Payment orders<br/>[payments.py]"]
  node_attendance_api["Attendance and offline sync<br/>[attendance.py]"]
  node_admin_api["Event operations API<br/>[admin.py]"]
  node_session_api["Session API<br/>[sessions.py]"]
  node_event_api["Public event details<br/>[events.py]"]
  node_storage_api["Storage API<br/>[storage.py]"]
  node_offline_api["Offline sync API<br/>[offline_sync.py]"]
end

subgraph group_backend["API and access"]
  node_api_app["FastAPI application<br/>[main.py]"]
  node_auth_api["Authentication<br/>[auth.py]"]
  node_deps["Access and DB sessions<br/>[deps.py]"]
  node_security["JWT security<br/>[security.py]"]
  node_schemas["API schemas<br/>[schemas.py]"]
end

subgraph group_data["Persistence and integrations"]
  node_models["Domain models<br/>[models.py]"]
  node_audit["Audit logging<br/>[audit.py]"]
  node_qr["QR ticket service<br/>[qr_service.py]"]
  node_email["Email delivery<br/>[email_service.py]"]
  node_storage_service["Object storage<br/>[storage_service.py]"]
  node_database[("PostgreSQL")]
end

node_attendee(("Attendee"))
node_staff(("Event staff"))
node_superuser(("Super admin"))
node_r2[("Cloudflare R2")]

node_attendee -->|"submits details"| node_registration
node_registration -->|"requests API"| node_api_client
node_api_client -.->|"sends API calls"| node_api_app
node_api_app -->|"routes requests"| node_participant_api
node_api_app -->|"routes requests"| node_auth_api
node_api_app -->|"routes requests"| node_payment_api
node_api_app -->|"routes requests"| node_attendance_api
node_api_app -->|"routes requests"| node_admin_api
node_api_app -->|"routes requests"| node_session_api
node_api_app -->|"routes requests"| node_super_api
node_api_app -->|"routes requests"| node_event_api
node_api_app -->|"routes requests"| node_storage_api
node_api_app -->|"routes requests"| node_offline_api
node_authstate -->|"logs in through"| node_api_client
node_api_client -.->|"login request"| node_auth_api
node_auth_api -->|"uses access dependencies"| node_deps
node_deps -->|"decodes token"| node_security
node_deps -->|"loads user"| node_models
node_superuser -->|"configures events"| node_super_admin_ui
node_super_admin_ui -->|"calls API"| node_api_client
node_form_builder -->|"calls API"| node_api_client
node_api_client -.->|"event configuration"| node_super_api
node_api_client -.->|"loads event form"| node_event_api
node_participant_api -->|"creates payment order"| node_payment_api
node_participant_api -->|"generates ticket"| node_qr
node_participant_api -->|"sends ticket"| node_email
node_participant_api -->|"uses stored uploads"| node_storage_service
node_payment_api -.->|"records payment state"| node_models
node_payment_api -.->|"confirms registration"| node_attendee
node_success -.->|"shows outcome"| node_attendee
node_staff -->|"manages participants"| node_event_admin
node_event_admin -->|"calls API"| node_api_client
node_staff -->|"manages sessions"| node_session_admin
node_session_admin -->|"CRUD requests"| node_session_api
node_staff -->|"checks in guests"| node_volunteer_tools
node_volunteer_tools -->|"calls API"| node_api_client
node_api_client -.->|"attendance requests"| node_attendance_api
node_attendance_api -.->|"records attendance"| node_models
node_offline_api -.->|"syncs attendance"| node_models
node_admin_api -->|"writes audit records"| node_audit
node_session_api -->|"writes audit records"| node_audit
node_participant_api -->|"writes audit records"| node_audit
node_storage_api -->|"deletes objects"| node_storage_service
node_storage_api -.->|"presigned upload"| node_r2
node_storage_service -.->|"reads and writes"| node_r2
node_deps -->|"opens DB sessions"| node_database
node_participant_api -.->|"reads and writes"| node_database
node_models -->|"maps domain tables"| node_database

click node_webapp "https://github.com/msvivekranjan/geekai/blob/v3.0/frontend/src/App.jsx"
click node_registration "https://github.com/msvivekranjan/geekai/blob/v3.0/frontend/src/pages/EventRegister.jsx"
click node_success "https://github.com/msvivekranjan/geekai/blob/v3.0/frontend/src/pages/EventSuccess.jsx"
click node_authstate "https://github.com/msvivekranjan/geekai/blob/v3.0/frontend/src/context/AuthContext.jsx"
click node_api_client "https://github.com/msvivekranjan/geekai/blob/v3.0/frontend/src/api/client.js"
click node_event_admin "https://github.com/msvivekranjan/geekai/blob/v3.0/frontend/src/pages/admin/ParticipantDetail.jsx"
click node_session_admin "https://github.com/msvivekranjan/geekai/blob/v3.0/frontend/src/pages/admin/Sessions.jsx"
click node_volunteer_tools "https://github.com/msvivekranjan/geekai/blob/v3.0/frontend/src/pages/volunteer/QRScanner.jsx"
click node_super_admin_ui "https://github.com/msvivekranjan/geekai/blob/v3.0/frontend/src/pages/super-admin/EventEditor.jsx"
click node_form_builder "https://github.com/msvivekranjan/geekai/blob/v3.0/frontend/src/pages/super-admin/FormBuilder.jsx"
click node_api_app "https://github.com/msvivekranjan/geekai/blob/v3.0/backend/app/main.py"
click node_auth_api "https://github.com/msvivekranjan/geekai/blob/v3.0/backend/app/api/auth.py"
click node_participant_api "https://github.com/msvivekranjan/geekai/blob/v3.0/backend/app/api/participants.py"
click node_payment_api "https://github.com/msvivekranjan/geekai/blob/v3.0/backend/app/api/payments.py"
click node_attendance_api "https://github.com/msvivekranjan/geekai/blob/v3.0/backend/app/api/attendance.py"
click node_admin_api "https://github.com/msvivekranjan/geekai/blob/v3.0/backend/app/api/admin.py"
click node_session_api "https://github.com/msvivekranjan/geekai/blob/v3.0/backend/app/api/sessions.py"
click node_super_api "https://github.com/msvivekranjan/geekai/blob/v3.0/backend/app/api/super_admin.py"
click node_event_api "https://github.com/msvivekranjan/geekai/blob/v3.0/backend/app/api/events.py"
click node_storage_api "https://github.com/msvivekranjan/geekai/blob/v3.0/backend/app/api/storage.py"
click node_offline_api "https://github.com/msvivekranjan/geekai/blob/v3.0/backend/app/api/offline_sync.py"
click node_deps "https://github.com/msvivekranjan/geekai/blob/v3.0/backend/app/core/deps.py"
click node_security "https://github.com/msvivekranjan/geekai/blob/v3.0/backend/app/core/security.py"
click node_schemas "https://github.com/msvivekranjan/geekai/blob/v3.0/backend/app/schemas/schemas.py"
click node_models "https://github.com/msvivekranjan/geekai/blob/v3.0/backend/app/models/models.py"
click node_audit "https://github.com/msvivekranjan/geekai/blob/v3.0/backend/app/services/audit.py"
click node_qr "https://github.com/msvivekranjan/geekai/blob/v3.0/backend/app/services/qr_service.py"
click node_email "https://github.com/msvivekranjan/geekai/blob/v3.0/backend/app/services/email_service.py"
click node_storage_service "https://github.com/msvivekranjan/geekai/blob/v3.0/backend/app/services/storage_service.py"

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_webapp,node_registration,node_success,node_authstate,node_api_client,node_event_admin,node_session_admin,node_volunteer_tools toneBlue
class node_super_admin_ui,node_form_builder,node_super_api,node_r2 toneAmber
class node_participant_api,node_payment_api,node_attendance_api,node_admin_api,node_session_api,node_event_api,node_storage_api,node_offline_api toneMint
class node_api_app,node_auth_api,node_deps,node_security,node_schemas toneRose
class node_models,node_audit,node_qr,node_email,node_storage_service,node_database,node_attendee,node_staff,node_superuser toneIndigo
```

## Components

### Web experience

- [Web routes](https://github.com/msvivekranjan/geekai/blob/v3.0/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Event registration](https://github.com/msvivekranjan/geekai/blob/v3.0/frontend/src/pages/EventRegister.jsx): `frontend/src/pages/EventRegister.jsx`
- [Registration result](https://github.com/msvivekranjan/geekai/blob/v3.0/frontend/src/pages/EventSuccess.jsx): `frontend/src/pages/EventSuccess.jsx`
- [Login state](https://github.com/msvivekranjan/geekai/blob/v3.0/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`
- [API client](https://github.com/msvivekranjan/geekai/blob/v3.0/frontend/src/api/client.js): `frontend/src/api/client.js`
- [Event administration](https://github.com/msvivekranjan/geekai/blob/v3.0/frontend/src/pages/admin/ParticipantDetail.jsx): `frontend/src/pages/admin/ParticipantDetail.jsx`
- [Session management](https://github.com/msvivekranjan/geekai/blob/v3.0/frontend/src/pages/admin/Sessions.jsx): `frontend/src/pages/admin/Sessions.jsx`
- [Check-in tools](https://github.com/msvivekranjan/geekai/blob/v3.0/frontend/src/pages/volunteer/QRScanner.jsx): `frontend/src/pages/volunteer/QRScanner.jsx`

### Event setup

- [Event editor](https://github.com/msvivekranjan/geekai/blob/v3.0/frontend/src/pages/super-admin/EventEditor.jsx): `frontend/src/pages/super-admin/EventEditor.jsx`
- [Dynamic form builder](https://github.com/msvivekranjan/geekai/blob/v3.0/frontend/src/pages/super-admin/FormBuilder.jsx): `frontend/src/pages/super-admin/FormBuilder.jsx`
- [Event configuration API](https://github.com/msvivekranjan/geekai/blob/v3.0/backend/app/api/super_admin.py): `backend/app/api/super_admin.py`

### Registration operations

- [Participant registration](https://github.com/msvivekranjan/geekai/blob/v3.0/backend/app/api/participants.py): `backend/app/api/participants.py`
- [Payment orders](https://github.com/msvivekranjan/geekai/blob/v3.0/backend/app/api/payments.py): `backend/app/api/payments.py`
- [Attendance and offline sync](https://github.com/msvivekranjan/geekai/blob/v3.0/backend/app/api/attendance.py): `backend/app/api/attendance.py`
- [Event operations API](https://github.com/msvivekranjan/geekai/blob/v3.0/backend/app/api/admin.py): `backend/app/api/admin.py`
- [Session API](https://github.com/msvivekranjan/geekai/blob/v3.0/backend/app/api/sessions.py): `backend/app/api/sessions.py`
- [Public event details](https://github.com/msvivekranjan/geekai/blob/v3.0/backend/app/api/events.py): `backend/app/api/events.py`
- [Storage API](https://github.com/msvivekranjan/geekai/blob/v3.0/backend/app/api/storage.py): `backend/app/api/storage.py`
- [Offline sync API](https://github.com/msvivekranjan/geekai/blob/v3.0/backend/app/api/offline_sync.py): `backend/app/api/offline_sync.py`

### API and access

- [FastAPI application](https://github.com/msvivekranjan/geekai/blob/v3.0/backend/app/main.py): `backend/app/main.py`
- [Authentication](https://github.com/msvivekranjan/geekai/blob/v3.0/backend/app/api/auth.py): `backend/app/api/auth.py`
- [Access and DB sessions](https://github.com/msvivekranjan/geekai/blob/v3.0/backend/app/core/deps.py): `backend/app/core/deps.py`
- [JWT security](https://github.com/msvivekranjan/geekai/blob/v3.0/backend/app/core/security.py): `backend/app/core/security.py`
- [API schemas](https://github.com/msvivekranjan/geekai/blob/v3.0/backend/app/schemas/schemas.py): `backend/app/schemas/schemas.py`

### Persistence and integrations

- [Domain models](https://github.com/msvivekranjan/geekai/blob/v3.0/backend/app/models/models.py): `backend/app/models/models.py`
- [Audit logging](https://github.com/msvivekranjan/geekai/blob/v3.0/backend/app/services/audit.py): `backend/app/services/audit.py`
- [QR ticket service](https://github.com/msvivekranjan/geekai/blob/v3.0/backend/app/services/qr_service.py): `backend/app/services/qr_service.py`
- [Email delivery](https://github.com/msvivekranjan/geekai/blob/v3.0/backend/app/services/email_service.py): `backend/app/services/email_service.py`
- [Object storage](https://github.com/msvivekranjan/geekai/blob/v3.0/backend/app/services/storage_service.py): `backend/app/services/storage_service.py`
- **PostgreSQL**

### Other components

- **Attendee**
- **Event staff**
- **Super admin**
- **Cloudflare R2**

## Connections

- Attendee → Event registration: submits details
- Event registration → API client: requests API (evidence: `frontend/src/pages/EventRegister.jsx`)
- API client → FastAPI application: sends API calls
- FastAPI application → Participant registration: routes requests (evidence: `backend/app/main.py`)
- FastAPI application → Authentication: routes requests (evidence: `backend/app/main.py`)
- FastAPI application → Payment orders: routes requests (evidence: `backend/app/main.py`)
- FastAPI application → Attendance and offline sync: routes requests (evidence: `backend/app/main.py`)
- FastAPI application → Event operations API: routes requests (evidence: `backend/app/main.py`)
- FastAPI application → Session API: routes requests (evidence: `backend/app/main.py`)
- FastAPI application → Event configuration API: routes requests (evidence: `backend/app/main.py`)
- FastAPI application → Public event details: routes requests (evidence: `backend/app/main.py`)
- FastAPI application → Storage API: routes requests (evidence: `backend/app/main.py`)
- FastAPI application → Offline sync API: routes requests (evidence: `backend/app/main.py`)
- Login state → API client: logs in through (evidence: `frontend/src/context/AuthContext.jsx`)
- API client → Authentication: login request
- Authentication → Access and DB sessions: uses access dependencies (evidence: `backend/app/api/auth.py`)
- Access and DB sessions → JWT security: decodes token (evidence: `backend/app/core/deps.py`)
- Access and DB sessions → Domain models: loads user (evidence: `backend/app/core/deps.py`)
- Super admin → Event editor: configures events
- Event editor → API client: calls API (evidence: `frontend/src/pages/super-admin/EventEditor.jsx`)
- Dynamic form builder → API client: calls API (evidence: `frontend/src/pages/super-admin/FormBuilder.jsx`)
- API client → Event configuration API: event configuration
- API client → Public event details: loads event form
- Participant registration → Payment orders: creates payment order (evidence: `backend/app/api/participants.py`)
- Participant registration → QR ticket service: generates ticket (evidence: `backend/app/api/participants.py`)
- Participant registration → Email delivery: sends ticket (evidence: `backend/app/api/participants.py`)
- Participant registration → Object storage: uses stored uploads (evidence: `backend/app/api/participants.py`)
- Payment orders → Domain models: records payment state
- Payment orders → Attendee: confirms registration
- Registration result → Attendee: shows outcome
- Event staff → Event administration: manages participants
- Event administration → API client: calls API (evidence: `frontend/src/pages/admin/ParticipantDetail.jsx`)
- Event staff → Session management: manages sessions
- Session management → Session API: CRUD requests (evidence: `frontend/src/pages/admin/Sessions.jsx`)
- Event staff → Check-in tools: checks in guests
- Check-in tools → API client: calls API (evidence: `frontend/src/pages/volunteer/QRScanner.jsx`)
- API client → Attendance and offline sync: attendance requests
- Attendance and offline sync → Domain models: records attendance
- Offline sync API → Domain models: syncs attendance
- Event operations API → Audit logging: writes audit records (evidence: `backend/app/api/admin.py`)
- Session API → Audit logging: writes audit records (evidence: `backend/app/api/sessions.py`)
- Participant registration → Audit logging: writes audit records (evidence: `backend/app/api/participants.py`)
- Storage API → Object storage: deletes objects (evidence: `backend/app/api/storage.py`)
- Storage API → Cloudflare R2: presigned upload
- Object storage → Cloudflare R2: reads and writes
- Access and DB sessions → PostgreSQL: opens DB sessions (evidence: `backend/app/core/deps.py`)
- Participant registration → PostgreSQL: reads and writes
- Domain models → PostgreSQL: maps domain tables (evidence: `backend/app/models/models.py`)
