# samriddhie/callingdashboard architecture

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

- Interactive diagram: https://gitdiagram.com/samriddhie/callingdashboard
- Repository: https://github.com/samriddhie/callingdashboard

## Overview

CallDesk is a calling dashboard for customer outreach: an agent signs in, selects customers from CRM-backed views, records an attributed call and required disposition, then reviews structured facts extracted from notes. The React app coordinates these workflows; call records and customer/cat facts remain browser-local, while the Express service authenticates users and reads CRM data. The README also documents follow-up queues, history, subscriptions, customer/order context, GoKwik engagement, and optional AI briefs. Some secondary UI wiring is inferred only from documented capabilities; unsampled implementation details are not asserted.

Main entry points: [`src/App.jsx`](https://github.com/samriddhie/callingdashboard/blob/main/src/App.jsx) (App router), [`server/index.js`](https://github.com/samriddhie/callingdashboard/blob/main/server/index.js) (Express API), [`src/data/api.js`](https://github.com/samriddhie/callingdashboard/blob/main/src/data/api.js) (API client), [`src/pages/CustomerDetailPage.jsx`](https://github.com/samriddhie/callingdashboard/blob/main/src/pages/CustomerDetailPage.jsx) (Customer detail)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Calling workspace"]
  node_app["App router<br/>[App.jsx]"]
  node_login["Sign-in screen<br/>[LoginScreen.jsx]"]
  node_identity["Session context<br/>[AuthContext.jsx]"]
  node_dashboard["Dashboard<br/>[DashboardPage.jsx]"]
  node_queue["Calling queues<br/>[CallQueuePage.jsx]"]
  node_priority["Priority queue<br/>[PriorityQueue.jsx]"]
  node_customers["Customer directory<br/>[CustomersPage.jsx]"]
  node_detail["Customer detail"]
  node_history["Call history<br/>[HistoryPage.jsx]"]
  node_subscriptions["Subscriptions"]
  node_call["Call capture<br/>[CallModal.jsx]"]
  node_review["Extraction review"]
  node_customercontext["Customer context"]
  node_engagement["Engagement panel"]
  node_orders["Orders panel<br/>[OrdersPanel.jsx]"]
  node_shopify["Shopify summary<br/>[ShopifySummary.jsx]"]
end

subgraph group_clientdata["Client data"]
  node_state["Domain state<br/>[DataContext.jsx]"]
  node_storage[("Browser storage<br/>[storage.js]")]
  node_extractor["Note extractor<br/>[extract.js]"]
  node_api["API client<br/>[api.js]"]
end

subgraph group_backend["Backend services"]
  node_server["Express API<br/>[index.js]"]
  node_authserver["Session security<br/>[auth.js]"]
  node_crm["CRM queries<br/>[crm.js]"]
  node_gokwik["GoKwik queries<br/>[gokwik.js]"]
end

subgraph group_integrations["External systems"]
  node_crmdb[("CRM database")]
  node_anthropic{{"Anthropic API"}}
  node_google{{"Google sign-in"}}
end

node_agent(("Calling agent"))

node_agent -->|"uses"| node_app
node_app -->|"shows when signed out"| node_login
node_app -->|"checks identity"| node_identity
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_queue
node_app -->|"routes to"| node_customers
node_app -->|"opens customer"| node_detail
node_app -->|"routes to"| node_history
node_app -->|"routes to"| node_subscriptions
node_queue -->|"renders"| node_priority
node_customers -->|"fetches CRM customers"| node_api
node_detail -->|"renders"| node_customercontext
node_detail -->|"renders"| node_engagement
node_detail -.->|"renders"| node_orders
node_detail -->|"renders"| node_shopify
node_agent -->|"records call"| node_call
node_call -->|"extracts note facts"| node_extractor
node_extractor -->|"requests AI extraction"| node_api
node_call -->|"reviews extracted facts"| node_review
node_call -->|"completes disposition"| node_state
node_state -->|"persists local data"| node_storage
node_identity -->|"sends session requests"| node_api
node_api -->|"calls API routes"| node_server
node_server -->|"enforces sessions"| node_authserver
node_server -->|"dispatches CRM queries"| node_crm
node_crm -->|"reads CRM data"| node_crmdb
node_server -->|"dispatches engagement"| node_gokwik
node_server -->|"requests note extraction"| node_anthropic
node_server -->|"verifies ID token"| node_google
node_api -->|"requests engagement"| node_gokwik
node_api -->|"requests pre-call brief"| node_server

click node_app "https://github.com/samriddhie/callingdashboard/blob/main/src/App.jsx"
click node_login "https://github.com/samriddhie/callingdashboard/blob/main/src/components/LoginScreen.jsx"
click node_identity "https://github.com/samriddhie/callingdashboard/blob/main/src/auth/AuthContext.jsx"
click node_dashboard "https://github.com/samriddhie/callingdashboard/blob/main/src/pages/DashboardPage.jsx"
click node_queue "https://github.com/samriddhie/callingdashboard/blob/main/src/pages/CallQueuePage.jsx"
click node_priority "https://github.com/samriddhie/callingdashboard/blob/main/src/pages/PriorityQueue.jsx"
click node_customers "https://github.com/samriddhie/callingdashboard/blob/main/src/pages/CustomersPage.jsx"
click node_detail "https://github.com/samriddhie/callingdashboard/blob/main/src/pages/CustomerDetailPage.jsx"
click node_history "https://github.com/samriddhie/callingdashboard/blob/main/src/pages/HistoryPage.jsx"
click node_subscriptions "https://github.com/samriddhie/callingdashboard/blob/main/src/pages/SubscriptionsPage.jsx"
click node_call "https://github.com/samriddhie/callingdashboard/blob/main/src/components/CallModal.jsx"
click node_review "https://github.com/samriddhie/callingdashboard/blob/main/src/components/ExtractionReview.jsx"
click node_customercontext "https://github.com/samriddhie/callingdashboard/blob/main/src/components/CustomerContext.jsx"
click node_engagement "https://github.com/samriddhie/callingdashboard/blob/main/src/components/EngagementPanel.jsx"
click node_orders "https://github.com/samriddhie/callingdashboard/blob/main/src/components/OrdersPanel.jsx"
click node_shopify "https://github.com/samriddhie/callingdashboard/blob/main/src/components/ShopifySummary.jsx"
click node_state "https://github.com/samriddhie/callingdashboard/blob/main/src/data/DataContext.jsx"
click node_storage "https://github.com/samriddhie/callingdashboard/blob/main/src/data/storage.js"
click node_extractor "https://github.com/samriddhie/callingdashboard/blob/main/src/data/extract.js"
click node_api "https://github.com/samriddhie/callingdashboard/blob/main/src/data/api.js"
click node_server "https://github.com/samriddhie/callingdashboard/blob/main/server/index.js"
click node_authserver "https://github.com/samriddhie/callingdashboard/blob/main/server/auth.js"
click node_crm "https://github.com/samriddhie/callingdashboard/blob/main/server/crm.js"
click node_gokwik "https://github.com/samriddhie/callingdashboard/blob/main/server/gokwik.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_login,node_identity,node_dashboard,node_queue,node_priority,node_customers,node_detail,node_history,node_subscriptions,node_call,node_review,node_customercontext,node_engagement,node_orders,node_shopify toneBlue
class node_state,node_storage,node_extractor,node_api toneAmber
class node_server,node_authserver,node_crm,node_gokwik toneMint
class node_crmdb,node_anthropic,node_google toneRose
class node_agent toneIndigo
```

## Components

### Calling workspace

- [App router](https://github.com/samriddhie/callingdashboard/blob/main/src/App.jsx): `src/App.jsx`
- [Sign-in screen](https://github.com/samriddhie/callingdashboard/blob/main/src/components/LoginScreen.jsx): `src/components/LoginScreen.jsx`
- [Session context](https://github.com/samriddhie/callingdashboard/blob/main/src/auth/AuthContext.jsx): `src/auth/AuthContext.jsx`
- [Dashboard](https://github.com/samriddhie/callingdashboard/blob/main/src/pages/DashboardPage.jsx): `src/pages/DashboardPage.jsx`
- [Calling queues](https://github.com/samriddhie/callingdashboard/blob/main/src/pages/CallQueuePage.jsx): `src/pages/CallQueuePage.jsx`
- [Priority queue](https://github.com/samriddhie/callingdashboard/blob/main/src/pages/PriorityQueue.jsx): `src/pages/PriorityQueue.jsx`
- [Customer directory](https://github.com/samriddhie/callingdashboard/blob/main/src/pages/CustomersPage.jsx): `src/pages/CustomersPage.jsx`
- [Customer detail](https://github.com/samriddhie/callingdashboard/blob/main/src/pages/CustomerDetailPage.jsx): `src/pages/CustomerDetailPage.jsx`
- [Call history](https://github.com/samriddhie/callingdashboard/blob/main/src/pages/HistoryPage.jsx): `src/pages/HistoryPage.jsx`
- [Subscriptions](https://github.com/samriddhie/callingdashboard/blob/main/src/pages/SubscriptionsPage.jsx): `src/pages/SubscriptionsPage.jsx`
- [Call capture](https://github.com/samriddhie/callingdashboard/blob/main/src/components/CallModal.jsx): `src/components/CallModal.jsx`
- [Extraction review](https://github.com/samriddhie/callingdashboard/blob/main/src/components/ExtractionReview.jsx): `src/components/ExtractionReview.jsx`
- [Customer context](https://github.com/samriddhie/callingdashboard/blob/main/src/components/CustomerContext.jsx): `src/components/CustomerContext.jsx`
- [Engagement panel](https://github.com/samriddhie/callingdashboard/blob/main/src/components/EngagementPanel.jsx): `src/components/EngagementPanel.jsx`
- [Orders panel](https://github.com/samriddhie/callingdashboard/blob/main/src/components/OrdersPanel.jsx): `src/components/OrdersPanel.jsx`
- [Shopify summary](https://github.com/samriddhie/callingdashboard/blob/main/src/components/ShopifySummary.jsx): `src/components/ShopifySummary.jsx`

### Client data

- [Domain state](https://github.com/samriddhie/callingdashboard/blob/main/src/data/DataContext.jsx): `src/data/DataContext.jsx`
- [Browser storage](https://github.com/samriddhie/callingdashboard/blob/main/src/data/storage.js): `src/data/storage.js`
- [Note extractor](https://github.com/samriddhie/callingdashboard/blob/main/src/data/extract.js): `src/data/extract.js`
- [API client](https://github.com/samriddhie/callingdashboard/blob/main/src/data/api.js): `src/data/api.js`

### Backend services

- [Express API](https://github.com/samriddhie/callingdashboard/blob/main/server/index.js): `server/index.js`
- [Session security](https://github.com/samriddhie/callingdashboard/blob/main/server/auth.js): `server/auth.js`
- [CRM queries](https://github.com/samriddhie/callingdashboard/blob/main/server/crm.js): `server/crm.js`
- [GoKwik queries](https://github.com/samriddhie/callingdashboard/blob/main/server/gokwik.js): `server/gokwik.js`

### External systems

- **CRM database**
- **Anthropic API**
- **Google sign-in**

### Other components

- **Calling agent**

## Connections

- Calling agent → App router: uses (evidence: `src/App.jsx`)
- App router → Sign-in screen: shows when signed out (evidence: `src/App.jsx`)
- App router → Session context: checks identity (evidence: `src/App.jsx`)
- App router → Dashboard: routes to (evidence: `src/App.jsx`)
- App router → Calling queues: routes to (evidence: `src/App.jsx`)
- App router → Customer directory: routes to (evidence: `src/App.jsx`)
- App router → Customer detail: opens customer (evidence: `src/App.jsx`)
- App router → Call history: routes to (evidence: `src/App.jsx`)
- App router → Subscriptions: routes to (evidence: `src/App.jsx`)
- Calling queues → Priority queue: renders (evidence: `src/pages/CallQueuePage.jsx`)
- Customer directory → API client: fetches CRM customers (evidence: `src/pages/CustomersPage.jsx`)
- Customer detail → Customer context: renders (evidence: `src/pages/CustomerDetailPage.jsx`)
- Customer detail → Engagement panel: renders (evidence: `src/pages/CustomerDetailPage.jsx`)
- Customer detail → Orders panel: renders (evidence: `README.md`)
- Customer detail → Shopify summary: renders (evidence: `src/pages/CustomerDetailPage.jsx`)
- Calling agent → Call capture: records call (evidence: `README.md`)
- Call capture → Note extractor: extracts note facts (evidence: `src/components/CallModal.jsx`)
- Note extractor → API client: requests AI extraction (evidence: `README.md`)
- Call capture → Extraction review: reviews extracted facts (evidence: `src/components/CallModal.jsx`)
- Call capture → Domain state: completes disposition (evidence: `src/components/CallModal.jsx`)
- Domain state → Browser storage: persists local data (evidence: `README.md`)
- Session context → API client: sends session requests (evidence: `src/auth/AuthContext.jsx`)
- API client → Express API: calls API routes (evidence: `README.md`)
- Express API → Session security: enforces sessions (evidence: `README.md`)
- Express API → CRM queries: dispatches CRM queries (evidence: `server/index.js`)
- CRM queries → CRM database: reads CRM data (evidence: `README.md`)
- Express API → GoKwik queries: dispatches engagement (evidence: `server/index.js`)
- Express API → Anthropic API: requests note extraction (evidence: `server/index.js`)
- Express API → Google sign-in: verifies ID token (evidence: `server/index.js`)
- API client → GoKwik queries: requests engagement (evidence: `src/data/api.js`)
- API client → Express API: requests pre-call brief (evidence: `src/data/api.js`)
