# karremanoj5599-del/acc architecture

> Architecture diagram of the GitHub repository karremanoj5599-del/acc, 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/karremanoj5599-del/acc
- Repository: https://github.com/karremanoj5599-del/acc

## Overview

This repository implements eSSL access-control management: operators sign in to a web dashboard to monitor devices, users, doors, and access activity; API and background workers coordinate device connections, synchronization, and live event processing. The SDK wraps the vendor PullSDK for device operations. The tree and sampled source support these runtime paths, but the web page excerpts do not show their API calls, and the SignalR hub implementation is not sampled, so those links are left unasserted.

Main entry points: [`src/EsslAccessControl.Api/Data/AppDbContext.cs`](https://github.com/karremanoj5599-del/acc/blob/main/src/EsslAccessControl.Api/Data/AppDbContext.cs) (Data context), [`src/EsslAccessControl.Api/Services/DeviceConnectionManager.cs`](https://github.com/karremanoj5599-del/acc/blob/main/src/EsslAccessControl.Api/Services/DeviceConnectionManager.cs) (Connection manager), [`src/EsslAccessControl.Web/src/App.tsx`](https://github.com/karremanoj5599-del/acc/blob/main/src/EsslAccessControl.Web/src/App.tsx) (Dashboard routes), [`src/EsslSdk/PullSdkWrapper.cs`](https://github.com/karremanoj5599-del/acc/blob/main/src/EsslSdk/PullSdkWrapper.cs) (PullSDK wrapper)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Operator dashboard"]
  node_webapp["Dashboard routes<br/>[App.tsx]"]
  node_layout["Dashboard layout<br/>[Layout.tsx]"]
  node_dashboard["Activity dashboard<br/>[Dashboard.tsx]"]
  node_devicepage["Device management<br/>[Devices.tsx]"]
  node_userpage["User management<br/>[Users.tsx]"]
end

subgraph group_api["Management API"]
  node_authapi["Authentication endpoints<br/>[AuthController.cs]"]
  node_authservice["JWT login<br/>[AuthService.cs]"]
  node_deviceapi["Device and door endpoints"]
  node_controllers["Other API endpoints<br/>[AllControllers.cs]"]
  node_hub["Realtime hub<br/>[RealTimeHub.cs]"]
end

subgraph group_service["Background processing"]
  node_heartbeat["Connectivity worker<br/>[HeartbeatWorker.cs]"]
  node_realtime["Live log worker"]
  node_syncworker["Scheduled sync worker<br/>[SyncWorker.cs]"]
end

subgraph group_storage["Persistence"]
  node_dbcontext["Data context<br/>[AppDbContext.cs]"]
  node_entities["Domain entities<br/>[AllEntities.cs]"]
  node_database[("PostgreSQL database")]
end

subgraph group_device["Device integration"]
  node_connections["Connection manager"]
  node_sync["Device synchronization"]
  node_sdk["PullSDK wrapper<br/>[PullSdkWrapper.cs]"]
  node_native["Native SDK binding<br/>[PullSdkNative.cs]"]
  node_sdkmodels["Device data models<br/>[DeviceModels.cs]"]
  node_datamodels["Access data models<br/>[DataModels.cs]"]
  node_eventtypes["Event type definitions<br/>[EventType.cs]"]
end

node_operator(("Operator"))
node_device["eSSL access device"]

node_operator -->|"uses"| node_webapp
node_webapp -->|"renders"| node_layout
node_webapp -->|"routes to"| node_dashboard
node_webapp -->|"routes to"| node_devicepage
node_webapp -->|"routes to"| node_userpage
node_authapi -->|"delegates to"| node_authservice
node_authservice -->|"reads and updates"| node_dbcontext
node_deviceapi -->|"reads and writes"| node_dbcontext
node_deviceapi -->|"manages connections"| node_connections
node_deviceapi -->|"requests sync"| node_sync
node_controllers -->|"reads and writes"| node_dbcontext
node_controllers -->|"uses"| node_connections
node_connections -->|"creates connection"| node_sdk
node_sdk -->|"invokes"| node_native
node_sdk -->|"uses"| node_sdkmodels
node_sdk -->|"uses"| node_datamodels
node_heartbeat -->|"reads and updates"| node_dbcontext
node_heartbeat -->|"checks and reconnects"| node_connections
node_realtime -->|"polls logs"| node_connections
node_realtime -->|"stores events"| node_dbcontext
node_realtime -->|"broadcasts events"| node_hub
node_syncworker -->|"requests sync"| node_sync
node_sync -->|"gets device connection"| node_connections
node_sync -->|"reads and writes"| node_dbcontext
node_dbcontext -->|"maps"| node_entities
node_dbcontext -.->|"persists"| node_database
node_device -.->|"device I/O"| node_sdk

click node_webapp "https://github.com/karremanoj5599-del/acc/blob/main/src/EsslAccessControl.Web/src/App.tsx"
click node_layout "https://github.com/karremanoj5599-del/acc/blob/main/src/EsslAccessControl.Web/src/components/Layout.tsx"
click node_dashboard "https://github.com/karremanoj5599-del/acc/blob/main/src/EsslAccessControl.Web/src/pages/Dashboard.tsx"
click node_devicepage "https://github.com/karremanoj5599-del/acc/blob/main/src/EsslAccessControl.Web/src/pages/Devices.tsx"
click node_userpage "https://github.com/karremanoj5599-del/acc/blob/main/src/EsslAccessControl.Web/src/pages/Users.tsx"
click node_authapi "https://github.com/karremanoj5599-del/acc/blob/main/src/EsslAccessControl.Api/Controllers/AuthController.cs"
click node_authservice "https://github.com/karremanoj5599-del/acc/blob/main/src/EsslAccessControl.Api/Services/AuthService.cs"
click node_deviceapi "https://github.com/karremanoj5599-del/acc/blob/main/src/EsslAccessControl.Api/Controllers/DevicesController.cs"
click node_controllers "https://github.com/karremanoj5599-del/acc/blob/main/src/EsslAccessControl.Api/Controllers/AllControllers.cs"
click node_hub "https://github.com/karremanoj5599-del/acc/blob/main/src/EsslAccessControl.Api/Hubs/RealTimeHub.cs"
click node_connections "https://github.com/karremanoj5599-del/acc/blob/main/src/EsslAccessControl.Api/Services/DeviceConnectionManager.cs"
click node_sync "https://github.com/karremanoj5599-del/acc/blob/main/src/EsslAccessControl.Api/Services/DeviceSyncService.cs"
click node_sdk "https://github.com/karremanoj5599-del/acc/blob/main/src/EsslSdk/PullSdkWrapper.cs"
click node_native "https://github.com/karremanoj5599-del/acc/blob/main/src/EsslSdk/PullSdkNative.cs"
click node_sdkmodels "https://github.com/karremanoj5599-del/acc/blob/main/src/EsslSdk/Models/DeviceModels.cs"
click node_datamodels "https://github.com/karremanoj5599-del/acc/blob/main/src/EsslSdk/Models/DataModels.cs"
click node_eventtypes "https://github.com/karremanoj5599-del/acc/blob/main/src/EsslSdk/Enums/EventType.cs"
click node_heartbeat "https://github.com/karremanoj5599-del/acc/blob/main/src/EsslAccessControl.Service/Workers/HeartbeatWorker.cs"
click node_realtime "https://github.com/karremanoj5599-del/acc/blob/main/src/EsslAccessControl.Service/Workers/RealTimeLogWorker.cs"
click node_syncworker "https://github.com/karremanoj5599-del/acc/blob/main/src/EsslAccessControl.Service/Workers/SyncWorker.cs"
click node_dbcontext "https://github.com/karremanoj5599-del/acc/blob/main/src/EsslAccessControl.Api/Data/AppDbContext.cs"
click node_entities "https://github.com/karremanoj5599-del/acc/blob/main/src/EsslAccessControl.Api/Data/Entities/AllEntities.cs"
click node_database "https://github.com/karremanoj5599-del/acc/blob/main/src/Database/001_initial_schema.sql"

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_webapp,node_layout,node_dashboard,node_devicepage,node_userpage toneBlue
class node_authapi,node_authservice,node_deviceapi,node_controllers,node_hub toneAmber
class node_heartbeat,node_realtime,node_syncworker toneMint
class node_dbcontext,node_entities,node_database toneRose
class node_connections,node_sync,node_sdk,node_native,node_sdkmodels,node_datamodels,node_eventtypes,node_operator,node_device toneIndigo
```

## Components

### Operator dashboard

- [Dashboard routes](https://github.com/karremanoj5599-del/acc/blob/main/src/EsslAccessControl.Web/src/App.tsx): `src/EsslAccessControl.Web/src/App.tsx`
- [Dashboard layout](https://github.com/karremanoj5599-del/acc/blob/main/src/EsslAccessControl.Web/src/components/Layout.tsx): `src/EsslAccessControl.Web/src/components/Layout.tsx`
- [Activity dashboard](https://github.com/karremanoj5599-del/acc/blob/main/src/EsslAccessControl.Web/src/pages/Dashboard.tsx): `src/EsslAccessControl.Web/src/pages/Dashboard.tsx`
- [Device management](https://github.com/karremanoj5599-del/acc/blob/main/src/EsslAccessControl.Web/src/pages/Devices.tsx): `src/EsslAccessControl.Web/src/pages/Devices.tsx`
- [User management](https://github.com/karremanoj5599-del/acc/blob/main/src/EsslAccessControl.Web/src/pages/Users.tsx): `src/EsslAccessControl.Web/src/pages/Users.tsx`

### Management API

- [Authentication endpoints](https://github.com/karremanoj5599-del/acc/blob/main/src/EsslAccessControl.Api/Controllers/AuthController.cs): `src/EsslAccessControl.Api/Controllers/AuthController.cs`
- [JWT login](https://github.com/karremanoj5599-del/acc/blob/main/src/EsslAccessControl.Api/Services/AuthService.cs): `src/EsslAccessControl.Api/Services/AuthService.cs`
- [Device and door endpoints](https://github.com/karremanoj5599-del/acc/blob/main/src/EsslAccessControl.Api/Controllers/DevicesController.cs): `src/EsslAccessControl.Api/Controllers/DevicesController.cs`
- [Other API endpoints](https://github.com/karremanoj5599-del/acc/blob/main/src/EsslAccessControl.Api/Controllers/AllControllers.cs): `src/EsslAccessControl.Api/Controllers/AllControllers.cs`
- [Realtime hub](https://github.com/karremanoj5599-del/acc/blob/main/src/EsslAccessControl.Api/Hubs/RealTimeHub.cs): `src/EsslAccessControl.Api/Hubs/RealTimeHub.cs`

### Background processing

- [Connectivity worker](https://github.com/karremanoj5599-del/acc/blob/main/src/EsslAccessControl.Service/Workers/HeartbeatWorker.cs): `src/EsslAccessControl.Service/Workers/HeartbeatWorker.cs`
- [Live log worker](https://github.com/karremanoj5599-del/acc/blob/main/src/EsslAccessControl.Service/Workers/RealTimeLogWorker.cs): `src/EsslAccessControl.Service/Workers/RealTimeLogWorker.cs`
- [Scheduled sync worker](https://github.com/karremanoj5599-del/acc/blob/main/src/EsslAccessControl.Service/Workers/SyncWorker.cs): `src/EsslAccessControl.Service/Workers/SyncWorker.cs`

### Persistence

- [Data context](https://github.com/karremanoj5599-del/acc/blob/main/src/EsslAccessControl.Api/Data/AppDbContext.cs): `src/EsslAccessControl.Api/Data/AppDbContext.cs`
- [Domain entities](https://github.com/karremanoj5599-del/acc/blob/main/src/EsslAccessControl.Api/Data/Entities/AllEntities.cs): `src/EsslAccessControl.Api/Data/Entities/AllEntities.cs`
- [PostgreSQL database](https://github.com/karremanoj5599-del/acc/blob/main/src/Database/001_initial_schema.sql): `src/Database/001_initial_schema.sql`

### Device integration

- [Connection manager](https://github.com/karremanoj5599-del/acc/blob/main/src/EsslAccessControl.Api/Services/DeviceConnectionManager.cs): `src/EsslAccessControl.Api/Services/DeviceConnectionManager.cs`
- [Device synchronization](https://github.com/karremanoj5599-del/acc/blob/main/src/EsslAccessControl.Api/Services/DeviceSyncService.cs): `src/EsslAccessControl.Api/Services/DeviceSyncService.cs`
- [PullSDK wrapper](https://github.com/karremanoj5599-del/acc/blob/main/src/EsslSdk/PullSdkWrapper.cs): `src/EsslSdk/PullSdkWrapper.cs`
- [Native SDK binding](https://github.com/karremanoj5599-del/acc/blob/main/src/EsslSdk/PullSdkNative.cs): `src/EsslSdk/PullSdkNative.cs`
- [Device data models](https://github.com/karremanoj5599-del/acc/blob/main/src/EsslSdk/Models/DeviceModels.cs): `src/EsslSdk/Models/DeviceModels.cs`
- [Access data models](https://github.com/karremanoj5599-del/acc/blob/main/src/EsslSdk/Models/DataModels.cs): `src/EsslSdk/Models/DataModels.cs`
- [Event type definitions](https://github.com/karremanoj5599-del/acc/blob/main/src/EsslSdk/Enums/EventType.cs): `src/EsslSdk/Enums/EventType.cs`

### Other components

- **Operator**
- **eSSL access device**

## Connections

- Operator → Dashboard routes: uses (evidence: `src/EsslAccessControl.Web/src/App.tsx`)
- Dashboard routes → Dashboard layout: renders (evidence: `src/EsslAccessControl.Web/src/App.tsx`)
- Dashboard routes → Activity dashboard: routes to (evidence: `src/EsslAccessControl.Web/src/App.tsx`)
- Dashboard routes → Device management: routes to (evidence: `src/EsslAccessControl.Web/src/App.tsx`)
- Dashboard routes → User management: routes to (evidence: `src/EsslAccessControl.Web/src/App.tsx`)
- Authentication endpoints → JWT login: delegates to (evidence: `src/EsslAccessControl.Api/Controllers/AuthController.cs`)
- JWT login → Data context: reads and updates (evidence: `src/EsslAccessControl.Api/Services/AuthService.cs`)
- Device and door endpoints → Data context: reads and writes (evidence: `src/EsslAccessControl.Api/Controllers/DevicesController.cs`)
- Device and door endpoints → Connection manager: manages connections (evidence: `src/EsslAccessControl.Api/Controllers/DevicesController.cs`)
- Device and door endpoints → Device synchronization: requests sync (evidence: `src/EsslAccessControl.Api/Controllers/DevicesController.cs`)
- Other API endpoints → Data context: reads and writes (evidence: `src/EsslAccessControl.Api/Controllers/AllControllers.cs`)
- Other API endpoints → Connection manager: uses (evidence: `src/EsslAccessControl.Api/Controllers/AllControllers.cs`)
- Connection manager → PullSDK wrapper: creates connection (evidence: `src/EsslAccessControl.Api/Services/DeviceConnectionManager.cs`)
- PullSDK wrapper → Native SDK binding: invokes (evidence: `src/EsslSdk/PullSdkWrapper.cs`)
- PullSDK wrapper → Device data models: uses (evidence: `src/EsslSdk/PullSdkWrapper.cs`)
- PullSDK wrapper → Access data models: uses (evidence: `src/EsslSdk/PullSdkWrapper.cs`)
- Connectivity worker → Data context: reads and updates (evidence: `src/EsslAccessControl.Service/Workers/HeartbeatWorker.cs`)
- Connectivity worker → Connection manager: checks and reconnects (evidence: `src/EsslAccessControl.Service/Workers/HeartbeatWorker.cs`)
- Live log worker → Connection manager: polls logs (evidence: `src/EsslAccessControl.Service/Workers/RealTimeLogWorker.cs`)
- Live log worker → Data context: stores events (evidence: `src/EsslAccessControl.Service/Workers/RealTimeLogWorker.cs`)
- Live log worker → Realtime hub: broadcasts events (evidence: `src/EsslAccessControl.Service/Workers/RealTimeLogWorker.cs`)
- Scheduled sync worker → Device synchronization: requests sync (evidence: `src/EsslAccessControl.Service/Workers/SyncWorker.cs`)
- Device synchronization → Connection manager: gets device connection (evidence: `src/EsslAccessControl.Api/Services/DeviceSyncService.cs`)
- Device synchronization → Data context: reads and writes (evidence: `src/EsslAccessControl.Api/Services/DeviceSyncService.cs`)
- Data context → Domain entities: maps (evidence: `src/EsslAccessControl.Api/Data/AppDbContext.cs`)
- Data context → PostgreSQL database: persists
- eSSL access device → PullSDK wrapper: device I/O
