# filipdjekic/logistic-system architecture

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

- Interactive diagram: https://gitdiagram.com/filipdjekic/logistic-system
- Repository: https://github.com/filipdjekic/logistic-system

## Overview

This is a multi-company logistics operations application: users authenticate, work within role- and resource-scoped permissions, and coordinate workforce, warehouse, inventory, fleet, and transport activity. The README describes stock operations and transport fulfillment as important business workflows, with auditability, dashboards, notifications, reports, and data exchange providing supporting capabilities. Sampled services confirm authentication, inventory movement, lifecycle validation, dashboards, reporting, and SSE behavior; unsampled subsystem links are limited to documented capabilities and the source tree’s controller/service locations.

Main entry points: [`backend/src/main/java/rs/logistics/logistics_system/controller/TransportOrderController.java`](https://github.com/filipdjekic/logistic-system/blob/main/backend/src/main/java/rs/logistics/logistics_system/controller/TransportOrderController.java) (Transport orders), [`frontend/src/features/tasks/hooks/useMyTasks.ts`](https://github.com/filipdjekic/logistic-system/blob/main/frontend/src/features/tasks/hooks/useMyTasks.ts) (Web application), [`backend/src/main/java/rs/logistics/logistics_system/controller/EmployeeController.java`](https://github.com/filipdjekic/logistic-system/blob/main/backend/src/main/java/rs/logistics/logistics_system/controller/EmployeeController.java) (Workforce management), [`backend/src/main/java/rs/logistics/logistics_system/controller/TaskController.java`](https://github.com/filipdjekic/logistic-system/blob/main/backend/src/main/java/rs/logistics/logistics_system/controller/TaskController.java) (Shifts and tasks)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and workforce"]
  node_auth["Authentication<br/>[AuthService.java]"]
  node_auth_api["Auth endpoints"]
  node_authorization["Scoped authorization"]
  node_workforce["Workforce management"]
  node_shifts_tasks["Shifts and tasks"]
end

subgraph group_operations["Logistics operations"]
  node_lifecycle["Lifecycle validation"]
  node_warehouse["Warehouse structure"]
  node_catalog["Product catalog"]
  node_inventory["Inventory and counts"]
  node_stock["Stock movements"]
  node_transport["Transport orders"]
  node_fleet["Fleet and maintenance"]
  node_database[("Business records")]
end

subgraph group_visibility["Visibility and data"]
  node_audit["Audit and collaboration"]
  node_notifications["Notifications and SSE"]
  node_dashboard["Role dashboards"]
  node_reports["Reports and exports"]
  node_exchange["Data exchange"]
end

subgraph group_frontend["Web client"]
  node_web["Web application<br/>[useMyTasks.ts]"]
  node_task_hook["Task query and update"]
  node_profile_hook["Profile request review"]
end

node_user(("User"))
node_browser_user(("Operator"))

node_user -->|"submits credentials"| node_auth_api
node_auth_api -->|"delegates login"| node_auth
node_auth -->|"uses identity scope"| node_authorization
node_user -->|"manages workforce"| node_workforce
node_user -->|"organizes work"| node_shifts_tasks
node_user -->|"configures warehouses"| node_warehouse
node_user -->|"maintains products"| node_catalog
node_user -->|"counts stock"| node_inventory
node_user -->|"requests movement"| node_stock
node_stock -->|"updates inventory records"| node_database
node_user -->|"plans fulfillment"| node_transport
node_transport -->|"coordinates stock effects"| node_stock
node_transport -->|"assigns transport resources"| node_fleet
node_lifecycle -->|"checks role scope"| node_authorization
node_workforce -->|"manages workforce records"| node_database
node_shifts_tasks -->|"manages work records"| node_database
node_warehouse -->|"manages warehouse records"| node_database
node_catalog -->|"manages product records"| node_database
node_inventory -->|"reads and changes counts"| node_database
node_transport -->|"manages transport records"| node_database
node_fleet -->|"manages fleet records"| node_database
node_user -->|"reviews activity"| node_audit
node_user -->|"receives updates"| node_notifications
node_notifications -->|"reads notification records"| node_database
node_user -->|"views role summary"| node_dashboard
node_dashboard -->|"reads operational summaries"| node_database
node_user -->|"requests reports"| node_reports
node_reports -->|"reads inventory and movement data"| node_database
node_user -->|"imports operational data"| node_exchange
node_exchange -->|"exchanges business records"| node_database
node_browser_user -->|"uses"| node_web
node_web -->|"opens task workflows"| node_task_hook
node_task_hook -->|"requests task operations"| node_shifts_tasks
node_web -->|"reviews employee requests"| node_profile_hook
node_profile_hook -->|"submits review actions"| node_workforce

click node_auth "https://github.com/filipdjekic/logistic-system/blob/main/backend/src/main/java/rs/logistics/logistics_system/service/implementation/auth/AuthService.java"
click node_auth_api "https://github.com/filipdjekic/logistic-system/blob/main/backend/src/main/java/rs/logistics/logistics_system/controller/auth/AuthController.java"
click node_authorization "https://github.com/filipdjekic/logistic-system/blob/main/backend/src/main/java/rs/logistics/logistics_system/security/AuthorizationService.java"
click node_workforce "https://github.com/filipdjekic/logistic-system/blob/main/backend/src/main/java/rs/logistics/logistics_system/controller/EmployeeController.java"
click node_shifts_tasks "https://github.com/filipdjekic/logistic-system/blob/main/backend/src/main/java/rs/logistics/logistics_system/controller/TaskController.java"
click node_lifecycle "https://github.com/filipdjekic/logistic-system/blob/main/backend/src/main/java/rs/logistics/logistics_system/lifecycle/LifecycleTransitionEngine.java"
click node_warehouse "https://github.com/filipdjekic/logistic-system/blob/main/backend/src/main/java/rs/logistics/logistics_system/controller/WarehouseController.java"
click node_catalog "https://github.com/filipdjekic/logistic-system/blob/main/backend/src/main/java/rs/logistics/logistics_system/controller/ProductController.java"
click node_inventory "https://github.com/filipdjekic/logistic-system/blob/main/backend/src/main/java/rs/logistics/logistics_system/controller/WarehouseInventoryController.java"
click node_stock "https://github.com/filipdjekic/logistic-system/blob/main/backend/src/main/java/rs/logistics/logistics_system/service/implementation/StockMovementService.java"
click node_transport "https://github.com/filipdjekic/logistic-system/blob/main/backend/src/main/java/rs/logistics/logistics_system/controller/TransportOrderController.java"
click node_fleet "https://github.com/filipdjekic/logistic-system/blob/main/backend/src/main/java/rs/logistics/logistics_system/controller/VehicleController.java"
click node_audit "https://github.com/filipdjekic/logistic-system/blob/main/backend/src/main/java/rs/logistics/logistics_system/controller/ActivityTimelineController.java"
click node_notifications "https://github.com/filipdjekic/logistic-system/blob/main/backend/src/main/java/rs/logistics/logistics_system/service/realtime/NotificationSseService.java"
click node_dashboard "https://github.com/filipdjekic/logistic-system/tree/main/backend/src/main/java/rs/logistics/logistics_system/service/implementation/dashboard"
click node_reports "https://github.com/filipdjekic/logistic-system/blob/main/backend/src/main/java/rs/logistics/logistics_system/service/implementation/report/InventoryReportService.java"
click node_exchange "https://github.com/filipdjekic/logistic-system/blob/main/backend/src/main/java/rs/logistics/logistics_system/controller/DataExchangeController.java"
click node_web "https://github.com/filipdjekic/logistic-system/blob/main/frontend/src/features/tasks/hooks/useMyTasks.ts"
click node_task_hook "https://github.com/filipdjekic/logistic-system/blob/main/frontend/src/features/tasks/hooks/useUpdateTaskStatus.ts"
click node_profile_hook "https://github.com/filipdjekic/logistic-system/blob/main/frontend/src/features/employee-profile-change-requests/hooks/useReviewEmployeeProfileChangeRequest.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_auth,node_auth_api,node_authorization,node_workforce,node_shifts_tasks,node_user toneBlue
class node_lifecycle,node_warehouse,node_catalog,node_inventory,node_stock,node_transport,node_fleet,node_database toneAmber
class node_audit,node_notifications,node_dashboard,node_reports,node_exchange toneMint
class node_web,node_task_hook,node_profile_hook toneRose
class node_browser_user toneIndigo
```

## Components

### Access and workforce

- [Authentication](https://github.com/filipdjekic/logistic-system/blob/main/backend/src/main/java/rs/logistics/logistics_system/service/implementation/auth/AuthService.java): `backend/src/main/java/rs/logistics/logistics_system/service/implementation/auth/AuthService.java`
- [Auth endpoints](https://github.com/filipdjekic/logistic-system/blob/main/backend/src/main/java/rs/logistics/logistics_system/controller/auth/AuthController.java): `backend/src/main/java/rs/logistics/logistics_system/controller/auth/AuthController.java`
- [Scoped authorization](https://github.com/filipdjekic/logistic-system/blob/main/backend/src/main/java/rs/logistics/logistics_system/security/AuthorizationService.java): `backend/src/main/java/rs/logistics/logistics_system/security/AuthorizationService.java`
- [Workforce management](https://github.com/filipdjekic/logistic-system/blob/main/backend/src/main/java/rs/logistics/logistics_system/controller/EmployeeController.java): `backend/src/main/java/rs/logistics/logistics_system/controller/EmployeeController.java`
- [Shifts and tasks](https://github.com/filipdjekic/logistic-system/blob/main/backend/src/main/java/rs/logistics/logistics_system/controller/TaskController.java): `backend/src/main/java/rs/logistics/logistics_system/controller/TaskController.java`

### Logistics operations

- [Lifecycle validation](https://github.com/filipdjekic/logistic-system/blob/main/backend/src/main/java/rs/logistics/logistics_system/lifecycle/LifecycleTransitionEngine.java): `backend/src/main/java/rs/logistics/logistics_system/lifecycle/LifecycleTransitionEngine.java`
- [Warehouse structure](https://github.com/filipdjekic/logistic-system/blob/main/backend/src/main/java/rs/logistics/logistics_system/controller/WarehouseController.java): `backend/src/main/java/rs/logistics/logistics_system/controller/WarehouseController.java`
- [Product catalog](https://github.com/filipdjekic/logistic-system/blob/main/backend/src/main/java/rs/logistics/logistics_system/controller/ProductController.java): `backend/src/main/java/rs/logistics/logistics_system/controller/ProductController.java`
- [Inventory and counts](https://github.com/filipdjekic/logistic-system/blob/main/backend/src/main/java/rs/logistics/logistics_system/controller/WarehouseInventoryController.java): `backend/src/main/java/rs/logistics/logistics_system/controller/WarehouseInventoryController.java`
- [Stock movements](https://github.com/filipdjekic/logistic-system/blob/main/backend/src/main/java/rs/logistics/logistics_system/service/implementation/StockMovementService.java): `backend/src/main/java/rs/logistics/logistics_system/service/implementation/StockMovementService.java`
- [Transport orders](https://github.com/filipdjekic/logistic-system/blob/main/backend/src/main/java/rs/logistics/logistics_system/controller/TransportOrderController.java): `backend/src/main/java/rs/logistics/logistics_system/controller/TransportOrderController.java`
- [Fleet and maintenance](https://github.com/filipdjekic/logistic-system/blob/main/backend/src/main/java/rs/logistics/logistics_system/controller/VehicleController.java): `backend/src/main/java/rs/logistics/logistics_system/controller/VehicleController.java`
- **Business records**

### Visibility and data

- [Audit and collaboration](https://github.com/filipdjekic/logistic-system/blob/main/backend/src/main/java/rs/logistics/logistics_system/controller/ActivityTimelineController.java): `backend/src/main/java/rs/logistics/logistics_system/controller/ActivityTimelineController.java`
- [Notifications and SSE](https://github.com/filipdjekic/logistic-system/blob/main/backend/src/main/java/rs/logistics/logistics_system/service/realtime/NotificationSseService.java): `backend/src/main/java/rs/logistics/logistics_system/service/realtime/NotificationSseService.java`
- [Role dashboards](https://github.com/filipdjekic/logistic-system/tree/main/backend/src/main/java/rs/logistics/logistics_system/service/implementation/dashboard): `backend/src/main/java/rs/logistics/logistics_system/service/implementation/dashboard`
- [Reports and exports](https://github.com/filipdjekic/logistic-system/blob/main/backend/src/main/java/rs/logistics/logistics_system/service/implementation/report/InventoryReportService.java): `backend/src/main/java/rs/logistics/logistics_system/service/implementation/report/InventoryReportService.java`
- [Data exchange](https://github.com/filipdjekic/logistic-system/blob/main/backend/src/main/java/rs/logistics/logistics_system/controller/DataExchangeController.java): `backend/src/main/java/rs/logistics/logistics_system/controller/DataExchangeController.java`

### Web client

- [Web application](https://github.com/filipdjekic/logistic-system/blob/main/frontend/src/features/tasks/hooks/useMyTasks.ts): `frontend/src/features/tasks/hooks/useMyTasks.ts`
- [Task query and update](https://github.com/filipdjekic/logistic-system/blob/main/frontend/src/features/tasks/hooks/useUpdateTaskStatus.ts): `frontend/src/features/tasks/hooks/useUpdateTaskStatus.ts`
- [Profile request review](https://github.com/filipdjekic/logistic-system/blob/main/frontend/src/features/employee-profile-change-requests/hooks/useReviewEmployeeProfileChangeRequest.ts): `frontend/src/features/employee-profile-change-requests/hooks/useReviewEmployeeProfileChangeRequest.ts`

### Other components

- **User**
- **Operator**

## Connections

- User → Auth endpoints: submits credentials
- Auth endpoints → Authentication: delegates login
- Authentication → Scoped authorization: uses identity scope
- User → Workforce management: manages workforce
- User → Shifts and tasks: organizes work
- User → Warehouse structure: configures warehouses
- User → Product catalog: maintains products
- User → Inventory and counts: counts stock
- User → Stock movements: requests movement
- Stock movements → Business records: updates inventory records
- User → Transport orders: plans fulfillment
- Transport orders → Stock movements: coordinates stock effects
- Transport orders → Fleet and maintenance: assigns transport resources
- Lifecycle validation → Scoped authorization: checks role scope
- Workforce management → Business records: manages workforce records
- Shifts and tasks → Business records: manages work records
- Warehouse structure → Business records: manages warehouse records
- Product catalog → Business records: manages product records
- Inventory and counts → Business records: reads and changes counts
- Transport orders → Business records: manages transport records
- Fleet and maintenance → Business records: manages fleet records
- User → Audit and collaboration: reviews activity
- User → Notifications and SSE: receives updates
- Notifications and SSE → Business records: reads notification records
- User → Role dashboards: views role summary
- Role dashboards → Business records: reads operational summaries
- User → Reports and exports: requests reports
- Reports and exports → Business records: reads inventory and movement data
- User → Data exchange: imports operational data
- Data exchange → Business records: exchanges business records
- Operator → Web application: uses
- Web application → Task query and update: opens task workflows
- Task query and update → Shifts and tasks: requests task operations
- Web application → Profile request review: reviews employee requests
- Profile request review → Workforce management: submits review actions
