# kacpergolebski/wdtb-2026-backend-inwentaryzacja architecture

> Architecture diagram of the GitHub repository kacpergolebski/wdtb-2026-backend-inwentaryzacja, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kacpergolebski/wdtb-2026-backend-inwentaryzacja
- Repository: https://github.com/kacpergolebski/wdtb-2026-backend-inwentaryzacja

## Overview

This repository is a backend-course starter template, currently populated with a sample equipment-inventory domain. The documented runtime is a Spring application viewed locally, with Hibernate-created tables and SQL seed data; the README describes REST services and controllers as later project work, not as implemented here. Source excerpts show domain mappings and one repository, but no request-handling or service layer, so those paths are not inferred.

Main entry points: [`src/main/java/pl/wsb/inwentaryzacja/equipment/entity/Equipment.java`](https://github.com/kacpergolebski/wdtb-2026-backend-inwentaryzacja/blob/main/src/main/java/pl/wsb/inwentaryzacja/equipment/entity/Equipment.java) (Equipment), [`src/main/java/pl/wsb/inwentaryzacja/inventory/entity/InventoryCheckItem.java`](https://github.com/kacpergolebski/wdtb-2026-backend-inwentaryzacja/blob/main/src/main/java/pl/wsb/inwentaryzacja/inventory/entity/InventoryCheckItem.java) (Check item), [`src/main/java/pl/wsb/inwentaryzacja/inventory/entity/InventoryCheck.java`](https://github.com/kacpergolebski/wdtb-2026-backend-inwentaryzacja/blob/main/src/main/java/pl/wsb/inwentaryzacja/inventory/entity/InventoryCheck.java) (Inventory check), [`src/main/java/pl/wsb/inwentaryzacja/InwentaryzacjaApplication.java`](https://github.com/kacpergolebski/wdtb-2026-backend-inwentaryzacja/blob/main/src/main/java/pl/wsb/inwentaryzacja/InwentaryzacjaApplication.java) (Spring application)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Application runtime"]
  node_application["Spring application"]
  node_project_page["Project page<br/>[index.html]"]
  node_seed_data["Seed data<br/>[data.sql]"]
  node_database[("H2 database")]
end

subgraph group_people["Accounts and people"]
  node_user_account["User account<br/>[UserAccount.java]"]
  node_account_role["Account role<br/>[AccountRole.java]"]
  node_employee["Employee<br/>[Employee.java]"]
end

subgraph group_equipment["Equipment management"]
  node_equipment["Equipment<br/>[Equipment.java]"]
  node_equipment_location["Equipment location"]
  node_equipment_status["Equipment status"]
  node_assignment["Equipment assignment"]
  node_assignment_repository["Assignment repository"]
end

subgraph group_inventory["Inventory checks"]
  node_inventory_check["Inventory check"]
  node_check_item["Check item"]
  node_check_result["Check result<br/>[CheckResult.java]"]
end

node_operator(("Local user"))

node_operator -->|"opens locally"| node_application
node_application -->|"serves page"| node_project_page
node_application -->|"initializes tables"| node_database
node_seed_data -->|"seeds data"| node_database
node_user_account -->|"uses role"| node_account_role
node_employee -->|"references account"| node_user_account
node_equipment -->|"embeds location"| node_equipment_location
node_equipment -->|"uses status"| node_equipment_status
node_assignment -->|"references equipment"| node_equipment
node_assignment -->|"references employee"| node_employee
node_assignment_repository -->|"queries assignments"| node_assignment
node_inventory_check -->|"records checker"| node_employee
node_inventory_check -->|"adds checked item"| node_equipment
node_inventory_check -->|"creates items"| node_check_item
node_check_item -->|"references check"| node_inventory_check
node_check_item -->|"references equipment"| node_equipment
node_check_item -->|"stores result"| node_check_result

click node_application "https://github.com/kacpergolebski/wdtb-2026-backend-inwentaryzacja/blob/main/src/main/java/pl/wsb/inwentaryzacja/InwentaryzacjaApplication.java"
click node_project_page "https://github.com/kacpergolebski/wdtb-2026-backend-inwentaryzacja/blob/main/src/main/resources/static/index.html"
click node_seed_data "https://github.com/kacpergolebski/wdtb-2026-backend-inwentaryzacja/blob/main/src/main/resources/data.sql"
click node_database "https://github.com/kacpergolebski/wdtb-2026-backend-inwentaryzacja/blob/main/src/main/resources/application.properties"
click node_user_account "https://github.com/kacpergolebski/wdtb-2026-backend-inwentaryzacja/blob/main/src/main/java/pl/wsb/inwentaryzacja/account/domain/UserAccount.java"
click node_account_role "https://github.com/kacpergolebski/wdtb-2026-backend-inwentaryzacja/blob/main/src/main/java/pl/wsb/inwentaryzacja/account/domain/AccountRole.java"
click node_employee "https://github.com/kacpergolebski/wdtb-2026-backend-inwentaryzacja/blob/main/src/main/java/pl/wsb/inwentaryzacja/employee/entity/Employee.java"
click node_equipment "https://github.com/kacpergolebski/wdtb-2026-backend-inwentaryzacja/blob/main/src/main/java/pl/wsb/inwentaryzacja/equipment/entity/Equipment.java"
click node_equipment_location "https://github.com/kacpergolebski/wdtb-2026-backend-inwentaryzacja/blob/main/src/main/java/pl/wsb/inwentaryzacja/equipment/entity/EquipmentLocation.java"
click node_equipment_status "https://github.com/kacpergolebski/wdtb-2026-backend-inwentaryzacja/blob/main/src/main/java/pl/wsb/inwentaryzacja/equipment/entity/EquipmentStatus.java"
click node_assignment "https://github.com/kacpergolebski/wdtb-2026-backend-inwentaryzacja/blob/main/src/main/java/pl/wsb/inwentaryzacja/equipment/entity/EquipmentAssignment.java"
click node_assignment_repository "https://github.com/kacpergolebski/wdtb-2026-backend-inwentaryzacja/blob/main/src/main/java/pl/wsb/inwentaryzacja/equipment/repository/EquipmentAssignmentRepository.java"
click node_inventory_check "https://github.com/kacpergolebski/wdtb-2026-backend-inwentaryzacja/blob/main/src/main/java/pl/wsb/inwentaryzacja/inventory/entity/InventoryCheck.java"
click node_check_item "https://github.com/kacpergolebski/wdtb-2026-backend-inwentaryzacja/blob/main/src/main/java/pl/wsb/inwentaryzacja/inventory/entity/InventoryCheckItem.java"
click node_check_result "https://github.com/kacpergolebski/wdtb-2026-backend-inwentaryzacja/blob/main/src/main/java/pl/wsb/inwentaryzacja/inventory/entity/CheckResult.java"

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_application,node_project_page,node_seed_data,node_database,node_operator toneBlue
class node_user_account,node_account_role,node_employee toneAmber
class node_equipment,node_equipment_location,node_equipment_status,node_assignment,node_assignment_repository toneMint
class node_inventory_check,node_check_item,node_check_result toneRose
```

## Components

### Application runtime

- [Spring application](https://github.com/kacpergolebski/wdtb-2026-backend-inwentaryzacja/blob/main/src/main/java/pl/wsb/inwentaryzacja/InwentaryzacjaApplication.java): `src/main/java/pl/wsb/inwentaryzacja/InwentaryzacjaApplication.java`
- [Project page](https://github.com/kacpergolebski/wdtb-2026-backend-inwentaryzacja/blob/main/src/main/resources/static/index.html): `src/main/resources/static/index.html`
- [Seed data](https://github.com/kacpergolebski/wdtb-2026-backend-inwentaryzacja/blob/main/src/main/resources/data.sql): `src/main/resources/data.sql`
- [H2 database](https://github.com/kacpergolebski/wdtb-2026-backend-inwentaryzacja/blob/main/src/main/resources/application.properties): `src/main/resources/application.properties`

### Accounts and people

- [User account](https://github.com/kacpergolebski/wdtb-2026-backend-inwentaryzacja/blob/main/src/main/java/pl/wsb/inwentaryzacja/account/domain/UserAccount.java): `src/main/java/pl/wsb/inwentaryzacja/account/domain/UserAccount.java`
- [Account role](https://github.com/kacpergolebski/wdtb-2026-backend-inwentaryzacja/blob/main/src/main/java/pl/wsb/inwentaryzacja/account/domain/AccountRole.java): `src/main/java/pl/wsb/inwentaryzacja/account/domain/AccountRole.java`
- [Employee](https://github.com/kacpergolebski/wdtb-2026-backend-inwentaryzacja/blob/main/src/main/java/pl/wsb/inwentaryzacja/employee/entity/Employee.java): `src/main/java/pl/wsb/inwentaryzacja/employee/entity/Employee.java`

### Equipment management

- [Equipment](https://github.com/kacpergolebski/wdtb-2026-backend-inwentaryzacja/blob/main/src/main/java/pl/wsb/inwentaryzacja/equipment/entity/Equipment.java): `src/main/java/pl/wsb/inwentaryzacja/equipment/entity/Equipment.java`
- [Equipment location](https://github.com/kacpergolebski/wdtb-2026-backend-inwentaryzacja/blob/main/src/main/java/pl/wsb/inwentaryzacja/equipment/entity/EquipmentLocation.java): `src/main/java/pl/wsb/inwentaryzacja/equipment/entity/EquipmentLocation.java`
- [Equipment status](https://github.com/kacpergolebski/wdtb-2026-backend-inwentaryzacja/blob/main/src/main/java/pl/wsb/inwentaryzacja/equipment/entity/EquipmentStatus.java): `src/main/java/pl/wsb/inwentaryzacja/equipment/entity/EquipmentStatus.java`
- [Equipment assignment](https://github.com/kacpergolebski/wdtb-2026-backend-inwentaryzacja/blob/main/src/main/java/pl/wsb/inwentaryzacja/equipment/entity/EquipmentAssignment.java): `src/main/java/pl/wsb/inwentaryzacja/equipment/entity/EquipmentAssignment.java`
- [Assignment repository](https://github.com/kacpergolebski/wdtb-2026-backend-inwentaryzacja/blob/main/src/main/java/pl/wsb/inwentaryzacja/equipment/repository/EquipmentAssignmentRepository.java): `src/main/java/pl/wsb/inwentaryzacja/equipment/repository/EquipmentAssignmentRepository.java`

### Inventory checks

- [Inventory check](https://github.com/kacpergolebski/wdtb-2026-backend-inwentaryzacja/blob/main/src/main/java/pl/wsb/inwentaryzacja/inventory/entity/InventoryCheck.java): `src/main/java/pl/wsb/inwentaryzacja/inventory/entity/InventoryCheck.java`
- [Check item](https://github.com/kacpergolebski/wdtb-2026-backend-inwentaryzacja/blob/main/src/main/java/pl/wsb/inwentaryzacja/inventory/entity/InventoryCheckItem.java): `src/main/java/pl/wsb/inwentaryzacja/inventory/entity/InventoryCheckItem.java`
- [Check result](https://github.com/kacpergolebski/wdtb-2026-backend-inwentaryzacja/blob/main/src/main/java/pl/wsb/inwentaryzacja/inventory/entity/CheckResult.java): `src/main/java/pl/wsb/inwentaryzacja/inventory/entity/CheckResult.java`

### Other components

- **Local user**

## Connections

- Local user → Spring application: opens locally (evidence: `README.md`)
- Spring application → Project page: serves page (evidence: `README.md`)
- Spring application → H2 database: initializes tables (evidence: `README.md`)
- Seed data → H2 database: seeds data (evidence: `README.md`)
- User account → Account role: uses role (evidence: `src/main/java/pl/wsb/inwentaryzacja/account/domain/UserAccount.java`)
- Employee → User account: references account (evidence: `src/main/java/pl/wsb/inwentaryzacja/employee/entity/Employee.java`)
- Equipment → Equipment location: embeds location (evidence: `src/main/java/pl/wsb/inwentaryzacja/equipment/entity/Equipment.java`)
- Equipment → Equipment status: uses status (evidence: `src/main/java/pl/wsb/inwentaryzacja/equipment/entity/Equipment.java`)
- Equipment assignment → Equipment: references equipment (evidence: `src/main/java/pl/wsb/inwentaryzacja/equipment/entity/EquipmentAssignment.java`)
- Equipment assignment → Employee: references employee (evidence: `src/main/java/pl/wsb/inwentaryzacja/equipment/entity/EquipmentAssignment.java`)
- Assignment repository → Equipment assignment: queries assignments (evidence: `src/main/java/pl/wsb/inwentaryzacja/equipment/repository/EquipmentAssignmentRepository.java`)
- Inventory check → Employee: records checker (evidence: `src/main/java/pl/wsb/inwentaryzacja/inventory/entity/InventoryCheck.java`)
- Inventory check → Equipment: adds checked item (evidence: `src/main/java/pl/wsb/inwentaryzacja/inventory/entity/InventoryCheck.java`)
- Inventory check → Check item: creates items (evidence: `src/main/java/pl/wsb/inwentaryzacja/inventory/entity/InventoryCheck.java`)
- Check item → Inventory check: references check (evidence: `src/main/java/pl/wsb/inwentaryzacja/inventory/entity/InventoryCheckItem.java`)
- Check item → Equipment: references equipment (evidence: `src/main/java/pl/wsb/inwentaryzacja/inventory/entity/InventoryCheckItem.java`)
- Check item → Check result: stores result (evidence: `src/main/java/pl/wsb/inwentaryzacja/inventory/entity/InventoryCheckItem.java`)
