# aleafarrel-25-11-6401/itassetmanagement architecture

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

- Interactive diagram: https://gitdiagram.com/aleafarrel-25-11-6401/itassetmanagement
- Repository: https://github.com/aleafarrel-25-11-6401/itassetmanagement

## Overview

ITAM is a Windows Forms desktop application for managing IT inventory, employee records, multi-unit loans and returns, user access, and audit history. Users log in or register, then navigate role-filtered screens; screens invoke controllers, which validate and update domain data through a shared in-memory cache and Supabase PostgREST. The dashboard summarizes inventory, active loans, and recent history. The graph also includes profile, employee, and audit-management capabilities documented in the README. Some subsystem links rely on README or source-index references because their implementation excerpts are incomplete.

Main entry points: [`Views/MainForm.cs`](https://github.com/aleafarrel-25-11-6401/itassetmanagement/blob/main/Views/MainForm.cs) (Main Navigation), [`Models/DataStore.cs`](https://github.com/aleafarrel-25-11-6401/itassetmanagement/blob/main/Models/DataStore.cs) (REST Client & Cache), [`Controllers/AssetController.cs`](https://github.com/aleafarrel-25-11-6401/itassetmanagement/blob/main/Controllers/AssetController.cs) (Asset Management), [`Controllers/RiwayatController.cs`](https://github.com/aleafarrel-25-11-6401/itassetmanagement/blob/main/Controllers/RiwayatController.cs) (Audit History Logic)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop UI"]
  node_login["Login Form<br/>[FormLogin.cs]"]
  node_register["Registration Form<br/>[FormRegister.cs]"]
  node_main["Main Navigation<br/>[MainForm.cs]"]
  node_dashboard["Analytics Dashboard<br/>[UC_Dashboard.cs]"]
  node_assetui["Asset Screen<br/>[UC_Asset.cs]"]
  node_employeeui["Employee Screen<br/>[UC_Karyawan.cs]"]
  node_allocationui["Loan &amp; Return Screen<br/>[UC_Alokasi.cs]"]
  node_historyui["Audit History Screen<br/>[UC_Riwayat.cs]"]
  node_profileui["Profile Screen<br/>[UC_Profil.cs]"]
  node_uihelper["UI Helpers<br/>[UIHelper.cs]"]
  node_dialogs["Dialogs<br/>[Dialogs.cs]"]
end

subgraph group_auth["Identity &amp; Access"]
  node_auth["Authentication &amp; Profile<br/>[AuthController.cs]"]
end

subgraph group_operations["Asset Operations"]
  node_asset["Asset Management<br/>[AssetController.cs]"]
  node_employee["Employee Management"]
  node_allocation["Loan &amp; Return Logic"]
  node_history["Audit History Logic"]
end

subgraph group_data["Data &amp; Domain"]
  node_models["Domain Models<br/>[Models.cs]"]
  node_store["REST Client &amp; Cache<br/>[DataStore.cs]"]
end

node_user(("ITAM User"))
node_supabase[("Supabase PostgREST")]

node_user -->|"enters credentials"| node_login
node_login -->|"requests login"| node_auth
node_login -->|"opens registration"| node_register
node_register -->|"submits account"| node_auth
node_login -->|"opens after login"| node_main
node_main -->|"creates page"| node_dashboard
node_main -->|"creates page"| node_assetui
node_main -->|"creates page"| node_employeeui
node_main -->|"creates page"| node_allocationui
node_main -->|"creates page"| node_historyui
node_main -->|"creates page"| node_profileui
node_assetui -->|"invokes"| node_asset
node_employeeui -->|"invokes"| node_employee
node_allocationui -->|"invokes"| node_allocation
node_allocationui -->|"loads assets"| node_asset
node_allocationui -->|"loads employees"| node_employee
node_historyui -->|"invokes"| node_history
node_profileui -->|"updates profile"| node_auth
node_dashboard -->|"reads summary"| node_asset
node_dashboard -->|"reads active loans"| node_allocation
node_dashboard -->|"reads recent activity"| node_history
node_asset -->|"reads and writes"| node_store
node_employee -->|"reads and writes"| node_store
node_allocation -->|"updates loans and stock"| node_store
node_history -->|"records and queries"| node_store
node_auth -->|"reads and writes"| node_store
node_asset -->|"records asset actions"| node_history
node_allocation -->|"records loan events"| node_history
node_store -->|"sends REST requests"| node_supabase
node_store -->|"maps records"| node_models
node_asset -->|"uses domain types"| node_models
node_allocation -->|"uses domain types"| node_models
node_history -->|"uses domain types"| node_models
node_main -->|"cancels debounce"| node_uihelper
node_assetui -->|"formats grids"| node_uihelper
node_login -->|"shows messages"| node_dialogs

click node_login "https://github.com/aleafarrel-25-11-6401/itassetmanagement/blob/main/Views/FormLogin.cs"
click node_register "https://github.com/aleafarrel-25-11-6401/itassetmanagement/blob/main/Views/FormRegister.cs"
click node_main "https://github.com/aleafarrel-25-11-6401/itassetmanagement/blob/main/Views/MainForm.cs"
click node_dashboard "https://github.com/aleafarrel-25-11-6401/itassetmanagement/blob/main/Views/UC_Dashboard.cs"
click node_assetui "https://github.com/aleafarrel-25-11-6401/itassetmanagement/blob/main/Views/UC_Asset.cs"
click node_employeeui "https://github.com/aleafarrel-25-11-6401/itassetmanagement/blob/main/Views/UC_Karyawan.cs"
click node_allocationui "https://github.com/aleafarrel-25-11-6401/itassetmanagement/blob/main/Views/UC_Alokasi.cs"
click node_historyui "https://github.com/aleafarrel-25-11-6401/itassetmanagement/blob/main/Views/UC_Riwayat.cs"
click node_profileui "https://github.com/aleafarrel-25-11-6401/itassetmanagement/blob/main/Views/UC_Profil.cs"
click node_auth "https://github.com/aleafarrel-25-11-6401/itassetmanagement/blob/main/Controllers/AuthController.cs"
click node_asset "https://github.com/aleafarrel-25-11-6401/itassetmanagement/blob/main/Controllers/AssetController.cs"
click node_employee "https://github.com/aleafarrel-25-11-6401/itassetmanagement/blob/main/Controllers/KaryawanController.cs"
click node_allocation "https://github.com/aleafarrel-25-11-6401/itassetmanagement/blob/main/Controllers/AlokasiController.cs"
click node_history "https://github.com/aleafarrel-25-11-6401/itassetmanagement/blob/main/Controllers/RiwayatController.cs"
click node_models "https://github.com/aleafarrel-25-11-6401/itassetmanagement/blob/main/Models/Models.cs"
click node_store "https://github.com/aleafarrel-25-11-6401/itassetmanagement/blob/main/Models/DataStore.cs"
click node_uihelper "https://github.com/aleafarrel-25-11-6401/itassetmanagement/blob/main/Views/UIHelper.cs"
click node_dialogs "https://github.com/aleafarrel-25-11-6401/itassetmanagement/blob/main/Views/Dialogs.cs"

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_login,node_register,node_main,node_dashboard,node_assetui,node_employeeui,node_allocationui,node_historyui,node_profileui,node_uihelper,node_dialogs,node_user toneBlue
class node_auth,node_supabase toneAmber
class node_asset,node_employee,node_allocation,node_history toneMint
class node_models,node_store toneRose
```

## Components

### Desktop UI

- [Login Form](https://github.com/aleafarrel-25-11-6401/itassetmanagement/blob/main/Views/FormLogin.cs): `Views/FormLogin.cs`
- [Registration Form](https://github.com/aleafarrel-25-11-6401/itassetmanagement/blob/main/Views/FormRegister.cs): `Views/FormRegister.cs`
- [Main Navigation](https://github.com/aleafarrel-25-11-6401/itassetmanagement/blob/main/Views/MainForm.cs): `Views/MainForm.cs`
- [Analytics Dashboard](https://github.com/aleafarrel-25-11-6401/itassetmanagement/blob/main/Views/UC_Dashboard.cs): `Views/UC_Dashboard.cs`
- [Asset Screen](https://github.com/aleafarrel-25-11-6401/itassetmanagement/blob/main/Views/UC_Asset.cs): `Views/UC_Asset.cs`
- [Employee Screen](https://github.com/aleafarrel-25-11-6401/itassetmanagement/blob/main/Views/UC_Karyawan.cs): `Views/UC_Karyawan.cs`
- [Loan & Return Screen](https://github.com/aleafarrel-25-11-6401/itassetmanagement/blob/main/Views/UC_Alokasi.cs): `Views/UC_Alokasi.cs`
- [Audit History Screen](https://github.com/aleafarrel-25-11-6401/itassetmanagement/blob/main/Views/UC_Riwayat.cs): `Views/UC_Riwayat.cs`
- [Profile Screen](https://github.com/aleafarrel-25-11-6401/itassetmanagement/blob/main/Views/UC_Profil.cs): `Views/UC_Profil.cs`
- [UI Helpers](https://github.com/aleafarrel-25-11-6401/itassetmanagement/blob/main/Views/UIHelper.cs): `Views/UIHelper.cs`
- [Dialogs](https://github.com/aleafarrel-25-11-6401/itassetmanagement/blob/main/Views/Dialogs.cs): `Views/Dialogs.cs`

### Identity & Access

- [Authentication & Profile](https://github.com/aleafarrel-25-11-6401/itassetmanagement/blob/main/Controllers/AuthController.cs): `Controllers/AuthController.cs`

### Asset Operations

- [Asset Management](https://github.com/aleafarrel-25-11-6401/itassetmanagement/blob/main/Controllers/AssetController.cs): `Controllers/AssetController.cs`
- [Employee Management](https://github.com/aleafarrel-25-11-6401/itassetmanagement/blob/main/Controllers/KaryawanController.cs): `Controllers/KaryawanController.cs`
- [Loan & Return Logic](https://github.com/aleafarrel-25-11-6401/itassetmanagement/blob/main/Controllers/AlokasiController.cs): `Controllers/AlokasiController.cs`
- [Audit History Logic](https://github.com/aleafarrel-25-11-6401/itassetmanagement/blob/main/Controllers/RiwayatController.cs): `Controllers/RiwayatController.cs`

### Data & Domain

- [Domain Models](https://github.com/aleafarrel-25-11-6401/itassetmanagement/blob/main/Models/Models.cs): `Models/Models.cs`
- [REST Client & Cache](https://github.com/aleafarrel-25-11-6401/itassetmanagement/blob/main/Models/DataStore.cs): `Models/DataStore.cs`

### Other components

- **ITAM User**
- **Supabase PostgREST**

## Connections

- ITAM User → Login Form: enters credentials (evidence: `README.md`)
- Login Form → Authentication & Profile: requests login (evidence: `Views/FormLogin.cs`)
- Login Form → Registration Form: opens registration (evidence: `Views/FormLogin.cs`)
- Registration Form → Authentication & Profile: submits account (evidence: `Views/FormRegister.cs`)
- Login Form → Main Navigation: opens after login (evidence: `Views/FormLogin.cs`)
- Main Navigation → Analytics Dashboard: creates page (evidence: `Views/MainForm.cs`)
- Main Navigation → Asset Screen: creates page (evidence: `Views/MainForm.cs`)
- Main Navigation → Employee Screen: creates page (evidence: `Views/MainForm.cs`)
- Main Navigation → Loan & Return Screen: creates page (evidence: `Views/MainForm.cs`)
- Main Navigation → Audit History Screen: creates page (evidence: `Views/MainForm.cs`)
- Main Navigation → Profile Screen: creates page (evidence: `Views/MainForm.cs`)
- Asset Screen → Asset Management: invokes (evidence: `Views/UC_Asset.cs`)
- Employee Screen → Employee Management: invokes (evidence: `Views/UC_Karyawan.cs`)
- Loan & Return Screen → Loan & Return Logic: invokes (evidence: `Views/UC_Alokasi.cs`)
- Loan & Return Screen → Asset Management: loads assets (evidence: `Views/UC_Alokasi.cs`)
- Loan & Return Screen → Employee Management: loads employees (evidence: `Views/UC_Alokasi.cs`)
- Audit History Screen → Audit History Logic: invokes (evidence: `Views/UC_Riwayat.cs`)
- Profile Screen → Authentication & Profile: updates profile (evidence: `Views/UC_Profil.cs`)
- Analytics Dashboard → Asset Management: reads summary (evidence: `Views/UC_Dashboard.cs`)
- Analytics Dashboard → Loan & Return Logic: reads active loans (evidence: `Views/UC_Dashboard.cs`)
- Analytics Dashboard → Audit History Logic: reads recent activity (evidence: `Views/UC_Dashboard.cs`)
- Asset Management → REST Client & Cache: reads and writes (evidence: `Controllers/AssetController.cs`)
- Employee Management → REST Client & Cache: reads and writes (evidence: `Controllers/KaryawanController.cs`)
- Loan & Return Logic → REST Client & Cache: updates loans and stock (evidence: `Controllers/AlokasiController.cs`)
- Audit History Logic → REST Client & Cache: records and queries (evidence: `Controllers/RiwayatController.cs`)
- Authentication & Profile → REST Client & Cache: reads and writes (evidence: `Controllers/AuthController.cs`)
- Asset Management → Audit History Logic: records asset actions (evidence: `Controllers/AssetController.cs`)
- Loan & Return Logic → Audit History Logic: records loan events (evidence: `Controllers/AlokasiController.cs`)
- REST Client & Cache → Supabase PostgREST: sends REST requests (evidence: `Models/DataStore.cs`)
- REST Client & Cache → Domain Models: maps records (evidence: `Models/DataStore.cs`)
- Asset Management → Domain Models: uses domain types (evidence: `Controllers/AssetController.cs`)
- Loan & Return Logic → Domain Models: uses domain types (evidence: `Controllers/AlokasiController.cs`)
- Audit History Logic → Domain Models: uses domain types (evidence: `Controllers/RiwayatController.cs`)
- Main Navigation → UI Helpers: cancels debounce (evidence: `Views/MainForm.cs`)
- Asset Screen → UI Helpers: formats grids (evidence: `Views/UC_Asset.cs`)
- Login Form → Dialogs: shows messages (evidence: `Views/FormLogin.cs`)
