# namandudhoria/rallygully_pulse architecture

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

- Interactive diagram: https://gitdiagram.com/namandudhoria/rallygully_pulse
- Repository: https://github.com/namandudhoria/rallygully_pulse

## Overview

RallyGully Pulse is an internal venue-operations and performance-intelligence system. Venue staff and HQ use the React dashboard to manage bookings, facility availability, payments, community and academy activity, configuration, and access; the FastAPI backend enforces permissions and applies business rules to persisted records. Analytics are recomputed from operational data and surfaced as portfolio and venue insights. The graph includes documented integrations and major UI capabilities, but several subsystems were not sampled in source, so uncertain implementation links are omitted.

Main entry points: [`backend/app/main.py`](https://github.com/namandudhoria/rallygully_pulse/blob/main/backend/app/main.py) (FastAPI application), [`frontend/src/App.jsx`](https://github.com/namandudhoria/rallygully_pulse/blob/main/frontend/src/App.jsx) (Pulse dashboard), [`backend/app/services/bookings.py`](https://github.com/namandudhoria/rallygully_pulse/blob/main/backend/app/services/bookings.py) (Booking lifecycle), [`backend/app/services/inventory.py`](https://github.com/namandudhoria/rallygully_pulse/blob/main/backend/app/services/inventory.py) (Availability ledger)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Operations dashboard"]
  node_app["Pulse dashboard<br/>[App.jsx]"]
  node_venueui["Venue operations<br/>[VenueDay.jsx]"]
  node_programui["Programs<br/>[Programs.jsx]"]
  node_analyticsui["Analytics<br/>[Analytics.jsx]"]
  node_portfolio["Portfolio<br/>[Portfolio.jsx]"]
  node_adminui["Configuration and admin<br/>[Admin.jsx]"]
  node_peopleui["People and access UI<br/>[People.jsx]"]
  node_apiclient["API client<br/>[api.js]"]
end

subgraph group_access["Identity and access"]
  node_auth["Sessions and tokens<br/>[auth.py]"]
  node_permissions["Role permissions<br/>[permissions.py]"]
  node_authroutes["Authentication API<br/>[auth_routes.py]"]
  node_peopleapi["People API<br/>[people.py]"]
end

subgraph group_operations["Venue operations"]
  node_venueapi["Venue API<br/>[venues.py]"]
  node_operationsapi["Operations API<br/>[operations.py]"]
  node_adminapi["Admin API<br/>[admin.py]"]
  node_booking["Booking lifecycle<br/>[bookings.py]"]
  node_activities["Community and academy<br/>[activities.py]"]
  node_inventory["Availability ledger<br/>[inventory.py]"]
end

subgraph group_insights["Performance intelligence"]
  node_analyticsapi["Analytics API"]
  node_analytics["Metrics and trends<br/>[analytics.py]"]
  node_anomaly["Anomaly insights<br/>[anomaly.py]"]
end

subgraph group_runtime["Runtime and integrations"]
  node_api["FastAPI application<br/>[main.py]"]
  node_models[("Operational records<br/>[models.py]")]
  node_database[("SQL database<br/>[db.py]")]
  node_scheduler["Scheduled jobs<br/>[scheduler.py]"]
  node_district["District booking source<br/>[district.py]"]
end

node_staff(("HQ and venue staff"))
node_whatsapp{{"WhatsApp Cloud API"}}
node_mail{{"Mail services"}}

node_staff -->|"uses"| node_app
node_app -->|"routes to"| node_venueui
node_app -->|"routes to"| node_programui
node_app -->|"routes to"| node_analyticsui
node_app -->|"routes to"| node_portfolio
node_app -->|"routes to"| node_adminui
node_app -->|"routes to"| node_peopleui
node_venueui -->|"requests data"| node_apiclient
node_programui -->|"requests data"| node_apiclient
node_adminui -->|"requests data"| node_apiclient
node_apiclient -.->|"calls API"| node_api
node_api -->|"mounts routes"| node_authroutes
node_api -->|"mounts routes"| node_venueapi
node_api -->|"mounts routes"| node_operationsapi
node_api -->|"mounts routes"| node_adminapi
node_api -->|"mounts routes"| node_analyticsapi
node_api -.->|"mounts routes"| node_peopleapi
node_authroutes -->|"uses sessions"| node_auth
node_authroutes -->|"checks access"| node_permissions
node_peopleapi -.->|"checks access"| node_permissions
node_venueapi -->|"checks access"| node_permissions
node_operationsapi -->|"checks access"| node_permissions
node_venueapi -->|"uses lifecycle"| node_booking
node_venueapi -->|"reads availability"| node_inventory
node_operationsapi -->|"uses lifecycle"| node_booking
node_operationsapi -->|"manages activities"| node_activities
node_booking -->|"allocates capacity"| node_inventory
node_activities -->|"allocates capacity"| node_inventory
node_adminapi -->|"manages ingestion"| node_district
node_adminapi -->|"updates records"| node_models
node_analyticsapi -->|"computes metrics"| node_analytics
node_analyticsapi -->|"requests insights"| node_anomaly
node_analytics -->|"reads capacity"| node_inventory
node_booking -->|"records bookings"| node_models
node_inventory -->|"records allocations"| node_models
node_models -->|"persists in"| node_database
node_api -->|"starts jobs"| node_scheduler
node_scheduler -.->|"polls source"| node_district
node_district -.->|"reads mailbox"| node_mail
node_booking -->|"sends updates"| node_whatsapp
node_scheduler -.->|"sends alerts"| node_mail

click node_app "https://github.com/namandudhoria/rallygully_pulse/blob/main/frontend/src/App.jsx"
click node_venueui "https://github.com/namandudhoria/rallygully_pulse/blob/main/frontend/src/pages/VenueDay.jsx"
click node_programui "https://github.com/namandudhoria/rallygully_pulse/blob/main/frontend/src/pages/Programs.jsx"
click node_analyticsui "https://github.com/namandudhoria/rallygully_pulse/blob/main/frontend/src/pages/Analytics.jsx"
click node_portfolio "https://github.com/namandudhoria/rallygully_pulse/blob/main/frontend/src/pages/Portfolio.jsx"
click node_adminui "https://github.com/namandudhoria/rallygully_pulse/blob/main/frontend/src/pages/Admin.jsx"
click node_peopleui "https://github.com/namandudhoria/rallygully_pulse/blob/main/frontend/src/pages/People.jsx"
click node_apiclient "https://github.com/namandudhoria/rallygully_pulse/blob/main/frontend/src/lib/api.js"
click node_auth "https://github.com/namandudhoria/rallygully_pulse/blob/main/backend/app/auth.py"
click node_permissions "https://github.com/namandudhoria/rallygully_pulse/blob/main/backend/app/permissions.py"
click node_authroutes "https://github.com/namandudhoria/rallygully_pulse/blob/main/backend/app/routers/auth_routes.py"
click node_peopleapi "https://github.com/namandudhoria/rallygully_pulse/blob/main/backend/app/routers/people.py"
click node_api "https://github.com/namandudhoria/rallygully_pulse/blob/main/backend/app/main.py"
click node_venueapi "https://github.com/namandudhoria/rallygully_pulse/blob/main/backend/app/routers/venues.py"
click node_operationsapi "https://github.com/namandudhoria/rallygully_pulse/blob/main/backend/app/routers/operations.py"
click node_adminapi "https://github.com/namandudhoria/rallygully_pulse/blob/main/backend/app/routers/admin.py"
click node_booking "https://github.com/namandudhoria/rallygully_pulse/blob/main/backend/app/services/bookings.py"
click node_activities "https://github.com/namandudhoria/rallygully_pulse/blob/main/backend/app/services/activities.py"
click node_inventory "https://github.com/namandudhoria/rallygully_pulse/blob/main/backend/app/services/inventory.py"
click node_analyticsapi "https://github.com/namandudhoria/rallygully_pulse/blob/main/backend/app/routers/analytics_routes.py"
click node_analytics "https://github.com/namandudhoria/rallygully_pulse/blob/main/backend/app/services/analytics.py"
click node_anomaly "https://github.com/namandudhoria/rallygully_pulse/blob/main/backend/app/services/anomaly.py"
click node_models "https://github.com/namandudhoria/rallygully_pulse/blob/main/backend/app/models.py"
click node_database "https://github.com/namandudhoria/rallygully_pulse/blob/main/backend/app/db.py"
click node_scheduler "https://github.com/namandudhoria/rallygully_pulse/blob/main/backend/app/scheduler.py"
click node_district "https://github.com/namandudhoria/rallygully_pulse/blob/main/backend/app/services/district.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_app,node_venueui,node_programui,node_analyticsui,node_portfolio,node_adminui,node_peopleui,node_apiclient toneBlue
class node_auth,node_permissions,node_authroutes,node_peopleapi toneAmber
class node_venueapi,node_operationsapi,node_adminapi,node_booking,node_activities,node_inventory,node_whatsapp toneMint
class node_analyticsapi,node_analytics,node_anomaly toneRose
class node_api,node_models,node_database,node_scheduler,node_district,node_staff,node_mail toneIndigo
```

## Components

### Operations dashboard

- [Pulse dashboard](https://github.com/namandudhoria/rallygully_pulse/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Venue operations](https://github.com/namandudhoria/rallygully_pulse/blob/main/frontend/src/pages/VenueDay.jsx): `frontend/src/pages/VenueDay.jsx`
- [Programs](https://github.com/namandudhoria/rallygully_pulse/blob/main/frontend/src/pages/Programs.jsx): `frontend/src/pages/Programs.jsx`
- [Analytics](https://github.com/namandudhoria/rallygully_pulse/blob/main/frontend/src/pages/Analytics.jsx): `frontend/src/pages/Analytics.jsx`
- [Portfolio](https://github.com/namandudhoria/rallygully_pulse/blob/main/frontend/src/pages/Portfolio.jsx): `frontend/src/pages/Portfolio.jsx`
- [Configuration and admin](https://github.com/namandudhoria/rallygully_pulse/blob/main/frontend/src/pages/Admin.jsx): `frontend/src/pages/Admin.jsx`
- [People and access UI](https://github.com/namandudhoria/rallygully_pulse/blob/main/frontend/src/pages/People.jsx): `frontend/src/pages/People.jsx`
- [API client](https://github.com/namandudhoria/rallygully_pulse/blob/main/frontend/src/lib/api.js): `frontend/src/lib/api.js`

### Identity and access

- [Sessions and tokens](https://github.com/namandudhoria/rallygully_pulse/blob/main/backend/app/auth.py): `backend/app/auth.py`
- [Role permissions](https://github.com/namandudhoria/rallygully_pulse/blob/main/backend/app/permissions.py): `backend/app/permissions.py`
- [Authentication API](https://github.com/namandudhoria/rallygully_pulse/blob/main/backend/app/routers/auth_routes.py): `backend/app/routers/auth_routes.py`
- [People API](https://github.com/namandudhoria/rallygully_pulse/blob/main/backend/app/routers/people.py): `backend/app/routers/people.py`

### Venue operations

- [Venue API](https://github.com/namandudhoria/rallygully_pulse/blob/main/backend/app/routers/venues.py): `backend/app/routers/venues.py`
- [Operations API](https://github.com/namandudhoria/rallygully_pulse/blob/main/backend/app/routers/operations.py): `backend/app/routers/operations.py`
- [Admin API](https://github.com/namandudhoria/rallygully_pulse/blob/main/backend/app/routers/admin.py): `backend/app/routers/admin.py`
- [Booking lifecycle](https://github.com/namandudhoria/rallygully_pulse/blob/main/backend/app/services/bookings.py): `backend/app/services/bookings.py`
- [Community and academy](https://github.com/namandudhoria/rallygully_pulse/blob/main/backend/app/services/activities.py): `backend/app/services/activities.py`
- [Availability ledger](https://github.com/namandudhoria/rallygully_pulse/blob/main/backend/app/services/inventory.py): `backend/app/services/inventory.py`

### Performance intelligence

- [Analytics API](https://github.com/namandudhoria/rallygully_pulse/blob/main/backend/app/routers/analytics_routes.py): `backend/app/routers/analytics_routes.py`
- [Metrics and trends](https://github.com/namandudhoria/rallygully_pulse/blob/main/backend/app/services/analytics.py): `backend/app/services/analytics.py`
- [Anomaly insights](https://github.com/namandudhoria/rallygully_pulse/blob/main/backend/app/services/anomaly.py): `backend/app/services/anomaly.py`

### Runtime and integrations

- [FastAPI application](https://github.com/namandudhoria/rallygully_pulse/blob/main/backend/app/main.py): `backend/app/main.py`
- [Operational records](https://github.com/namandudhoria/rallygully_pulse/blob/main/backend/app/models.py): `backend/app/models.py`
- [SQL database](https://github.com/namandudhoria/rallygully_pulse/blob/main/backend/app/db.py): `backend/app/db.py`
- [Scheduled jobs](https://github.com/namandudhoria/rallygully_pulse/blob/main/backend/app/scheduler.py): `backend/app/scheduler.py`
- [District booking source](https://github.com/namandudhoria/rallygully_pulse/blob/main/backend/app/services/district.py): `backend/app/services/district.py`

### Other components

- **HQ and venue staff**
- **WhatsApp Cloud API**
- **Mail services**

## Connections

- HQ and venue staff → Pulse dashboard: uses (evidence: `README.md`)
- Pulse dashboard → Venue operations: routes to (evidence: `frontend/src/App.jsx`)
- Pulse dashboard → Programs: routes to (evidence: `frontend/src/App.jsx`)
- Pulse dashboard → Analytics: routes to (evidence: `frontend/src/App.jsx`)
- Pulse dashboard → Portfolio: routes to (evidence: `frontend/src/App.jsx`)
- Pulse dashboard → Configuration and admin: routes to (evidence: `frontend/src/App.jsx`)
- Pulse dashboard → People and access UI: routes to (evidence: `frontend/src/App.jsx`)
- Venue operations → API client: requests data (evidence: `frontend/src/pages/VenueDay.jsx`)
- Programs → API client: requests data (evidence: `frontend/src/pages/Programs.jsx`)
- Configuration and admin → API client: requests data (evidence: `frontend/src/pages/Admin.jsx`)
- API client → FastAPI application: calls API
- FastAPI application → Authentication API: mounts routes (evidence: `backend/app/main.py`)
- FastAPI application → Venue API: mounts routes (evidence: `backend/app/main.py`)
- FastAPI application → Operations API: mounts routes (evidence: `backend/app/main.py`)
- FastAPI application → Admin API: mounts routes (evidence: `backend/app/main.py`)
- FastAPI application → Analytics API: mounts routes (evidence: `backend/app/main.py`)
- FastAPI application → People API: mounts routes (evidence: `backend/app/main.py`)
- Authentication API → Sessions and tokens: uses sessions (evidence: `backend/app/routers/auth_routes.py`)
- Authentication API → Role permissions: checks access (evidence: `backend/app/routers/auth_routes.py`)
- People API → Role permissions: checks access
- Venue API → Role permissions: checks access (evidence: `backend/app/routers/venues.py`)
- Operations API → Role permissions: checks access (evidence: `backend/app/routers/operations.py`)
- Venue API → Booking lifecycle: uses lifecycle (evidence: `backend/app/routers/venues.py`)
- Venue API → Availability ledger: reads availability (evidence: `backend/app/routers/venues.py`)
- Operations API → Booking lifecycle: uses lifecycle (evidence: `backend/app/routers/operations.py`)
- Operations API → Community and academy: manages activities (evidence: `backend/app/routers/operations.py`)
- Booking lifecycle → Availability ledger: allocates capacity (evidence: `backend/app/services/bookings.py`)
- Community and academy → Availability ledger: allocates capacity (evidence: `backend/app/services/activities.py`)
- Admin API → District booking source: manages ingestion (evidence: `backend/app/routers/admin.py`)
- Admin API → Operational records: updates records (evidence: `backend/app/routers/admin.py`)
- Analytics API → Metrics and trends: computes metrics (evidence: `backend/app/routers/analytics_routes.py`)
- Analytics API → Anomaly insights: requests insights (evidence: `backend/app/routers/analytics_routes.py`)
- Metrics and trends → Availability ledger: reads capacity (evidence: `backend/app/services/analytics.py`)
- Booking lifecycle → Operational records: records bookings (evidence: `backend/app/services/bookings.py`)
- Availability ledger → Operational records: records allocations (evidence: `backend/app/services/inventory.py`)
- Operational records → SQL database: persists in (evidence: `backend/app/models.py`)
- FastAPI application → Scheduled jobs: starts jobs (evidence: `backend/app/main.py`)
- Scheduled jobs → District booking source: polls source (evidence: `README.md`)
- District booking source → Mail services: reads mailbox (evidence: `README.md`)
- Booking lifecycle → WhatsApp Cloud API: sends updates (evidence: `README.md`)
- Scheduled jobs → Mail services: sends alerts (evidence: `README.md`)
