# abdulsami12166/cybersave-frontend architecture

> Architecture diagram of the GitHub repository abdulsami12166/cybersave-frontend, 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/abdulsami12166/cybersave-frontend
- Repository: https://github.com/abdulsami12166/cybersave-frontend

## Overview

This repository is a React/TypeScript administrative console for CyberSave operations, rather than a backend service. An administrator enters through the routed app, authenticates, and uses operational pages to manage applications, services, users, transactions, and support; the pages fetch backend data through shared API configuration. The tree and source index document additional analytics, audit, operator, notification, and settings areas. Evidence is strongest for routing, authentication/API setup, service and application actions, and socket connectivity; the backend implementation is not present in this repository.

Main entry points: [`src/App.tsx`](https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/App.tsx) (Routed app), [`src/utils/apiConfig.ts`](https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/utils/apiConfig.ts) (API client), [`src/pages/ServiceWizard.tsx`](https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/pages/ServiceWizard.tsx) (Service wizard), [`src/pages/Applications.tsx`](https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/pages/Applications.tsx) (Applications)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application shell"]
  node_app["Routed app<br/>[App.tsx]"]
  node_layout["Admin layout<br/>[Layout.tsx]"]
  node_login["Sign in<br/>[Login.tsx]"]
  node_dashboard["Dashboard<br/>[Dashboard.tsx]"]
end

subgraph group_operations["Core operations"]
  node_users["User management<br/>[UserManagement.tsx]"]
  node_userdetail["User details"]
  node_applications["Applications<br/>[Applications.tsx]"]
  node_applicationdetail["Application detail"]
  node_operators["Operator management<br/>[Operators.tsx]"]
  node_operatordetail["Operator detail<br/>[OperatorDetail.tsx]"]
  node_transactions["Transactions<br/>[Transactions.tsx]"]
  node_refunds["Refunds<br/>[Refunds.tsx]"]
end

subgraph group_service["Service configuration"]
  node_services["Service catalog<br/>[Services.tsx]"]
  node_servicewizard["Service wizard<br/>[ServiceWizard.tsx]"]
  node_addservice["Simple service editor<br/>[AddNewService.tsx]"]
end

subgraph group_oversight["Monitoring and support"]
  node_analytics["Analytics<br/>[Analytics.tsx]"]
  node_audit["Audit logs<br/>[AuditLogs.tsx]"]
  node_support["Support tickets<br/>[SupportTickets.tsx]"]
  node_ticketdetail["Ticket detail"]
  node_ticketresolve["Resolve ticket"]
  node_notifications["Notifications<br/>[Notifications.tsx]"]
  node_notificationmodal["Send notification"]
  node_settings["Settings<br/>[Settings.tsx]"]
end

subgraph group_shared["Shared runtime"]
  node_auth["Authentication state<br/>[AuthContext.tsx]"]
  node_socket["Realtime connection<br/>[SocketContext.tsx]"]
  node_api["API client<br/>[apiConfig.ts]"]
  node_normalize["Data normalization<br/>[normalize.ts]"]
end

node_admin(("Administrator"))
node_backend{{"Backend service"}}

node_admin -->|"uses console"| node_app
node_app -->|"provides auth"| node_auth
node_app -->|"provides socket"| node_socket
node_app -->|"routes to"| node_login
node_app -->|"routes through"| node_layout
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_users
node_app -->|"routes to"| node_userdetail
node_app -->|"routes to"| node_applications
node_app -->|"routes to"| node_applicationdetail
node_app -->|"routes to"| node_services
node_app -->|"routes to"| node_servicewizard
node_app -->|"routes to"| node_operators
node_app -->|"routes to"| node_operatordetail
node_app -->|"routes to"| node_transactions
node_app -->|"routes to"| node_refunds
node_app -->|"routes to"| node_analytics
node_app -->|"routes to"| node_audit
node_app -->|"routes to"| node_support
node_app -->|"routes to"| node_ticketdetail
node_app -->|"routes to"| node_ticketresolve
node_app -->|"routes to"| node_notifications
node_app -->|"routes to"| node_settings
node_auth -->|"fetches profile"| node_api
node_applications -->|"fetches and updates"| node_api
node_servicewizard -->|"loads and saves"| node_api
node_servicewizard -->|"renders in simple mode"| node_addservice
node_addservice -->|"creates service"| node_api
node_notificationmodal -->|"sends notification"| node_api
node_api -->|"fetches API"| node_backend
node_socket -->|"connects realtime"| node_backend

click node_app "https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/App.tsx"
click node_layout "https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/components/Layout.tsx"
click node_login "https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/pages/Login.tsx"
click node_dashboard "https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/components/Dashboard.tsx"
click node_users "https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/pages/UserManagement.tsx"
click node_userdetail "https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/pages/UserManagementDetail.tsx"
click node_applications "https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/pages/Applications.tsx"
click node_applicationdetail "https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/pages/ApplicationDetail.tsx"
click node_operators "https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/pages/Operators.tsx"
click node_operatordetail "https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/pages/OperatorDetail.tsx"
click node_services "https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/pages/Services.tsx"
click node_servicewizard "https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/pages/ServiceWizard.tsx"
click node_addservice "https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/pages/AddNewService.tsx"
click node_transactions "https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/pages/Transactions.tsx"
click node_refunds "https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/pages/Refunds.tsx"
click node_analytics "https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/pages/Analytics.tsx"
click node_audit "https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/pages/AuditLogs.tsx"
click node_support "https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/pages/SupportTickets.tsx"
click node_ticketdetail "https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/pages/SupportTicketDetail.tsx"
click node_ticketresolve "https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/pages/SupportTicketResolve.tsx"
click node_notifications "https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/pages/Notifications.tsx"
click node_notificationmodal "https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/components/SendNotificationModal.tsx"
click node_settings "https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/pages/Settings.tsx"
click node_auth "https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/context/AuthContext.tsx"
click node_socket "https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/context/SocketContext.tsx"
click node_api "https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/utils/apiConfig.ts"
click node_normalize "https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/utils/normalize.ts"

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_layout,node_login,node_dashboard toneBlue
class node_users,node_userdetail,node_applications,node_applicationdetail,node_operators,node_operatordetail,node_transactions,node_refunds toneAmber
class node_services,node_servicewizard,node_addservice toneMint
class node_analytics,node_audit,node_support,node_ticketdetail,node_ticketresolve,node_notifications,node_notificationmodal,node_settings toneRose
class node_auth,node_socket,node_api,node_normalize,node_admin,node_backend toneIndigo
```

## Components

### Application shell

- [Routed app](https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/App.tsx): `src/App.tsx`
- [Admin layout](https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/components/Layout.tsx): `src/components/Layout.tsx`
- [Sign in](https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/pages/Login.tsx): `src/pages/Login.tsx`
- [Dashboard](https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/components/Dashboard.tsx): `src/components/Dashboard.tsx`

### Core operations

- [User management](https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/pages/UserManagement.tsx): `src/pages/UserManagement.tsx`
- [User details](https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/pages/UserManagementDetail.tsx): `src/pages/UserManagementDetail.tsx`
- [Applications](https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/pages/Applications.tsx): `src/pages/Applications.tsx`
- [Application detail](https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/pages/ApplicationDetail.tsx): `src/pages/ApplicationDetail.tsx`
- [Operator management](https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/pages/Operators.tsx): `src/pages/Operators.tsx`
- [Operator detail](https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/pages/OperatorDetail.tsx): `src/pages/OperatorDetail.tsx`
- [Transactions](https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/pages/Transactions.tsx): `src/pages/Transactions.tsx`
- [Refunds](https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/pages/Refunds.tsx): `src/pages/Refunds.tsx`

### Service configuration

- [Service catalog](https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/pages/Services.tsx): `src/pages/Services.tsx`
- [Service wizard](https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/pages/ServiceWizard.tsx): `src/pages/ServiceWizard.tsx`
- [Simple service editor](https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/pages/AddNewService.tsx): `src/pages/AddNewService.tsx`

### Monitoring and support

- [Analytics](https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/pages/Analytics.tsx): `src/pages/Analytics.tsx`
- [Audit logs](https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/pages/AuditLogs.tsx): `src/pages/AuditLogs.tsx`
- [Support tickets](https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/pages/SupportTickets.tsx): `src/pages/SupportTickets.tsx`
- [Ticket detail](https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/pages/SupportTicketDetail.tsx): `src/pages/SupportTicketDetail.tsx`
- [Resolve ticket](https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/pages/SupportTicketResolve.tsx): `src/pages/SupportTicketResolve.tsx`
- [Notifications](https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/pages/Notifications.tsx): `src/pages/Notifications.tsx`
- [Send notification](https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/components/SendNotificationModal.tsx): `src/components/SendNotificationModal.tsx`
- [Settings](https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/pages/Settings.tsx): `src/pages/Settings.tsx`

### Shared runtime

- [Authentication state](https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/context/AuthContext.tsx): `src/context/AuthContext.tsx`
- [Realtime connection](https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/context/SocketContext.tsx): `src/context/SocketContext.tsx`
- [API client](https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/utils/apiConfig.ts): `src/utils/apiConfig.ts`
- [Data normalization](https://github.com/abdulsami12166/cybersave-frontend/blob/main/src/utils/normalize.ts): `src/utils/normalize.ts`

### Other components

- **Administrator**
- **Backend service**

## Connections

- Administrator → Routed app: uses console (evidence: `src/App.tsx`)
- Routed app → Authentication state: provides auth (evidence: `src/App.tsx`)
- Routed app → Realtime connection: provides socket (evidence: `src/App.tsx`)
- Routed app → Sign in: routes to (evidence: `src/App.tsx`)
- Routed app → Admin layout: routes through (evidence: `src/App.tsx`)
- Routed app → Dashboard: routes to (evidence: `src/App.tsx`)
- Routed app → User management: routes to (evidence: `src/App.tsx`)
- Routed app → User details: routes to (evidence: `src/App.tsx`)
- Routed app → Applications: routes to (evidence: `src/App.tsx`)
- Routed app → Application detail: routes to (evidence: `src/App.tsx`)
- Routed app → Service catalog: routes to (evidence: `src/App.tsx`)
- Routed app → Service wizard: routes to (evidence: `src/App.tsx`)
- Routed app → Operator management: routes to (evidence: `src/App.tsx`)
- Routed app → Operator detail: routes to (evidence: `src/App.tsx`)
- Routed app → Transactions: routes to (evidence: `src/App.tsx`)
- Routed app → Refunds: routes to (evidence: `src/App.tsx`)
- Routed app → Analytics: routes to (evidence: `src/App.tsx`)
- Routed app → Audit logs: routes to (evidence: `src/App.tsx`)
- Routed app → Support tickets: routes to (evidence: `src/App.tsx`)
- Routed app → Ticket detail: routes to (evidence: `src/App.tsx`)
- Routed app → Resolve ticket: routes to (evidence: `src/App.tsx`)
- Routed app → Notifications: routes to (evidence: `src/App.tsx`)
- Routed app → Settings: routes to (evidence: `src/App.tsx`)
- Authentication state → API client: fetches profile (evidence: `src/context/AuthContext.tsx`)
- Applications → API client: fetches and updates (evidence: `src/pages/Applications.tsx`)
- Service wizard → API client: loads and saves (evidence: `src/pages/ServiceWizard.tsx`)
- Service wizard → Simple service editor: renders in simple mode (evidence: `src/pages/ServiceWizard.tsx`)
- Simple service editor → API client: creates service (evidence: `src/pages/AddNewService.tsx`)
- Send notification → API client: sends notification (evidence: `src/components/SendNotificationModal.tsx`)
- API client → Backend service: fetches API (evidence: `src/utils/apiConfig.ts`)
- Realtime connection → Backend service: connects realtime (evidence: `src/context/SocketContext.tsx`)
