# dancan1995/surveybonobo architecture

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

- Interactive diagram: https://gitdiagram.com/dancan1995/surveybonobo
- Repository: https://github.com/dancan1995/surveybonobo

## Overview

Survey Bonobo is a survey and feedback platform with survey creation, respondent collection, analysis, presentations, and follow-up, alongside team, payroll, and administration tools. The visible app entry point renders the main application; the server entry point provides API behavior, while Firebase-backed modules support client data and uploads. The source index and excerpts establish several internal calls, but do not show most app routing or server route wiring, so those connections are left unverified rather than inferred.

Main entry points: [`src/App.tsx`](https://github.com/dancan1995/surveybonobo/blob/main/src/App.tsx) (Web application), [`src/presenter/PresenterView.tsx`](https://github.com/dancan1995/surveybonobo/blob/main/src/presenter/PresenterView.tsx) (Presentations), [`server/index.js`](https://github.com/dancan1995/surveybonobo/blob/main/server/index.js) (API server), [`server/hub/index.js`](https://github.com/dancan1995/surveybonobo/blob/main/server/hub/index.js) (Team hub)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Survey Experience"]
  node_app["Web application<br/>[App.tsx]"]
  node_survey_build["Survey design"]
  node_survey_respond["Survey response"]
  node_polls["Polls"]
end

subgraph group_insights["Analysis &amp; Reporting"]
  node_presenter["Presentations<br/>[PresenterView.tsx]"]
  node_insight_views["Survey insights"]
  node_reporting["Reporting studio"]
  node_sql_engine["Browser SQL engine<br/>[sqlEngine.ts]"]
end

subgraph group_platform["Platform Services"]
  node_api["API server<br/>[index.js]"]
  node_responses_api["Response handling<br/>[responses.js]"]
  node_reporting_api["Reporting API<br/>[appReporting.js]"]
  node_firebase["Firebase clients<br/>[firebase.ts]"]
  node_firestore[("Firestore access<br/>[firestore.ts]")]
  node_storage["File uploads<br/>[storage.ts]"]
  node_ai_credits["AI credits<br/>[aiCredits.ts]"]
end

subgraph group_workplace["Team &amp; Payroll"]
  node_hub["Team hub<br/>[index.js]"]
  node_hub_chat["Team chat<br/>[chat.js]"]
  node_hub_mail["Team email<br/>[mail.js]"]
  node_payroll["Payroll"]
end

subgraph group_operations["Administration"]
  node_admin["Admin tools"]
  node_access_requests["Access requests<br/>[accessRequests.js]"]
  node_billing_access["Billing access<br/>[billingAccess.js]"]
  node_ops_support["Operations support<br/>[opsSupport.js]"]
end

node_user(("Survey user"))

node_user -->|"uses"| node_app
node_app -.->|"routes to"| node_survey_build
node_app -.->|"routes to"| node_survey_respond
node_app -.->|"routes to"| node_polls
node_app -.->|"routes to"| node_presenter
node_app -.->|"routes to"| node_insight_views
node_app -.->|"routes to"| node_reporting
node_app -.->|"routes to"| node_admin
node_presenter -->|"reads credits"| node_ai_credits
node_presenter -->|"uploads logo"| node_storage
node_presenter -->|"requests insights"| node_insight_views
node_presenter -->|"reads auth"| node_firebase
node_presenter -->|"uses"| node_firestore
node_presenter -->|"uses slide stats"| node_reporting
node_insight_views -->|"loads responses"| node_firestore
node_insight_views -->|"uses"| node_firebase
node_reporting -.->|"runs queries"| node_sql_engine
node_sql_engine -->|"loads tables"| node_api
node_api -->|"imports"| node_responses_api
node_api -->|"imports"| node_reporting_api
node_api -->|"imports"| node_access_requests
node_api -->|"imports"| node_billing_access
node_api -->|"imports"| node_ops_support
node_hub -->|"creates"| node_hub_chat
node_hub -->|"creates"| node_hub_mail
node_hub -->|"registers routes"| node_hub_chat
node_hub -->|"registers routes"| node_hub_mail
node_admin -.->|"includes"| node_payroll
node_survey_respond -.->|"submits responses"| node_responses_api

click node_app "https://github.com/dancan1995/surveybonobo/blob/main/src/App.tsx"
click node_survey_build "https://github.com/dancan1995/surveybonobo/tree/main/src/builder"
click node_survey_respond "https://github.com/dancan1995/surveybonobo/tree/main/src/respond"
click node_polls "https://github.com/dancan1995/surveybonobo/tree/main/src/polls"
click node_presenter "https://github.com/dancan1995/surveybonobo/blob/main/src/presenter/PresenterView.tsx"
click node_insight_views "https://github.com/dancan1995/surveybonobo/tree/main/src/insights"
click node_reporting "https://github.com/dancan1995/surveybonobo/tree/main/src/admin/sql"
click node_sql_engine "https://github.com/dancan1995/surveybonobo/blob/main/src/admin/sql/sqlEngine.ts"
click node_api "https://github.com/dancan1995/surveybonobo/blob/main/server/index.js"
click node_responses_api "https://github.com/dancan1995/surveybonobo/blob/main/server/responses.js"
click node_reporting_api "https://github.com/dancan1995/surveybonobo/blob/main/server/appReporting.js"
click node_firebase "https://github.com/dancan1995/surveybonobo/blob/main/src/lib/firebase.ts"
click node_firestore "https://github.com/dancan1995/surveybonobo/blob/main/src/lib/firestore.ts"
click node_storage "https://github.com/dancan1995/surveybonobo/blob/main/src/lib/storage.ts"
click node_ai_credits "https://github.com/dancan1995/surveybonobo/blob/main/src/lib/aiCredits.ts"
click node_hub "https://github.com/dancan1995/surveybonobo/blob/main/server/hub/index.js"
click node_hub_chat "https://github.com/dancan1995/surveybonobo/blob/main/server/hub/chat.js"
click node_hub_mail "https://github.com/dancan1995/surveybonobo/blob/main/server/hub/mail.js"
click node_payroll "https://github.com/dancan1995/surveybonobo/tree/main/src/payroll"
click node_admin "https://github.com/dancan1995/surveybonobo/tree/main/src/admin"
click node_access_requests "https://github.com/dancan1995/surveybonobo/blob/main/server/accessRequests.js"
click node_billing_access "https://github.com/dancan1995/surveybonobo/blob/main/server/billingAccess.js"
click node_ops_support "https://github.com/dancan1995/surveybonobo/blob/main/server/opsSupport.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_survey_build,node_survey_respond,node_polls,node_user toneBlue
class node_presenter,node_insight_views,node_reporting,node_sql_engine toneAmber
class node_api,node_responses_api,node_reporting_api,node_firebase,node_firestore,node_storage,node_ai_credits toneMint
class node_hub,node_hub_chat,node_hub_mail,node_payroll toneRose
class node_admin,node_access_requests,node_billing_access,node_ops_support toneIndigo
```

## Components

### Survey Experience

- [Web application](https://github.com/dancan1995/surveybonobo/blob/main/src/App.tsx): `src/App.tsx`
- [Survey design](https://github.com/dancan1995/surveybonobo/tree/main/src/builder): `src/builder`
- [Survey response](https://github.com/dancan1995/surveybonobo/tree/main/src/respond): `src/respond`
- [Polls](https://github.com/dancan1995/surveybonobo/tree/main/src/polls): `src/polls`

### Analysis & Reporting

- [Presentations](https://github.com/dancan1995/surveybonobo/blob/main/src/presenter/PresenterView.tsx): `src/presenter/PresenterView.tsx`
- [Survey insights](https://github.com/dancan1995/surveybonobo/tree/main/src/insights): `src/insights`
- [Reporting studio](https://github.com/dancan1995/surveybonobo/tree/main/src/admin/sql): `src/admin/sql`
- [Browser SQL engine](https://github.com/dancan1995/surveybonobo/blob/main/src/admin/sql/sqlEngine.ts): `src/admin/sql/sqlEngine.ts`

### Platform Services

- [API server](https://github.com/dancan1995/surveybonobo/blob/main/server/index.js): `server/index.js`
- [Response handling](https://github.com/dancan1995/surveybonobo/blob/main/server/responses.js): `server/responses.js`
- [Reporting API](https://github.com/dancan1995/surveybonobo/blob/main/server/appReporting.js): `server/appReporting.js`
- [Firebase clients](https://github.com/dancan1995/surveybonobo/blob/main/src/lib/firebase.ts): `src/lib/firebase.ts`
- [Firestore access](https://github.com/dancan1995/surveybonobo/blob/main/src/lib/firestore.ts): `src/lib/firestore.ts`
- [File uploads](https://github.com/dancan1995/surveybonobo/blob/main/src/lib/storage.ts): `src/lib/storage.ts`
- [AI credits](https://github.com/dancan1995/surveybonobo/blob/main/src/lib/aiCredits.ts): `src/lib/aiCredits.ts`

### Team & Payroll

- [Team hub](https://github.com/dancan1995/surveybonobo/blob/main/server/hub/index.js): `server/hub/index.js`
- [Team chat](https://github.com/dancan1995/surveybonobo/blob/main/server/hub/chat.js): `server/hub/chat.js`
- [Team email](https://github.com/dancan1995/surveybonobo/blob/main/server/hub/mail.js): `server/hub/mail.js`
- [Payroll](https://github.com/dancan1995/surveybonobo/tree/main/src/payroll): `src/payroll`

### Administration

- [Admin tools](https://github.com/dancan1995/surveybonobo/tree/main/src/admin): `src/admin`
- [Access requests](https://github.com/dancan1995/surveybonobo/blob/main/server/accessRequests.js): `server/accessRequests.js`
- [Billing access](https://github.com/dancan1995/surveybonobo/blob/main/server/billingAccess.js): `server/billingAccess.js`
- [Operations support](https://github.com/dancan1995/surveybonobo/blob/main/server/opsSupport.js): `server/opsSupport.js`

### Other components

- **Survey user**

## Connections

- Survey user → Web application: uses
- Web application → Survey design: routes to
- Web application → Survey response: routes to
- Web application → Polls: routes to
- Web application → Presentations: routes to (evidence: `src/presenter/PresenterView.tsx`)
- Web application → Survey insights: routes to
- Web application → Reporting studio: routes to
- Web application → Admin tools: routes to
- Presentations → AI credits: reads credits (evidence: `src/presenter/PresenterView.tsx`)
- Presentations → File uploads: uploads logo (evidence: `src/presenter/PresenterView.tsx`)
- Presentations → Survey insights: requests insights (evidence: `src/presenter/PresenterView.tsx`)
- Presentations → Firebase clients: reads auth (evidence: `src/presenter/PresenterView.tsx`)
- Presentations → Firestore access: uses (evidence: `src/presenter/PresenterView.tsx`)
- Presentations → Reporting studio: uses slide stats (evidence: `src/presenter/PresenterView.tsx`)
- Survey insights → Firestore access: loads responses (evidence: `src/insights/ImpactView.tsx`)
- Survey insights → Firebase clients: uses (evidence: `src/insights/ImpactView.tsx`)
- Reporting studio → Browser SQL engine: runs queries
- Browser SQL engine → API server: loads tables (evidence: `src/admin/sql/sqlEngine.ts`)
- API server → Response handling: imports (evidence: `server/index.js`)
- API server → Reporting API: imports (evidence: `server/index.js`)
- API server → Access requests: imports (evidence: `server/index.js`)
- API server → Billing access: imports (evidence: `server/index.js`)
- API server → Operations support: imports (evidence: `server/index.js`)
- Team hub → Team chat: creates (evidence: `server/hub/index.js`)
- Team hub → Team email: creates (evidence: `server/hub/index.js`)
- Team hub → Team chat: registers routes (evidence: `server/hub/index.js`)
- Team hub → Team email: registers routes (evidence: `server/hub/index.js`)
- Admin tools → Payroll: includes
- Survey response → Response handling: submits responses
