# lunalily-17/it-asset-management architecture

> Architecture diagram of the GitHub repository lunalily-17/it-asset-management, 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/lunalily-17/it-asset-management
- Repository: https://github.com/lunalily-17/it-asset-management

## Overview

This repository describes an IT asset management product covering asset lifecycle and assignment, employee asset interactions, auditing, and system administration. The intended user workflow is role-based API use across those domains; the README names the roles and capabilities, but the route and service excerpts are empty, so their internal call paths are not verified. The visible runtime code seeds asset records and persists them through a JSON-backed store, despite the README describing in-memory storage. The sampled main module imports a model path absent from the file tree, so that link is not inferred.

Main entry points: [`routes/asset.py`](https://github.com/lunalily-17/it-asset-management/blob/development/routes/asset.py) (Asset routes), [`routes/employee.py`](https://github.com/lunalily-17/it-asset-management/blob/development/routes/employee.py) (Employee routes), [`routes/audit.py`](https://github.com/lunalily-17/it-asset-management/blob/development/routes/audit.py) (Audit routes), [`routes/system_admin.py`](https://github.com/lunalily-17/it-asset-management/blob/development/routes/system_admin.py) (Admin routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API routes"]
  node_asset_routes["Asset routes<br/>[asset.py]"]
  node_employee_routes["Employee routes<br/>[employee.py]"]
  node_audit_routes["Audit routes<br/>[audit.py]"]
  node_admin_routes["Admin routes<br/>[system_admin.py]"]
end

subgraph group_domain["Domain services"]
  node_asset_service["Asset operations<br/>[asset_service.py]"]
  node_employee_service["Employee operations"]
  node_audit_service["Audit operations<br/>[audit_service.py]"]
  node_admin_service["Admin operations"]
end

subgraph group_models["Data models"]
  node_asset_models["Asset records<br/>[asset_schema.py]"]
  node_employee_model["Employee record<br/>[employee_schema.py]"]
  node_audit_model["Audit schema<br/>[audit_schema.py]"]
  node_admin_model["Admin schema"]
end

subgraph group_storage["Persistence"]
  node_json_store[("JSON-backed state<br/>[db_json.py]")]
  node_employee_memory["Employee sample data<br/>[memory.py]"]
end

node_asset_manager(("Asset manager"))
node_employee(("Employee"))
node_auditor(("Auditor"))
node_admin(("System admin"))
node_seed["Sample data seeder<br/>[main.py]"]

node_asset_manager -.->|"manages assets"| node_asset_routes
node_employee -.->|"uses employee functions"| node_employee_routes
node_auditor -.->|"reviews records"| node_audit_routes
node_admin -.->|"administers system"| node_admin_routes
node_asset_routes -.->|"delegates to"| node_asset_service
node_employee_routes -.->|"delegates to"| node_employee_service
node_audit_routes -.->|"delegates to"| node_audit_service
node_admin_routes -.->|"delegates to"| node_admin_service
node_seed -->|"loads and saves"| node_json_store
node_employee_memory -->|"constructs records"| node_employee_model

click node_asset_routes "https://github.com/lunalily-17/it-asset-management/blob/development/routes/asset.py"
click node_employee_routes "https://github.com/lunalily-17/it-asset-management/blob/development/routes/employee.py"
click node_audit_routes "https://github.com/lunalily-17/it-asset-management/blob/development/routes/audit.py"
click node_admin_routes "https://github.com/lunalily-17/it-asset-management/blob/development/routes/system_admin.py"
click node_asset_service "https://github.com/lunalily-17/it-asset-management/blob/development/services/asset_service.py"
click node_employee_service "https://github.com/lunalily-17/it-asset-management/blob/development/services/employee_service.py"
click node_audit_service "https://github.com/lunalily-17/it-asset-management/blob/development/services/audit_service.py"
click node_admin_service "https://github.com/lunalily-17/it-asset-management/blob/development/services/system_admin_service.py"
click node_asset_models "https://github.com/lunalily-17/it-asset-management/blob/development/models/asset_schema.py"
click node_employee_model "https://github.com/lunalily-17/it-asset-management/blob/development/models/employee_schema.py"
click node_audit_model "https://github.com/lunalily-17/it-asset-management/blob/development/models/audit_schema.py"
click node_admin_model "https://github.com/lunalily-17/it-asset-management/blob/development/models/system_admin_schema.py"
click node_seed "https://github.com/lunalily-17/it-asset-management/blob/development/main.py"
click node_json_store "https://github.com/lunalily-17/it-asset-management/blob/development/database/db_json.py"
click node_employee_memory "https://github.com/lunalily-17/it-asset-management/blob/development/database/memory.py"

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_asset_routes,node_employee_routes,node_audit_routes,node_admin_routes toneBlue
class node_asset_service,node_employee_service,node_audit_service,node_admin_service toneAmber
class node_asset_models,node_employee_model,node_audit_model,node_admin_model toneMint
class node_json_store,node_employee_memory toneRose
class node_asset_manager,node_employee,node_auditor,node_admin toneIndigo
class node_seed toneTeal
```

## Components

### API routes

- [Asset routes](https://github.com/lunalily-17/it-asset-management/blob/development/routes/asset.py): `routes/asset.py`
- [Employee routes](https://github.com/lunalily-17/it-asset-management/blob/development/routes/employee.py): `routes/employee.py`
- [Audit routes](https://github.com/lunalily-17/it-asset-management/blob/development/routes/audit.py): `routes/audit.py`
- [Admin routes](https://github.com/lunalily-17/it-asset-management/blob/development/routes/system_admin.py): `routes/system_admin.py`

### Domain services

- [Asset operations](https://github.com/lunalily-17/it-asset-management/blob/development/services/asset_service.py): `services/asset_service.py`
- [Employee operations](https://github.com/lunalily-17/it-asset-management/blob/development/services/employee_service.py): `services/employee_service.py`
- [Audit operations](https://github.com/lunalily-17/it-asset-management/blob/development/services/audit_service.py): `services/audit_service.py`
- [Admin operations](https://github.com/lunalily-17/it-asset-management/blob/development/services/system_admin_service.py): `services/system_admin_service.py`

### Data models

- [Asset records](https://github.com/lunalily-17/it-asset-management/blob/development/models/asset_schema.py): `models/asset_schema.py`
- [Employee record](https://github.com/lunalily-17/it-asset-management/blob/development/models/employee_schema.py): `models/employee_schema.py`
- [Audit schema](https://github.com/lunalily-17/it-asset-management/blob/development/models/audit_schema.py): `models/audit_schema.py`
- [Admin schema](https://github.com/lunalily-17/it-asset-management/blob/development/models/system_admin_schema.py): `models/system_admin_schema.py`

### Persistence

- [JSON-backed state](https://github.com/lunalily-17/it-asset-management/blob/development/database/db_json.py): `database/db_json.py`
- [Employee sample data](https://github.com/lunalily-17/it-asset-management/blob/development/database/memory.py): `database/memory.py`

### Other components

- **Asset manager**
- **Employee**
- **Auditor**
- **System admin**
- [Sample data seeder](https://github.com/lunalily-17/it-asset-management/blob/development/main.py): `main.py`

## Connections

- Asset manager → Asset routes: manages assets (evidence: `README.md`)
- Employee → Employee routes: uses employee functions (evidence: `README.md`)
- Auditor → Audit routes: reviews records (evidence: `README.md`)
- System admin → Admin routes: administers system (evidence: `README.md`)
- Asset routes → Asset operations: delegates to
- Employee routes → Employee operations: delegates to
- Audit routes → Audit operations: delegates to
- Admin routes → Admin operations: delegates to
- Sample data seeder → JSON-backed state: loads and saves (evidence: `main.py`)
- Employee sample data → Employee record: constructs records (evidence: `database/memory.py`)
