# mutabalshawandar/open-pulse architecture

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

- Interactive diagram: https://gitdiagram.com/mutabalshawandar/open-pulse
- Repository: https://github.com/mutabalshawandar/open-pulse

## Overview

OpenPulse is a self-hosted, multi-tenant survey platform. Organization members create reusable surveys, publish immutable versions, assign them to workspaces, and distribute campaigns through public links; respondents submit anonymous answers, which campaign analytics can summarize and export. The map combines documented product capabilities with sampled backend wiring. Some frontend-to-API and unsampled feature links are not visible in the excerpts, so those relationships are omitted rather than inferred.

Main entry points: [`backend/app/main.py`](https://github.com/mutabalshawandar/open-pulse/blob/main/backend/app/main.py) (FastAPI application), [`backend/app/api/v1/campaigns.py`](https://github.com/mutabalshawandar/open-pulse/blob/main/backend/app/api/v1/campaigns.py) (Campaign endpoints), [`backend/app/services/delivery_service.py`](https://github.com/mutabalshawandar/open-pulse/blob/main/backend/app/services/delivery_service.py) (Delivery processing), [`backend/app/workers/worker.py`](https://github.com/mutabalshawandar/open-pulse/blob/main/backend/app/workers/worker.py) (Delivery worker)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_users["Users and interface"]
  node_web_app["Platform interface<br/>[page.tsx]"]
  node_survey_ui["Survey editor<br/>[page.tsx]"]
  node_campaign_ui["Campaign setup"]
  node_public_ui["Public response form"]
  node_analytics_ui["Analytics view<br/>[page.tsx]"]
  node_auth_ui["Authentication routes<br/>[route.ts]"]
end

subgraph group_api["API and access"]
  node_api_app["FastAPI application<br/>[main.py]"]
  node_auth_access["Authentication and permissions<br/>[deps.py]"]
  node_survey_api["Survey endpoints<br/>[surveys.py]"]
  node_campaign_api["Campaign endpoints<br/>[campaigns.py]"]
  node_public_api["Public endpoints<br/>[public.py]"]
  node_admin_api["Administration endpoints<br/>[administration.py]"]
  node_analytics_api["Analytics endpoints<br/>[analytics.py]"]
end

subgraph group_domain["Survey operations"]
  node_survey_service["Survey drafts and versions<br/>[survey_service.py]"]
  node_campaign_service["Campaign lifecycle"]
  node_delivery_service["Delivery processing"]
  node_analytics_service["Analytics and export"]
end

subgraph group_infra["State and integrations"]
  node_database[("Application database<br/>[session.py]")]
  node_worker["Delivery worker<br/>[worker.py]"]
  node_keycloak["Keycloak"]
  node_redis["Redis queue"]
  node_smtp["Email service<br/>[smtp_service.py]"]
  node_object_storage[("S3-compatible storage<br/>[storage_service.py]")]
end

node_org_user(("Organization member"))
node_respondent(("Anonymous respondent"))

node_api_app -->|"mounts routes"| node_survey_api
node_api_app -->|"mounts routes"| node_campaign_api
node_api_app -->|"mounts routes"| node_public_api
node_api_app -->|"mounts routes"| node_admin_api
node_survey_api -->|"calls"| node_survey_service
node_campaign_api -->|"calls"| node_campaign_service
node_campaign_api -->|"dispatches"| node_delivery_service
node_public_api -->|"calls"| node_campaign_service
node_analytics_api -->|"calls"| node_analytics_service
node_analytics_api -->|"exports"| node_analytics_service
node_admin_api -->|"stores logos"| node_object_storage
node_auth_access -->|"fetches signing keys"| node_keycloak
node_auth_ui -->|"authenticates"| node_keycloak
node_worker -->|"sweeps expiry"| node_campaign_service
node_worker -->|"processes jobs"| node_delivery_service
node_worker -->|"consumes jobs"| node_redis
node_delivery_service -.->|"enqueues jobs"| node_redis
node_delivery_service -.->|"sends email"| node_smtp
node_org_user -.->|"uses"| node_web_app
node_respondent -.->|"submits answers"| node_public_ui
node_web_app -.->|"requests data"| node_api_app
node_survey_ui -.->|"manages surveys"| node_survey_api
node_campaign_ui -.->|"configures campaigns"| node_campaign_api
node_public_ui -.->|"submits responses"| node_public_api
node_analytics_ui -.->|"requests analytics"| node_analytics_api
node_api_app -.->|"uses sessions"| node_database

click node_web_app "https://github.com/mutabalshawandar/open-pulse/blob/main/frontend/app/(platform)/page.tsx"
click node_survey_ui "https://github.com/mutabalshawandar/open-pulse/blob/main/frontend/app/(platform)/surveys/%5BsurveyId%5D/page.tsx"
click node_campaign_ui "https://github.com/mutabalshawandar/open-pulse/blob/main/frontend/components/campaigns/campaign-wizard.tsx"
click node_public_ui "https://github.com/mutabalshawandar/open-pulse/blob/main/frontend/components/public/public-survey-form.tsx"
click node_analytics_ui "https://github.com/mutabalshawandar/open-pulse/blob/main/frontend/app/(platform)/workspaces/%5BworkspaceId%5D/analytics/page.tsx"
click node_auth_ui "https://github.com/mutabalshawandar/open-pulse/blob/main/frontend/app/(auth)/auth/callback/route.ts"
click node_api_app "https://github.com/mutabalshawandar/open-pulse/blob/main/backend/app/main.py"
click node_auth_access "https://github.com/mutabalshawandar/open-pulse/blob/main/backend/app/api/deps.py"
click node_survey_api "https://github.com/mutabalshawandar/open-pulse/blob/main/backend/app/api/v1/surveys.py"
click node_campaign_api "https://github.com/mutabalshawandar/open-pulse/blob/main/backend/app/api/v1/campaigns.py"
click node_public_api "https://github.com/mutabalshawandar/open-pulse/blob/main/backend/app/api/v1/public.py"
click node_admin_api "https://github.com/mutabalshawandar/open-pulse/blob/main/backend/app/api/v1/administration.py"
click node_analytics_api "https://github.com/mutabalshawandar/open-pulse/blob/main/backend/app/api/v1/analytics.py"
click node_survey_service "https://github.com/mutabalshawandar/open-pulse/blob/main/backend/app/services/survey_service.py"
click node_campaign_service "https://github.com/mutabalshawandar/open-pulse/blob/main/backend/app/services/campaign_service.py"
click node_delivery_service "https://github.com/mutabalshawandar/open-pulse/blob/main/backend/app/services/delivery_service.py"
click node_analytics_service "https://github.com/mutabalshawandar/open-pulse/blob/main/backend/app/services/analytics_service.py"
click node_database "https://github.com/mutabalshawandar/open-pulse/blob/main/backend/app/db/session.py"
click node_worker "https://github.com/mutabalshawandar/open-pulse/blob/main/backend/app/workers/worker.py"
click node_smtp "https://github.com/mutabalshawandar/open-pulse/blob/main/backend/app/services/smtp_service.py"
click node_object_storage "https://github.com/mutabalshawandar/open-pulse/blob/main/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_web_app,node_survey_ui,node_campaign_ui,node_public_ui,node_analytics_ui,node_auth_ui toneBlue
class node_api_app,node_auth_access,node_survey_api,node_campaign_api,node_public_api,node_admin_api,node_analytics_api toneAmber
class node_survey_service,node_campaign_service,node_delivery_service,node_analytics_service toneMint
class node_database,node_worker,node_keycloak,node_redis,node_smtp,node_object_storage toneRose
class node_org_user,node_respondent toneIndigo
```

## Components

### Users and interface

- [Platform interface](https://github.com/mutabalshawandar/open-pulse/blob/main/frontend/app/(platform)/page.tsx): `frontend/app/(platform)/page.tsx`
- [Survey editor](https://github.com/mutabalshawandar/open-pulse/blob/main/frontend/app/(platform)/surveys/%5BsurveyId%5D/page.tsx): `frontend/app/(platform)/surveys/[surveyId]/page.tsx`
- [Campaign setup](https://github.com/mutabalshawandar/open-pulse/blob/main/frontend/components/campaigns/campaign-wizard.tsx): `frontend/components/campaigns/campaign-wizard.tsx`
- [Public response form](https://github.com/mutabalshawandar/open-pulse/blob/main/frontend/components/public/public-survey-form.tsx): `frontend/components/public/public-survey-form.tsx`
- [Analytics view](https://github.com/mutabalshawandar/open-pulse/blob/main/frontend/app/(platform)/workspaces/%5BworkspaceId%5D/analytics/page.tsx): `frontend/app/(platform)/workspaces/[workspaceId]/analytics/page.tsx`
- [Authentication routes](https://github.com/mutabalshawandar/open-pulse/blob/main/frontend/app/(auth)/auth/callback/route.ts): `frontend/app/(auth)/auth/callback/route.ts`

### API and access

- [FastAPI application](https://github.com/mutabalshawandar/open-pulse/blob/main/backend/app/main.py): `backend/app/main.py`
- [Authentication and permissions](https://github.com/mutabalshawandar/open-pulse/blob/main/backend/app/api/deps.py): `backend/app/api/deps.py`
- [Survey endpoints](https://github.com/mutabalshawandar/open-pulse/blob/main/backend/app/api/v1/surveys.py): `backend/app/api/v1/surveys.py`
- [Campaign endpoints](https://github.com/mutabalshawandar/open-pulse/blob/main/backend/app/api/v1/campaigns.py): `backend/app/api/v1/campaigns.py`
- [Public endpoints](https://github.com/mutabalshawandar/open-pulse/blob/main/backend/app/api/v1/public.py): `backend/app/api/v1/public.py`
- [Administration endpoints](https://github.com/mutabalshawandar/open-pulse/blob/main/backend/app/api/v1/administration.py): `backend/app/api/v1/administration.py`
- [Analytics endpoints](https://github.com/mutabalshawandar/open-pulse/blob/main/backend/app/api/v1/analytics.py): `backend/app/api/v1/analytics.py`

### Survey operations

- [Survey drafts and versions](https://github.com/mutabalshawandar/open-pulse/blob/main/backend/app/services/survey_service.py): `backend/app/services/survey_service.py`
- [Campaign lifecycle](https://github.com/mutabalshawandar/open-pulse/blob/main/backend/app/services/campaign_service.py): `backend/app/services/campaign_service.py`
- [Delivery processing](https://github.com/mutabalshawandar/open-pulse/blob/main/backend/app/services/delivery_service.py): `backend/app/services/delivery_service.py`
- [Analytics and export](https://github.com/mutabalshawandar/open-pulse/blob/main/backend/app/services/analytics_service.py): `backend/app/services/analytics_service.py`

### State and integrations

- [Application database](https://github.com/mutabalshawandar/open-pulse/blob/main/backend/app/db/session.py): `backend/app/db/session.py`
- [Delivery worker](https://github.com/mutabalshawandar/open-pulse/blob/main/backend/app/workers/worker.py): `backend/app/workers/worker.py`
- **Keycloak**
- **Redis queue**
- [Email service](https://github.com/mutabalshawandar/open-pulse/blob/main/backend/app/services/smtp_service.py): `backend/app/services/smtp_service.py`
- [S3-compatible storage](https://github.com/mutabalshawandar/open-pulse/blob/main/backend/app/services/storage_service.py): `backend/app/services/storage_service.py`

### Other components

- **Organization member**
- **Anonymous respondent**

## Connections

- FastAPI application → Survey endpoints: mounts routes (evidence: `backend/app/main.py`)
- FastAPI application → Campaign endpoints: mounts routes (evidence: `backend/app/main.py`)
- FastAPI application → Public endpoints: mounts routes (evidence: `backend/app/main.py`)
- FastAPI application → Administration endpoints: mounts routes (evidence: `backend/app/main.py`)
- Survey endpoints → Survey drafts and versions: calls (evidence: `backend/app/api/v1/surveys.py`)
- Campaign endpoints → Campaign lifecycle: calls (evidence: `backend/app/api/v1/campaigns.py`)
- Campaign endpoints → Delivery processing: dispatches (evidence: `backend/app/api/v1/campaigns.py`)
- Public endpoints → Campaign lifecycle: calls (evidence: `backend/app/api/v1/public.py`)
- Analytics endpoints → Analytics and export: calls (evidence: `backend/app/api/v1/analytics.py`)
- Analytics endpoints → Analytics and export: exports (evidence: `backend/app/api/v1/analytics.py`)
- Administration endpoints → S3-compatible storage: stores logos (evidence: `backend/app/api/v1/administration.py`)
- Authentication and permissions → Keycloak: fetches signing keys (evidence: `backend/app/api/deps.py`)
- Authentication routes → Keycloak: authenticates (evidence: `frontend/app/(auth)/auth/callback/route.ts`)
- Delivery worker → Campaign lifecycle: sweeps expiry (evidence: `backend/app/workers/worker.py`)
- Delivery worker → Delivery processing: processes jobs (evidence: `backend/app/workers/worker.py`)
- Delivery worker → Redis queue: consumes jobs (evidence: `backend/app/workers/worker.py`)
- Delivery processing → Redis queue: enqueues jobs
- Delivery processing → Email service: sends email
- Organization member → Platform interface: uses
- Anonymous respondent → Public response form: submits answers
- Platform interface → FastAPI application: requests data
- Survey editor → Survey endpoints: manages surveys
- Campaign setup → Campaign endpoints: configures campaigns
- Public response form → Public endpoints: submits responses
- Analytics view → Analytics endpoints: requests analytics
- FastAPI application → Application database: uses sessions (evidence: `backend/app/main.py`)
