# cyber-hive-team/cyberhive architecture

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

- Interactive diagram: https://gitdiagram.com/cyber-hive-team/cyberhive
- Repository: https://github.com/cyber-hive-team/cyberhive

## Overview

Cyber Hive is a logistics and fleet-management application, presented mainly through a console demo runner; the Compose frontend shown is a separate placeholder UI. Its principal workflow starts by synchronizing data, loading warehouses, packages, vehicles, and routes, then runs logistics analyses and dispatch demonstrations. The repository also contains CRUD, routing, pricing, fleet, warehouse-status, and synchronization capabilities. Main’s orchestration and selected repository interactions are evidenced by excerpts; several domain-feature links are inferred from the file tree and are marked unverified.

Main entry points: [`src/main/kotlin/presentation`](https://github.com/cyber-hive-team/cyberhive/tree/master/src/main/kotlin/presentation) (Demo runners), [`src/main/kotlin/presentation/Main.kt`](https://github.com/cyber-hive-team/cyberhive/blob/master/src/main/kotlin/presentation/Main.kt) (Demo entry point), [`src/main/kotlin/data/repositoryImplementation`](https://github.com/cyber-hive-team/cyberhive/tree/master/src/main/kotlin/data/repositoryImplementation) (Repositories), [`src/main/kotlin/domain/dispatch`](https://github.com/cyber-hive-team/cyberhive/tree/master/src/main/kotlin/domain/dispatch) (Fleet dispatch)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_presentation["Presentation"]
  node_main["Demo entry point<br/>[Main.kt]"]
  node_loader["Data loader<br/>[DataLoader.kt]"]
  node_demo_runners["Demo runners"]
end

subgraph group_domain["Logistics domain"]
  node_dispatch["Fleet dispatch"]
  node_routing["Routing algorithms"]
  node_hash_routing["Vehicle hash routing"]
  node_pricing["Pricing strategies"]
  node_fleet_ops["Fleet operations"]
  node_warehouse_ops["Warehouse operations"]
  node_package_model["Package lifecycle<br/>[Package.kt]"]
end

subgraph group_data["Data and persistence"]
  node_sync_coordinator["Sync coordinator<br/>[SyncCoordinator.kt]"]
  node_repositories["Repositories"]
  node_csv_storage[("CSV storage")]
  node_supabase["Supabase adapters"]
end

subgraph group_frontend["Frontend"]
  node_compose_app["Compose UI<br/>[App.kt]"]
end

node_operator(("Operator"))

node_operator -.->|"starts"| node_main
node_main -->|"runs sync"| node_sync_coordinator
node_main -->|"loads data"| node_loader
node_main -->|"runs demos"| node_demo_runners
node_sync_coordinator -.->|"synchronizes"| node_repositories
node_repositories -.->|"reads and writes"| node_csv_storage
node_repositories -.->|"requests remote data"| node_supabase
node_demo_runners -.->|"demonstrates dispatch"| node_dispatch
node_demo_runners -.->|"demonstrates routing"| node_routing
node_demo_runners -->|"demonstrates assignment"| node_hash_routing
node_demo_runners -->|"demonstrates pricing"| node_pricing
node_demo_runners -->|"demonstrates fleet"| node_fleet_ops
node_demo_runners -->|"demonstrates lineage"| node_warehouse_ops
node_dispatch -.->|"processes packages"| node_package_model
node_hash_routing -->|"assigns packages"| node_package_model
node_compose_app -.->|"shows placeholder UI"| node_operator

click node_main "https://github.com/cyber-hive-team/cyberhive/blob/master/src/main/kotlin/presentation/Main.kt"
click node_loader "https://github.com/cyber-hive-team/cyberhive/blob/master/src/main/kotlin/presentation/DataLoader.kt"
click node_demo_runners "https://github.com/cyber-hive-team/cyberhive/tree/master/src/main/kotlin/presentation"
click node_sync_coordinator "https://github.com/cyber-hive-team/cyberhive/blob/master/src/main/kotlin/data/sync/SyncCoordinator.kt"
click node_repositories "https://github.com/cyber-hive-team/cyberhive/tree/master/src/main/kotlin/data/repositoryImplementation"
click node_csv_storage "https://github.com/cyber-hive-team/cyberhive/tree/master/src/main/kotlin/data/datasource/local/csv"
click node_supabase "https://github.com/cyber-hive-team/cyberhive/tree/master/src/main/kotlin/data/datasource/remote/supabase"
click node_dispatch "https://github.com/cyber-hive-team/cyberhive/tree/master/src/main/kotlin/domain/dispatch"
click node_routing "https://github.com/cyber-hive-team/cyberhive/tree/master/src/main/kotlin/domain/algorithm/search"
click node_hash_routing "https://github.com/cyber-hive-team/cyberhive/blob/master/src/main/kotlin/domain/routing/service/ConsistentHashVehicleRoutingService.kt"
click node_pricing "https://github.com/cyber-hive-team/cyberhive/tree/master/src/main/kotlin/domain/pricing"
click node_fleet_ops "https://github.com/cyber-hive-team/cyberhive/tree/master/src/main/kotlin/domain/usecase"
click node_warehouse_ops "https://github.com/cyber-hive-team/cyberhive/tree/master/src/main/kotlin/domain/usecase"
click node_package_model "https://github.com/cyber-hive-team/cyberhive/blob/master/src/main/kotlin/domain/model/Package.kt"
click node_compose_app "https://github.com/cyber-hive-team/cyberhive/blob/master/frontend/logiroute/src/commonMain/kotlin/edu/logiroute/logiroute/App.kt"

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_main,node_loader,node_demo_runners toneBlue
class node_dispatch,node_routing,node_hash_routing,node_pricing,node_fleet_ops,node_warehouse_ops,node_package_model toneAmber
class node_sync_coordinator,node_repositories,node_csv_storage,node_supabase toneMint
class node_compose_app toneRose
class node_operator toneIndigo
```

## Components

### Presentation

- [Demo entry point](https://github.com/cyber-hive-team/cyberhive/blob/master/src/main/kotlin/presentation/Main.kt): `src/main/kotlin/presentation/Main.kt`
- [Data loader](https://github.com/cyber-hive-team/cyberhive/blob/master/src/main/kotlin/presentation/DataLoader.kt): `src/main/kotlin/presentation/DataLoader.kt`
- [Demo runners](https://github.com/cyber-hive-team/cyberhive/tree/master/src/main/kotlin/presentation): `src/main/kotlin/presentation`

### Logistics domain

- [Fleet dispatch](https://github.com/cyber-hive-team/cyberhive/tree/master/src/main/kotlin/domain/dispatch): `src/main/kotlin/domain/dispatch`
- [Routing algorithms](https://github.com/cyber-hive-team/cyberhive/tree/master/src/main/kotlin/domain/algorithm/search): `src/main/kotlin/domain/algorithm/search`
- [Vehicle hash routing](https://github.com/cyber-hive-team/cyberhive/blob/master/src/main/kotlin/domain/routing/service/ConsistentHashVehicleRoutingService.kt): `src/main/kotlin/domain/routing/service/ConsistentHashVehicleRoutingService.kt`
- [Pricing strategies](https://github.com/cyber-hive-team/cyberhive/tree/master/src/main/kotlin/domain/pricing): `src/main/kotlin/domain/pricing`
- [Fleet operations](https://github.com/cyber-hive-team/cyberhive/tree/master/src/main/kotlin/domain/usecase): `src/main/kotlin/domain/usecase`
- [Warehouse operations](https://github.com/cyber-hive-team/cyberhive/tree/master/src/main/kotlin/domain/usecase): `src/main/kotlin/domain/usecase`
- [Package lifecycle](https://github.com/cyber-hive-team/cyberhive/blob/master/src/main/kotlin/domain/model/Package.kt): `src/main/kotlin/domain/model/Package.kt`

### Data and persistence

- [Sync coordinator](https://github.com/cyber-hive-team/cyberhive/blob/master/src/main/kotlin/data/sync/SyncCoordinator.kt): `src/main/kotlin/data/sync/SyncCoordinator.kt`
- [Repositories](https://github.com/cyber-hive-team/cyberhive/tree/master/src/main/kotlin/data/repositoryImplementation): `src/main/kotlin/data/repositoryImplementation`
- [CSV storage](https://github.com/cyber-hive-team/cyberhive/tree/master/src/main/kotlin/data/datasource/local/csv): `src/main/kotlin/data/datasource/local/csv`
- [Supabase adapters](https://github.com/cyber-hive-team/cyberhive/tree/master/src/main/kotlin/data/datasource/remote/supabase): `src/main/kotlin/data/datasource/remote/supabase`

### Frontend

- [Compose UI](https://github.com/cyber-hive-team/cyberhive/blob/master/frontend/logiroute/src/commonMain/kotlin/edu/logiroute/logiroute/App.kt): `frontend/logiroute/src/commonMain/kotlin/edu/logiroute/logiroute/App.kt`

### Other components

- **Operator**

## Connections

- Operator → Demo entry point: starts
- Demo entry point → Sync coordinator: runs sync (evidence: `src/main/kotlin/presentation/Main.kt`)
- Demo entry point → Data loader: loads data (evidence: `src/main/kotlin/presentation/Main.kt`)
- Demo entry point → Demo runners: runs demos (evidence: `src/main/kotlin/presentation/Main.kt`)
- Sync coordinator → Repositories: synchronizes
- Repositories → CSV storage: reads and writes (evidence: `src/main/kotlin/data/repositoryImplementation/WarehouseRepositoryImpl.kt`)
- Repositories → Supabase adapters: requests remote data (evidence: `src/main/kotlin/data/repositoryImplementation/PackageRepositoryImpl.kt`)
- Demo runners → Fleet dispatch: demonstrates dispatch (evidence: `src/main/kotlin/presentation/Main.kt`)
- Demo runners → Routing algorithms: demonstrates routing
- Demo runners → Vehicle hash routing: demonstrates assignment (evidence: `src/main/kotlin/presentation/Main.kt`)
- Demo runners → Pricing strategies: demonstrates pricing (evidence: `src/main/kotlin/presentation/Main.kt`)
- Demo runners → Fleet operations: demonstrates fleet (evidence: `src/main/kotlin/presentation/Main.kt`)
- Demo runners → Warehouse operations: demonstrates lineage (evidence: `src/main/kotlin/presentation/Main.kt`)
- Fleet dispatch → Package lifecycle: processes packages
- Vehicle hash routing → Package lifecycle: assigns packages (evidence: `src/main/kotlin/domain/routing/service/ConsistentHashVehicleRoutingService.kt`)
- Compose UI → Operator: shows placeholder UI
