# himani018/asset-management-system architecture

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

- Interactive diagram: https://gitdiagram.com/himani018/asset-management-system
- Repository: https://github.com/himani018/asset-management-system

## Overview

This PHP/MySQL asset-management application lets users sign up or sign in, then manage their organization’s inventory from a dashboard. The dashboard presents asset status and analytics, supports add/edit/delete operations, filtered reports, profile settings, and PDF downloads. Authentication, asset changes, and account updates use PHP handlers backed by MySQL. The README also describes role-based access and tracking hardware, software, and infrastructure. Some handlers and page wiring were not sampled; those relationships are omitted unless the tree, excerpts, or README supports them.

Main entry points: [`dashboard.php`](https://github.com/himani018/asset-management-system/blob/main/dashboard.php) (Asset dashboard), [`includes/dbh.inc.php`](https://github.com/himani018/asset-management-system/blob/main/includes/dbh.inc.php) (MySQL database), [`login.php`](https://github.com/himani018/asset-management-system/blob/main/login.php) (Login and signup), [`includes/loginhandler.inc.php`](https://github.com/himani018/asset-management-system/blob/main/includes/loginhandler.inc.php) (Sign-in handler)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Identity and access"]
  node_auth_ui["Login and signup<br/>[login.php]"]
  node_login_handler["Sign-in handler"]
  node_signup_handler["Signup handler"]
end

subgraph group_inventory["Asset inventory"]
  node_dashboard["Asset dashboard<br/>[dashboard.php]"]
  node_asset_add["Add asset<br/>[asset_add.php]"]
  node_asset_update["Update asset<br/>[asset_update.php]"]
  node_asset_delete["Delete asset<br/>[asset_delete.php]"]
end

subgraph group_insights["Dashboard and reporting"]
  node_dashboard_js["Dashboard interactions<br/>[dashboard.js]"]
  node_reports["Filtered reports<br/>[dashboard.php]"]
  node_analytics["Asset analytics<br/>[dashboard.php]"]
  node_pdf["PDF export<br/>[dashboard.php]"]
end

subgraph group_account["Account settings"]
  node_settings["Profile settings<br/>[dashboard.php]"]
  node_settings_handler["Update account<br/>[change.php]"]
end

node_user(("User"))
node_database[("MySQL database<br/>[dbh.inc.php]")]

node_user -->|"opens"| node_auth_ui
node_auth_ui -->|"submits sign-in"| node_login_handler
node_auth_ui -->|"submits signup"| node_signup_handler
node_login_handler -->|"queries users"| node_database
node_signup_handler -->|"creates user"| node_database
node_login_handler -->|"redirects to"| node_dashboard
node_signup_handler -->|"redirects to"| node_dashboard
node_user -->|"manages assets"| node_dashboard
node_dashboard -->|"reads assets"| node_database
node_dashboard -->|"submits add"| node_asset_add
node_dashboard -->|"submits edit"| node_asset_update
node_dashboard -->|"submits delete"| node_asset_delete
node_asset_add -.->|"writes assets"| node_database
node_asset_update -.->|"updates assets"| node_database
node_asset_delete -->|"deletes assets"| node_database
node_dashboard -.->|"uses interactions"| node_dashboard_js
node_dashboard_js -->|"filters table"| node_reports
node_dashboard -->|"provides chart counts"| node_analytics
node_dashboard -->|"invokes export"| node_pdf
node_user -->|"views settings"| node_settings
node_settings -.->|"submits changes"| node_settings_handler
node_settings_handler -->|"updates user"| node_database

click node_auth_ui "https://github.com/himani018/asset-management-system/blob/main/login.php"
click node_login_handler "https://github.com/himani018/asset-management-system/blob/main/includes/loginhandler.inc.php"
click node_signup_handler "https://github.com/himani018/asset-management-system/blob/main/includes/formhandler.inc.php"
click node_dashboard "https://github.com/himani018/asset-management-system/blob/main/dashboard.php"
click node_asset_add "https://github.com/himani018/asset-management-system/blob/main/includes/asset_add.php"
click node_asset_update "https://github.com/himani018/asset-management-system/blob/main/includes/asset_update.php"
click node_asset_delete "https://github.com/himani018/asset-management-system/blob/main/includes/asset_delete.php"
click node_database "https://github.com/himani018/asset-management-system/blob/main/includes/dbh.inc.php"
click node_dashboard_js "https://github.com/himani018/asset-management-system/blob/main/dashboard.js"
click node_reports "https://github.com/himani018/asset-management-system/blob/main/dashboard.php"
click node_analytics "https://github.com/himani018/asset-management-system/blob/main/dashboard.php"
click node_pdf "https://github.com/himani018/asset-management-system/blob/main/dashboard.php"
click node_settings "https://github.com/himani018/asset-management-system/blob/main/dashboard.php"
click node_settings_handler "https://github.com/himani018/asset-management-system/blob/main/includes/change.php"

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_ui,node_login_handler,node_signup_handler,node_user toneBlue
class node_dashboard,node_asset_add,node_asset_update,node_asset_delete,node_database toneAmber
class node_dashboard_js,node_reports,node_analytics,node_pdf toneMint
class node_settings,node_settings_handler toneRose
```

## Components

### Identity and access

- [Login and signup](https://github.com/himani018/asset-management-system/blob/main/login.php): `login.php`
- [Sign-in handler](https://github.com/himani018/asset-management-system/blob/main/includes/loginhandler.inc.php): `includes/loginhandler.inc.php`
- [Signup handler](https://github.com/himani018/asset-management-system/blob/main/includes/formhandler.inc.php): `includes/formhandler.inc.php`

### Asset inventory

- [Asset dashboard](https://github.com/himani018/asset-management-system/blob/main/dashboard.php): `dashboard.php`
- [Add asset](https://github.com/himani018/asset-management-system/blob/main/includes/asset_add.php): `includes/asset_add.php`
- [Update asset](https://github.com/himani018/asset-management-system/blob/main/includes/asset_update.php): `includes/asset_update.php`
- [Delete asset](https://github.com/himani018/asset-management-system/blob/main/includes/asset_delete.php): `includes/asset_delete.php`

### Dashboard and reporting

- [Dashboard interactions](https://github.com/himani018/asset-management-system/blob/main/dashboard.js): `dashboard.js`
- [Filtered reports](https://github.com/himani018/asset-management-system/blob/main/dashboard.php): `dashboard.php`
- [Asset analytics](https://github.com/himani018/asset-management-system/blob/main/dashboard.php): `dashboard.php`
- [PDF export](https://github.com/himani018/asset-management-system/blob/main/dashboard.php): `dashboard.php`

### Account settings

- [Profile settings](https://github.com/himani018/asset-management-system/blob/main/dashboard.php): `dashboard.php`
- [Update account](https://github.com/himani018/asset-management-system/blob/main/includes/change.php): `includes/change.php`

### Other components

- **User**
- [MySQL database](https://github.com/himani018/asset-management-system/blob/main/includes/dbh.inc.php): `includes/dbh.inc.php`

## Connections

- User → Login and signup: opens (evidence: `login.php`)
- Login and signup → Sign-in handler: submits sign-in (evidence: `login.php`)
- Login and signup → Signup handler: submits signup (evidence: `login.php`)
- Sign-in handler → MySQL database: queries users (evidence: `includes/loginhandler.inc.php`)
- Signup handler → MySQL database: creates user (evidence: `includes/formhandler.inc.php`)
- Sign-in handler → Asset dashboard: redirects to (evidence: `includes/loginhandler.inc.php`)
- Signup handler → Asset dashboard: redirects to (evidence: `includes/formhandler.inc.php`)
- User → Asset dashboard: manages assets (evidence: `dashboard.php`)
- Asset dashboard → MySQL database: reads assets (evidence: `dashboard.php`)
- Asset dashboard → Add asset: submits add (evidence: `dashboard.php`)
- Asset dashboard → Update asset: submits edit (evidence: `dashboard.php`)
- Asset dashboard → Delete asset: submits delete (evidence: `dashboard.php`)
- Add asset → MySQL database: writes assets
- Update asset → MySQL database: updates assets
- Delete asset → MySQL database: deletes assets (evidence: `includes/asset_delete.php`)
- Asset dashboard → Dashboard interactions: uses interactions
- Dashboard interactions → Filtered reports: filters table (evidence: `dashboard.js`)
- Asset dashboard → Asset analytics: provides chart counts (evidence: `dashboard.php`)
- Asset dashboard → PDF export: invokes export (evidence: `dashboard.php`)
- User → Profile settings: views settings (evidence: `dashboard.php`)
- Profile settings → Update account: submits changes
- Update account → MySQL database: updates user (evidence: `includes/change.php`)
