# manyisanewton/customer-engagement-platform architecture

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

- Interactive diagram: https://gitdiagram.com/manyisanewton/customer-engagement-platform
- Repository: https://github.com/manyisanewton/customer-engagement-platform

## Overview

Customer-Engagement-Platform is a Vue customer-service workspace backed by a FastAPI API and PostgreSQL, with ERPNext integrated as a GET-only data source. Users sign in, then work role-specific queues, customer context, ERPNext customer records, notifications, reports, or administration. The backend handles these domains through versioned routes and services, persisting portal workflows and cached or audited data. The graph preserves major documented capabilities; several route, view, and integration details are unsampled, so those connections are left unverified rather than inferred.

Main entry points: [`frontend/src/App.vue`](https://github.com/manyisanewton/customer-engagement-platform/blob/main/frontend/src/App.vue) (Workspace Shell), [`backend/app/api/v1/routes`](https://github.com/manyisanewton/customer-engagement-platform/tree/main/backend/app/api/v1/routes) (Versioned Routes), [`backend/app/services/reporting/service.py`](https://github.com/manyisanewton/customer-engagement-platform/blob/main/backend/app/services/reporting/service.py) (Reporting), [`backend/app/services/notifications/service.py`](https://github.com/manyisanewton/customer-engagement-platform/blob/main/backend/app/services/notifications/service.py) (Notification Service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspace["Customer Workspace"]
  node_app["Workspace Shell<br/>[App.vue]"]
  node_workspace_state["Workspace State"]
  node_queue_ui["Request Queue<br/>[QueueView.vue]"]
  node_customer_ui["Customer Portal"]
  node_crm_ui["ERPNext CRM<br/>[ErpnextCrmView.vue]"]
  node_reports_ui["Reports<br/>[ReportsView.vue]"]
  node_admin_ui["Administration<br/>[AdminView.vue]"]
  node_notifications_ui["Notifications"]
end

subgraph group_api["API and Identity"]
  node_api_client["API Client<br/>[api.ts]"]
  node_http_client["HTTP Transport<br/>[http.ts]"]
  node_api_routes["Versioned Routes"]
  node_identity["Authentication<br/>[auth.py]"]
end

subgraph group_service["Domain Services"]
  node_requests["Request Workflow<br/>[service.py]"]
  node_customer_context["Customer Context<br/>[service.py]"]
  node_erp_cache["ERP Customer Cache<br/>[service.py]"]
  node_erp_read["ERP Read Service<br/>[read_service.py]"]
  node_notifications["Notification Service<br/>[service.py]"]
  node_reporting["Reporting<br/>[service.py]"]
  node_admin_ops["Admin Operations<br/>[service.py]"]
end

subgraph group_state["Persistence and Integrations"]
  node_database[("PostgreSQL<br/>[session.py]")]
  node_erpnext["ERPNext"]
  node_mail["SMTP Mail"]
end

node_user(("Workspace User"))

node_user -->|"uses"| node_app
node_app -->|"creates"| node_workspace_state
node_app -->|"renders"| node_queue_ui
node_app -->|"renders"| node_customer_ui
node_app -->|"renders"| node_crm_ui
node_app -->|"renders"| node_reports_ui
node_app -->|"renders"| node_admin_ui
node_app -->|"renders"| node_notifications_ui
node_workspace_state -->|"calls"| node_api_client
node_api_client -->|"uses"| node_http_client
node_api_client -.->|"HTTP requests"| node_api_routes
node_api_routes -.->|"delegates"| node_identity
node_api_routes -.->|"delegates"| node_requests
node_api_routes -.->|"delegates"| node_customer_context
node_api_routes -.->|"delegates"| node_erp_cache
node_api_routes -.->|"delegates"| node_reporting
node_api_routes -.->|"delegates"| node_admin_ops
node_requests -->|"notifies"| node_notifications
node_notifications -->|"queues email"| node_mail
node_reporting -->|"creates"| node_notifications
node_reporting -->|"queues email"| node_mail
node_customer_context -->|"reads"| node_erp_read
node_erp_cache -->|"reads"| node_erp_read
node_erp_read -->|"GET requests"| node_erpnext
node_requests -.->|"persists workflow"| node_database
node_erp_cache -.->|"stores cache"| node_database
node_notifications -.->|"stores notices"| node_database
node_reporting -.->|"reads report data"| node_database

click node_app "https://github.com/manyisanewton/customer-engagement-platform/blob/main/frontend/src/App.vue"
click node_workspace_state "https://github.com/manyisanewton/customer-engagement-platform/blob/main/frontend/src/composables/usePortalWorkspace.ts"
click node_queue_ui "https://github.com/manyisanewton/customer-engagement-platform/blob/main/frontend/src/components/queue/QueueView.vue"
click node_customer_ui "https://github.com/manyisanewton/customer-engagement-platform/blob/main/frontend/src/components/customer/CustomerPortalView.vue"
click node_crm_ui "https://github.com/manyisanewton/customer-engagement-platform/blob/main/frontend/src/components/erpnext/ErpnextCrmView.vue"
click node_reports_ui "https://github.com/manyisanewton/customer-engagement-platform/blob/main/frontend/src/components/reports/ReportsView.vue"
click node_admin_ui "https://github.com/manyisanewton/customer-engagement-platform/blob/main/frontend/src/components/admin/AdminView.vue"
click node_notifications_ui "https://github.com/manyisanewton/customer-engagement-platform/blob/main/frontend/src/components/notifications/NotificationsView.vue"
click node_api_client "https://github.com/manyisanewton/customer-engagement-platform/blob/main/frontend/src/services/api.ts"
click node_http_client "https://github.com/manyisanewton/customer-engagement-platform/blob/main/frontend/src/services/http.ts"
click node_api_routes "https://github.com/manyisanewton/customer-engagement-platform/tree/main/backend/app/api/v1/routes"
click node_identity "https://github.com/manyisanewton/customer-engagement-platform/blob/main/backend/app/services/auth.py"
click node_requests "https://github.com/manyisanewton/customer-engagement-platform/blob/main/backend/app/services/portal_requests/service.py"
click node_customer_context "https://github.com/manyisanewton/customer-engagement-platform/blob/main/backend/app/services/customer_context/service.py"
click node_erp_cache "https://github.com/manyisanewton/customer-engagement-platform/blob/main/backend/app/services/erpnext_customer_cache/service.py"
click node_erp_read "https://github.com/manyisanewton/customer-engagement-platform/blob/main/backend/app/services/erpnext/read_service.py"
click node_notifications "https://github.com/manyisanewton/customer-engagement-platform/blob/main/backend/app/services/notifications/service.py"
click node_reporting "https://github.com/manyisanewton/customer-engagement-platform/blob/main/backend/app/services/reporting/service.py"
click node_admin_ops "https://github.com/manyisanewton/customer-engagement-platform/blob/main/backend/app/services/admin_ops/service.py"
click node_database "https://github.com/manyisanewton/customer-engagement-platform/blob/main/backend/app/db/session.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_workspace_state,node_queue_ui,node_customer_ui,node_crm_ui,node_reports_ui,node_admin_ui,node_notifications_ui,node_user toneBlue
class node_api_client,node_http_client,node_api_routes,node_identity toneAmber
class node_requests,node_customer_context,node_erp_cache,node_erp_read,node_notifications,node_reporting,node_admin_ops toneMint
class node_database,node_erpnext,node_mail toneRose
```

## Components

### Customer Workspace

- [Workspace Shell](https://github.com/manyisanewton/customer-engagement-platform/blob/main/frontend/src/App.vue): `frontend/src/App.vue`
- [Workspace State](https://github.com/manyisanewton/customer-engagement-platform/blob/main/frontend/src/composables/usePortalWorkspace.ts): `frontend/src/composables/usePortalWorkspace.ts`
- [Request Queue](https://github.com/manyisanewton/customer-engagement-platform/blob/main/frontend/src/components/queue/QueueView.vue): `frontend/src/components/queue/QueueView.vue`
- [Customer Portal](https://github.com/manyisanewton/customer-engagement-platform/blob/main/frontend/src/components/customer/CustomerPortalView.vue): `frontend/src/components/customer/CustomerPortalView.vue`
- [ERPNext CRM](https://github.com/manyisanewton/customer-engagement-platform/blob/main/frontend/src/components/erpnext/ErpnextCrmView.vue): `frontend/src/components/erpnext/ErpnextCrmView.vue`
- [Reports](https://github.com/manyisanewton/customer-engagement-platform/blob/main/frontend/src/components/reports/ReportsView.vue): `frontend/src/components/reports/ReportsView.vue`
- [Administration](https://github.com/manyisanewton/customer-engagement-platform/blob/main/frontend/src/components/admin/AdminView.vue): `frontend/src/components/admin/AdminView.vue`
- [Notifications](https://github.com/manyisanewton/customer-engagement-platform/blob/main/frontend/src/components/notifications/NotificationsView.vue): `frontend/src/components/notifications/NotificationsView.vue`

### API and Identity

- [API Client](https://github.com/manyisanewton/customer-engagement-platform/blob/main/frontend/src/services/api.ts): `frontend/src/services/api.ts`
- [HTTP Transport](https://github.com/manyisanewton/customer-engagement-platform/blob/main/frontend/src/services/http.ts): `frontend/src/services/http.ts`
- [Versioned Routes](https://github.com/manyisanewton/customer-engagement-platform/tree/main/backend/app/api/v1/routes): `backend/app/api/v1/routes`
- [Authentication](https://github.com/manyisanewton/customer-engagement-platform/blob/main/backend/app/services/auth.py): `backend/app/services/auth.py`

### Domain Services

- [Request Workflow](https://github.com/manyisanewton/customer-engagement-platform/blob/main/backend/app/services/portal_requests/service.py): `backend/app/services/portal_requests/service.py`
- [Customer Context](https://github.com/manyisanewton/customer-engagement-platform/blob/main/backend/app/services/customer_context/service.py): `backend/app/services/customer_context/service.py`
- [ERP Customer Cache](https://github.com/manyisanewton/customer-engagement-platform/blob/main/backend/app/services/erpnext_customer_cache/service.py): `backend/app/services/erpnext_customer_cache/service.py`
- [ERP Read Service](https://github.com/manyisanewton/customer-engagement-platform/blob/main/backend/app/services/erpnext/read_service.py): `backend/app/services/erpnext/read_service.py`
- [Notification Service](https://github.com/manyisanewton/customer-engagement-platform/blob/main/backend/app/services/notifications/service.py): `backend/app/services/notifications/service.py`
- [Reporting](https://github.com/manyisanewton/customer-engagement-platform/blob/main/backend/app/services/reporting/service.py): `backend/app/services/reporting/service.py`
- [Admin Operations](https://github.com/manyisanewton/customer-engagement-platform/blob/main/backend/app/services/admin_ops/service.py): `backend/app/services/admin_ops/service.py`

### Persistence and Integrations

- [PostgreSQL](https://github.com/manyisanewton/customer-engagement-platform/blob/main/backend/app/db/session.py): `backend/app/db/session.py`
- **ERPNext**
- **SMTP Mail**

### Other components

- **Workspace User**

## Connections

- Workspace User → Workspace Shell: uses (evidence: `frontend/src/App.vue`)
- Workspace Shell → Workspace State: creates (evidence: `frontend/src/App.vue`)
- Workspace Shell → Request Queue: renders (evidence: `frontend/src/App.vue`)
- Workspace Shell → Customer Portal: renders (evidence: `frontend/src/App.vue`)
- Workspace Shell → ERPNext CRM: renders (evidence: `frontend/src/App.vue`)
- Workspace Shell → Reports: renders (evidence: `frontend/src/App.vue`)
- Workspace Shell → Administration: renders (evidence: `frontend/src/App.vue`)
- Workspace Shell → Notifications: renders (evidence: `frontend/src/App.vue`)
- Workspace State → API Client: calls (evidence: `frontend/src/composables/usePortalWorkspace.ts`)
- API Client → HTTP Transport: uses (evidence: `frontend/src/services/auth.ts`)
- API Client → Versioned Routes: HTTP requests
- Versioned Routes → Authentication: delegates
- Versioned Routes → Request Workflow: delegates
- Versioned Routes → Customer Context: delegates
- Versioned Routes → ERP Customer Cache: delegates
- Versioned Routes → Reporting: delegates
- Versioned Routes → Admin Operations: delegates
- Request Workflow → Notification Service: notifies (evidence: `backend/app/services/portal_requests/service.py`)
- Notification Service → SMTP Mail: queues email (evidence: `backend/app/services/notifications/service.py`)
- Reporting → Notification Service: creates (evidence: `backend/app/services/reporting/service.py`)
- Reporting → SMTP Mail: queues email (evidence: `backend/app/services/reporting/service.py`)
- Customer Context → ERP Read Service: reads (evidence: `backend/app/services/customer_context/service.py`)
- ERP Customer Cache → ERP Read Service: reads (evidence: `backend/app/services/erpnext_customer_cache/service.py`)
- ERP Read Service → ERPNext: GET requests (evidence: `backend/app/services/erpnext/read_service.py`)
- Request Workflow → PostgreSQL: persists workflow
- ERP Customer Cache → PostgreSQL: stores cache (evidence: `backend/app/services/erpnext_customer_cache/service.py`)
- Notification Service → PostgreSQL: stores notices
- Reporting → PostgreSQL: reads report data
