# optigo-app/support.optigo architecture

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

- Interactive diagram: https://gitdiagram.com/optigo-app/support.optigo
- Repository: https://github.com/optigo-app/support.optigo

## Overview

This is a React web application for operational call logging, ticket handling, delivery and training workflows, and order requests, with shared authentication, notifications, and PWA support. The source tree contains parallel v1 and v2 implementations; the graph uses v1 for documented domain workflows and includes the sampled v2 call-session persistence layer. The README is empty, so capability coverage comes from the source tree; edges are limited to relationships shown in excerpts or the SOURCE INDEX.

Main entry points: [`src/v1/components/_ui/HeaderWrapper.jsx`](https://github.com/optigo-app/support.optigo/blob/main/src/v1/components/_ui/HeaderWrapper.jsx) (Navigation shell), [`src/v1/index.js`](https://github.com/optigo-app/support.optigo/blob/main/src/v1/index.js) (React application), [`src/v1/components/Delivery&Training/context/AuthProvider.js`](https://github.com/optigo-app/support.optigo/blob/main/src/v1/components/Delivery%26Training/context/AuthProvider.js) (Authentication), [`src/v1/components/Delivery&Training/components/Training/index.jsx`](https://github.com/optigo-app/support.optigo/blob/main/src/v1/components/Delivery%26Training/components/Training/index.jsx) (Training workflow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Application runtime"]
  node_app["React application<br/>[index.js]"]
  node_entry["Route entry<br/>[Entry.js]"]
  node_nav["Navigation shell<br/>[HeaderWrapper.jsx]"]
end

subgraph group_calls["Calls and tickets"]
  node_calls["Call logging<br/>[CallLogger.jsx]"]
  node_callapi["Call API"]
  node_session["Call session state<br/>[useCallSession.js]"]
  node_sessionstore[("Session storage")]
  node_tickets["Ticket workspace<br/>[index.js]"]
  node_ticketapi["Ticket API"]
end

subgraph group_operations["Operational workflows"]
  node_delivery["Delivery dashboard<br/>[index.jsx]"]
  node_deliveryprovider["Delivery state"]
  node_deliveryapi["Delivery API"]
  node_training["Training workflow<br/>[index.jsx]"]
  node_trainingprovider["Training state"]
  node_points["Order requests<br/>[index.jsx]"]
  node_pointstate["Order request state"]
  node_pointapi["Order request API"]
end

subgraph group_shared["Shared services"]
  node_auth["Authentication<br/>[AuthProvider.js]"]
  node_notifications["Notification preferences"]
  node_pwa["PWA services<br/>[index.js]"]
end

node_user(("Staff user"))

node_user -->|"opens"| node_app
node_app -->|"renders"| node_entry
node_app -->|"provides"| node_pwa
node_app -->|"provides"| node_notifications
node_app -.->|"routes through"| node_nav
node_nav -.->|"opens"| node_calls
node_nav -.->|"opens"| node_tickets
node_nav -.->|"opens"| node_delivery
node_nav -.->|"opens"| node_training
node_nav -.->|"opens"| node_points
node_session -->|"persists"| node_sessionstore
node_auth -->|"initializes"| node_deliveryapi
node_auth -->|"loads token"| node_trainingprovider
node_auth -->|"initializes"| node_pointapi
node_delivery -->|"uses state"| node_deliveryprovider
node_deliveryprovider -->|"requests data"| node_deliveryapi
node_training -->|"uses state"| node_trainingprovider
node_trainingprovider -->|"loads API data"| node_training
node_points -->|"uses state"| node_pointstate
node_pointstate -->|"requests data"| node_pointapi
node_calls -.->|"requests data"| node_callapi
node_tickets -.->|"requests data"| node_ticketapi

click node_app "https://github.com/optigo-app/support.optigo/blob/main/src/v1/index.js"
click node_entry "https://github.com/optigo-app/support.optigo/blob/main/src/v1/Entry.js"
click node_nav "https://github.com/optigo-app/support.optigo/blob/main/src/v1/components/_ui/HeaderWrapper.jsx"
click node_calls "https://github.com/optigo-app/support.optigo/blob/main/src/v1/components/CallLogger/CallLogger.jsx"
click node_callapi "https://github.com/optigo-app/support.optigo/blob/main/src/v1/apis/CallLogApiController.js"
click node_session "https://github.com/optigo-app/support.optigo/blob/main/src/v2/hooks/useCallSession.js"
click node_sessionstore "https://github.com/optigo-app/support.optigo/blob/main/src/v2/utils/callSessionStorage.js"
click node_tickets "https://github.com/optigo-app/support.optigo/blob/main/src/v1/components/TicketUi/index.js"
click node_ticketapi "https://github.com/optigo-app/support.optigo/blob/main/src/v1/apis/TicketApiController.js"
click node_delivery "https://github.com/optigo-app/support.optigo/blob/main/src/v1/components/Delivery%26Training/components/Delivery/index.jsx"
click node_deliveryprovider "https://github.com/optigo-app/support.optigo/blob/main/src/v1/components/Delivery%26Training/context/DeliveryProvider.js"
click node_deliveryapi "https://github.com/optigo-app/support.optigo/blob/main/src/v1/apis/DeliveryController.js"
click node_training "https://github.com/optigo-app/support.optigo/blob/main/src/v1/components/Delivery%26Training/components/Training/index.jsx"
click node_trainingprovider "https://github.com/optigo-app/support.optigo/blob/main/src/v1/components/Delivery%26Training/context/TrainingProvider.js"
click node_points "https://github.com/optigo-app/support.optigo/blob/main/src/v1/components/PointToBeDiscuss/index.jsx"
click node_pointstate "https://github.com/optigo-app/support.optigo/blob/main/src/v1/components/PointToBeDiscuss/context/usePointToDiscuss.js"
click node_pointapi "https://github.com/optigo-app/support.optigo/blob/main/src/v1/apis/PointToBeDiscussController.js"
click node_auth "https://github.com/optigo-app/support.optigo/blob/main/src/v1/components/Delivery%26Training/context/AuthProvider.js"
click node_notifications "https://github.com/optigo-app/support.optigo/blob/main/src/v1/context/NotificationManager.js"
click node_pwa "https://github.com/optigo-app/support.optigo/blob/main/src/v1/pwa/index.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_entry,node_nav,node_user toneBlue
class node_calls,node_callapi,node_session,node_sessionstore,node_tickets,node_ticketapi toneAmber
class node_delivery,node_deliveryprovider,node_deliveryapi,node_training,node_trainingprovider,node_points,node_pointstate,node_pointapi toneMint
class node_auth,node_notifications,node_pwa toneRose
```

## Components

### Application runtime

- [React application](https://github.com/optigo-app/support.optigo/blob/main/src/v1/index.js): `src/v1/index.js`
- [Route entry](https://github.com/optigo-app/support.optigo/blob/main/src/v1/Entry.js): `src/v1/Entry.js`
- [Navigation shell](https://github.com/optigo-app/support.optigo/blob/main/src/v1/components/_ui/HeaderWrapper.jsx): `src/v1/components/_ui/HeaderWrapper.jsx`

### Calls and tickets

- [Call logging](https://github.com/optigo-app/support.optigo/blob/main/src/v1/components/CallLogger/CallLogger.jsx): `src/v1/components/CallLogger/CallLogger.jsx`
- [Call API](https://github.com/optigo-app/support.optigo/blob/main/src/v1/apis/CallLogApiController.js): `src/v1/apis/CallLogApiController.js`
- [Call session state](https://github.com/optigo-app/support.optigo/blob/main/src/v2/hooks/useCallSession.js): `src/v2/hooks/useCallSession.js`
- [Session storage](https://github.com/optigo-app/support.optigo/blob/main/src/v2/utils/callSessionStorage.js): `src/v2/utils/callSessionStorage.js`
- [Ticket workspace](https://github.com/optigo-app/support.optigo/blob/main/src/v1/components/TicketUi/index.js): `src/v1/components/TicketUi/index.js`
- [Ticket API](https://github.com/optigo-app/support.optigo/blob/main/src/v1/apis/TicketApiController.js): `src/v1/apis/TicketApiController.js`

### Operational workflows

- [Delivery dashboard](https://github.com/optigo-app/support.optigo/blob/main/src/v1/components/Delivery%26Training/components/Delivery/index.jsx): `src/v1/components/Delivery&Training/components/Delivery/index.jsx`
- [Delivery state](https://github.com/optigo-app/support.optigo/blob/main/src/v1/components/Delivery%26Training/context/DeliveryProvider.js): `src/v1/components/Delivery&Training/context/DeliveryProvider.js`
- [Delivery API](https://github.com/optigo-app/support.optigo/blob/main/src/v1/apis/DeliveryController.js): `src/v1/apis/DeliveryController.js`
- [Training workflow](https://github.com/optigo-app/support.optigo/blob/main/src/v1/components/Delivery%26Training/components/Training/index.jsx): `src/v1/components/Delivery&Training/components/Training/index.jsx`
- [Training state](https://github.com/optigo-app/support.optigo/blob/main/src/v1/components/Delivery%26Training/context/TrainingProvider.js): `src/v1/components/Delivery&Training/context/TrainingProvider.js`
- [Order requests](https://github.com/optigo-app/support.optigo/blob/main/src/v1/components/PointToBeDiscuss/index.jsx): `src/v1/components/PointToBeDiscuss/index.jsx`
- [Order request state](https://github.com/optigo-app/support.optigo/blob/main/src/v1/components/PointToBeDiscuss/context/usePointToDiscuss.js): `src/v1/components/PointToBeDiscuss/context/usePointToDiscuss.js`
- [Order request API](https://github.com/optigo-app/support.optigo/blob/main/src/v1/apis/PointToBeDiscussController.js): `src/v1/apis/PointToBeDiscussController.js`

### Shared services

- [Authentication](https://github.com/optigo-app/support.optigo/blob/main/src/v1/components/Delivery%26Training/context/AuthProvider.js): `src/v1/components/Delivery&Training/context/AuthProvider.js`
- [Notification preferences](https://github.com/optigo-app/support.optigo/blob/main/src/v1/context/NotificationManager.js): `src/v1/context/NotificationManager.js`
- [PWA services](https://github.com/optigo-app/support.optigo/blob/main/src/v1/pwa/index.js): `src/v1/pwa/index.js`

### Other components

- **Staff user**

## Connections

- Staff user → React application: opens (evidence: `src/v1/index.js`)
- React application → Route entry: renders (evidence: `src/v1/index.js`)
- React application → PWA services: provides (evidence: `src/v1/index.js`)
- React application → Notification preferences: provides (evidence: `src/v1/index.js`)
- React application → Navigation shell: routes through
- Navigation shell → Call logging: opens
- Navigation shell → Ticket workspace: opens
- Navigation shell → Delivery dashboard: opens (evidence: `src/v1/components/Delivery&Training/components/Delivery/index.jsx`)
- Navigation shell → Training workflow: opens (evidence: `src/v1/components/Delivery&Training/components/Training/index.jsx`)
- Navigation shell → Order requests: opens (evidence: `src/v1/components/PointToBeDiscuss/index.jsx`)
- Call session state → Session storage: persists (evidence: `src/v2/hooks/useCallSession.js`)
- Authentication → Delivery API: initializes (evidence: `src/v1/components/Delivery&Training/context/AuthProvider.js`)
- Authentication → Training state: loads token (evidence: `src/v1/components/Delivery&Training/context/AuthProvider.js`)
- Authentication → Order request API: initializes (evidence: `src/v1/components/Delivery&Training/context/AuthProvider.js`)
- Delivery dashboard → Delivery state: uses state (evidence: `src/v1/components/Delivery&Training/components/Delivery/index.jsx`)
- Delivery state → Delivery API: requests data (evidence: `src/v1/components/Delivery&Training/context/DeliveryProvider.js`)
- Training workflow → Training state: uses state (evidence: `src/v1/components/Delivery&Training/components/Training/index.jsx`)
- Training state → Training workflow: loads API data (evidence: `src/v1/components/Delivery&Training/context/TrainingProvider.js`)
- Order requests → Order request state: uses state (evidence: `src/v1/components/PointToBeDiscuss/Main.js`)
- Order request state → Order request API: requests data (evidence: `src/v1/components/PointToBeDiscuss/context/usePointToDiscuss.js`)
- Call logging → Call API: requests data
- Ticket workspace → Ticket API: requests data
