# sterboub111-png/asset-value architecture

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

- Interactive diagram: https://gitdiagram.com/sterboub111-png/asset-value
- Repository: https://github.com/sterboub111-png/asset-value

## Overview

Usool is a local fixed-asset register. Users work through a browser UI that calls a loopback Python API; backend services apply asset, custody, maintenance, and accounting rules and persist application data in SQLite. The documented accounting workflow includes proposing depreciation, reviewing it, and posting periods in sequence; disposal and reporting are additional capabilities. The TypeScript and static JavaScript trees contain corresponding frontend code. Some backend routes and services were not sampled, so their internal call relationships are left out rather than inferred.

Main entry points: [`app/api/routes`](https://github.com/sterboub111-png/asset-value/tree/main/app/api/routes) (Feature API routes), [`web/src/shell/routes.ts`](https://github.com/sterboub111-png/asset-value/blob/main/web/src/shell/routes.ts) (Page routing), [`app/server.py`](https://github.com/sterboub111-png/asset-value/blob/main/app/server.py) (HTTP server), [`web/src/core/api.ts`](https://github.com/sterboub111-png/asset-value/blob/main/web/src/core/api.ts) (API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Browser application"]
  node_shell["Page routing<br/>[routes.ts]"]
  node_api_client["API client<br/>[api.ts]"]
  node_ui_kit["UI kit<br/>[index.ts]"]
  node_asset_pages["Asset pages<br/>[routes.ts]"]
  node_custody_pages["Custody pages<br/>[custody.ts]"]
  node_employee_pages["Employee pages<br/>[employees.ts]"]
  node_depreciation_pages["Accounting pages<br/>[depreciation.ts]"]
  node_report_pages["Report pages<br/>[reports.ts]"]
end

subgraph group_api["API and security"]
  node_api_server["HTTP server<br/>[server.py]"]
  node_route_table["Route table<br/>[router.py]"]
  node_auth["Authentication and permissions<br/>[auth.py]"]
  node_api_routes["Feature API routes"]
  node_database[("SQLite database<br/>[db.py]")]
end

subgraph group_assets["Asset operations"]
  node_asset_service["Asset register and transfers<br/>[assets.py]"]
  node_custody_service["Asset custody<br/>[custody.py]"]
  node_maintenance["Maintenance orders<br/>[maintenance.py]"]
end

subgraph group_accounting["Accounting and insights"]
  node_depreciation["Depreciation and periods<br/>[depreciation.py]"]
  node_disposal["Asset disposal<br/>[disposal.py]"]
  node_reports["Reports<br/>[reports.py]"]
  node_inquiries["Journal and audit inquiries<br/>[inquiries.py]"]
end

subgraph group_support["Contacts and administration"]
  node_contacts["Employees and suppliers<br/>[employees.py]"]
  node_settings["Settings and master data<br/>[settings.py]"]
  node_backups["Backup management<br/>[backup.py]"]
end

node_user(("Local user"))
node_browser(("Web browser"))

node_user -->|"uses"| node_browser
node_browser -->|"opens pages"| node_shell
node_shell -->|"routes to"| node_asset_pages
node_shell -->|"routes to"| node_custody_pages
node_shell -->|"routes to"| node_employee_pages
node_shell -->|"routes to"| node_depreciation_pages
node_shell -->|"routes to"| node_report_pages
node_asset_pages -.->|"uses"| node_ui_kit
node_custody_pages -->|"calls"| node_api_client
node_employee_pages -->|"calls"| node_api_client
node_depreciation_pages -->|"calls"| node_api_client
node_report_pages -->|"calls"| node_api_client
node_api_client -->|"sends HTTP requests"| node_api_server
node_api_server -->|"dispatches requests"| node_route_table
node_api_server -->|"checks sessions"| node_auth
node_api_server -->|"opens database"| node_database
node_api_server -->|"loads routes"| node_api_routes
node_api_routes -->|"uses services"| node_asset_service
node_asset_service -->|"reads and writes"| node_database
node_depreciation -->|"reads asset data"| node_asset_service
node_maintenance -->|"reads and writes"| node_database
node_api_routes -.->|"dispatches to"| node_custody_service
node_api_routes -.->|"dispatches to"| node_maintenance
node_api_routes -.->|"dispatches to"| node_depreciation
node_api_routes -.->|"dispatches to"| node_disposal
node_api_routes -.->|"dispatches to"| node_reports
node_api_routes -.->|"dispatches to"| node_inquiries
node_api_routes -.->|"dispatches to"| node_contacts
node_api_routes -.->|"dispatches to"| node_settings
node_api_routes -.->|"dispatches to"| node_backups

click node_shell "https://github.com/sterboub111-png/asset-value/blob/main/web/src/shell/routes.ts"
click node_api_client "https://github.com/sterboub111-png/asset-value/blob/main/web/src/core/api.ts"
click node_ui_kit "https://github.com/sterboub111-png/asset-value/blob/main/web/src/ui/index.ts"
click node_asset_pages "https://github.com/sterboub111-png/asset-value/blob/main/web/src/shell/routes.ts"
click node_custody_pages "https://github.com/sterboub111-png/asset-value/blob/main/web/src/pages/contacts/custody.ts"
click node_employee_pages "https://github.com/sterboub111-png/asset-value/blob/main/web/src/pages/contacts/employees.ts"
click node_depreciation_pages "https://github.com/sterboub111-png/asset-value/blob/main/web/src/pages/depreciation/depreciation.ts"
click node_report_pages "https://github.com/sterboub111-png/asset-value/blob/main/web/src/pages/reports/reports.ts"
click node_api_server "https://github.com/sterboub111-png/asset-value/blob/main/app/server.py"
click node_route_table "https://github.com/sterboub111-png/asset-value/blob/main/app/api/router.py"
click node_auth "https://github.com/sterboub111-png/asset-value/blob/main/app/auth.py"
click node_api_routes "https://github.com/sterboub111-png/asset-value/tree/main/app/api/routes"
click node_database "https://github.com/sterboub111-png/asset-value/blob/main/app/db.py"
click node_asset_service "https://github.com/sterboub111-png/asset-value/blob/main/app/services/assets.py"
click node_custody_service "https://github.com/sterboub111-png/asset-value/blob/main/app/services/custody.py"
click node_maintenance "https://github.com/sterboub111-png/asset-value/blob/main/app/services/maintenance.py"
click node_depreciation "https://github.com/sterboub111-png/asset-value/blob/main/app/services/depreciation.py"
click node_disposal "https://github.com/sterboub111-png/asset-value/blob/main/app/services/disposal.py"
click node_reports "https://github.com/sterboub111-png/asset-value/blob/main/app/reports.py"
click node_inquiries "https://github.com/sterboub111-png/asset-value/blob/main/app/services/inquiries.py"
click node_contacts "https://github.com/sterboub111-png/asset-value/blob/main/app/services/employees.py"
click node_settings "https://github.com/sterboub111-png/asset-value/blob/main/app/services/settings.py"
click node_backups "https://github.com/sterboub111-png/asset-value/blob/main/app/services/backup.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_shell,node_api_client,node_ui_kit,node_asset_pages,node_custody_pages,node_employee_pages,node_depreciation_pages,node_report_pages,node_user,node_browser toneBlue
class node_api_server,node_route_table,node_auth,node_api_routes,node_database toneAmber
class node_asset_service,node_custody_service,node_maintenance toneMint
class node_depreciation,node_disposal,node_reports,node_inquiries toneRose
class node_contacts,node_settings,node_backups toneIndigo
```

## Components

### Browser application

- [Page routing](https://github.com/sterboub111-png/asset-value/blob/main/web/src/shell/routes.ts): `web/src/shell/routes.ts`
- [API client](https://github.com/sterboub111-png/asset-value/blob/main/web/src/core/api.ts): `web/src/core/api.ts`
- [UI kit](https://github.com/sterboub111-png/asset-value/blob/main/web/src/ui/index.ts): `web/src/ui/index.ts`
- [Asset pages](https://github.com/sterboub111-png/asset-value/blob/main/web/src/shell/routes.ts): `web/src/shell/routes.ts`
- [Custody pages](https://github.com/sterboub111-png/asset-value/blob/main/web/src/pages/contacts/custody.ts): `web/src/pages/contacts/custody.ts`
- [Employee pages](https://github.com/sterboub111-png/asset-value/blob/main/web/src/pages/contacts/employees.ts): `web/src/pages/contacts/employees.ts`
- [Accounting pages](https://github.com/sterboub111-png/asset-value/blob/main/web/src/pages/depreciation/depreciation.ts): `web/src/pages/depreciation/depreciation.ts`
- [Report pages](https://github.com/sterboub111-png/asset-value/blob/main/web/src/pages/reports/reports.ts): `web/src/pages/reports/reports.ts`

### API and security

- [HTTP server](https://github.com/sterboub111-png/asset-value/blob/main/app/server.py): `app/server.py`
- [Route table](https://github.com/sterboub111-png/asset-value/blob/main/app/api/router.py): `app/api/router.py`
- [Authentication and permissions](https://github.com/sterboub111-png/asset-value/blob/main/app/auth.py): `app/auth.py`
- [Feature API routes](https://github.com/sterboub111-png/asset-value/tree/main/app/api/routes): `app/api/routes`
- [SQLite database](https://github.com/sterboub111-png/asset-value/blob/main/app/db.py): `app/db.py`

### Asset operations

- [Asset register and transfers](https://github.com/sterboub111-png/asset-value/blob/main/app/services/assets.py): `app/services/assets.py`
- [Asset custody](https://github.com/sterboub111-png/asset-value/blob/main/app/services/custody.py): `app/services/custody.py`
- [Maintenance orders](https://github.com/sterboub111-png/asset-value/blob/main/app/services/maintenance.py): `app/services/maintenance.py`

### Accounting and insights

- [Depreciation and periods](https://github.com/sterboub111-png/asset-value/blob/main/app/services/depreciation.py): `app/services/depreciation.py`
- [Asset disposal](https://github.com/sterboub111-png/asset-value/blob/main/app/services/disposal.py): `app/services/disposal.py`
- [Reports](https://github.com/sterboub111-png/asset-value/blob/main/app/reports.py): `app/reports.py`
- [Journal and audit inquiries](https://github.com/sterboub111-png/asset-value/blob/main/app/services/inquiries.py): `app/services/inquiries.py`

### Contacts and administration

- [Employees and suppliers](https://github.com/sterboub111-png/asset-value/blob/main/app/services/employees.py): `app/services/employees.py`
- [Settings and master data](https://github.com/sterboub111-png/asset-value/blob/main/app/services/settings.py): `app/services/settings.py`
- [Backup management](https://github.com/sterboub111-png/asset-value/blob/main/app/services/backup.py): `app/services/backup.py`

### Other components

- **Local user**
- **Web browser**

## Connections

- Local user → Web browser: uses (evidence: `README.md`)
- Web browser → Page routing: opens pages
- Page routing → Asset pages: routes to (evidence: `web/src/shell/routes.ts`)
- Page routing → Custody pages: routes to (evidence: `web/src/shell/routes.ts`)
- Page routing → Employee pages: routes to (evidence: `web/src/shell/routes.ts`)
- Page routing → Accounting pages: routes to (evidence: `web/src/shell/routes.ts`)
- Page routing → Report pages: routes to (evidence: `web/src/shell/routes.ts`)
- Asset pages → UI kit: uses
- Custody pages → API client: calls (evidence: `web/src/pages/contacts/custody.ts`)
- Employee pages → API client: calls (evidence: `web/src/pages/contacts/employees.ts`)
- Accounting pages → API client: calls (evidence: `web/src/pages/depreciation/depreciation.ts`)
- Report pages → API client: calls (evidence: `web/src/pages/reports/reports.ts`)
- API client → HTTP server: sends HTTP requests (evidence: `web/src/core/api.ts`)
- HTTP server → Route table: dispatches requests (evidence: `app/server.py`)
- HTTP server → Authentication and permissions: checks sessions (evidence: `app/server.py`)
- HTTP server → SQLite database: opens database (evidence: `app/server.py`)
- HTTP server → Feature API routes: loads routes (evidence: `app/server.py`)
- Feature API routes → Asset register and transfers: uses services (evidence: `app/api/routes/assets.py`)
- Asset register and transfers → SQLite database: reads and writes (evidence: `app/services/assets.py`)
- Depreciation and periods → Asset register and transfers: reads asset data (evidence: `app/services/depreciation.py`)
- Maintenance orders → SQLite database: reads and writes (evidence: `app/services/maintenance.py`)
- Feature API routes → Asset custody: dispatches to
- Feature API routes → Maintenance orders: dispatches to
- Feature API routes → Depreciation and periods: dispatches to
- Feature API routes → Asset disposal: dispatches to
- Feature API routes → Reports: dispatches to
- Feature API routes → Journal and audit inquiries: dispatches to
- Feature API routes → Employees and suppliers: dispatches to
- Feature API routes → Settings and master data: dispatches to
- Feature API routes → Backup management: dispatches to
