← Back to Ledger

LEDGER // System Design

Ledger is a self-hosted IT asset management platform I designed and built for an on-premises enterprise environment of ~600 users. It tracks employees and hardware, integrates with Active Directory, scans and deploys software across the network, and opens remote sessions through RustDesk. The diagrams below document its design in UML.

01

Use Case Diagram

Who uses Ledger and for what. The IT administrator is the primary actor; Active Directory and domain workstations are external systems that Ledger reads from and acts on.

IT Administrator

Active Directory
(LDAP)

Domain workstations

Manage employees

Manage assets
laptops · printers · switches · servers

Bulk import from Excel

Sync users & computers from AD

Scan installed software

Deploy software (MSI / EXE)

Open remote session (RustDesk)

Dashboard & recent changes

Back up database

02

Component Diagram

How the system is built. A vanilla JavaScript single-page app talks to a Python/Flask REST API backed by PostgreSQL. Desktop tools handle bulk import and service control; the deploy module reaches workstations over SMB and scheduled tasks.

Corporate network

Ledger server (Windows, on-prem)

Admin workstation

HTTPS / JSON

start / stop

SQL

SQL

LDAP query

SMB copy + scheduled task

remote session

Web UI
Vanilla JS SPA · BG/EN

LedgerImport.exe
Excel importer

LedgerLauncher.exe
service control

Flask REST API
Python

Deploy & scan module
software_deploy.py

PostgreSQL 16

backup_db.py
timestamped backups

RustDesk relay
hbbs / hbbr

Active Directory
LDAP

Domain workstations
multiple VLANs

03

Sequence Diagram — Software Deployment

What happens when an administrator deploys a package to several computers: every step is logged, each host has its own timeout, and the UI receives live progress.

Target workstationPostgreSQLFlask APIWeb UITarget workstationPostgreSQLFlask APIWeb UIloop[For each target (per-host timeout)]Dedicated folder + MSI preferred:EXE copies to system temp are blocked by security policyIT AdminSelect package + target computers1POST /deploy {package, targets}2Insert deploy_log (status = queued)3Connect admin share (net use)4Copy installer to dedicated deploy folder5Create & run scheduled task as SYSTEM6Exit code7Update deploy_log (success / failed)8Progress update9Summary: installed / failed per host10IT Admin
04

Entity-Relationship Diagram

Simplified logical data model: people and departments, the hardware assigned to them, installed software, and the audit trail of every deployment.

has

located in

is assigned

receives

deployed in

has

DEPARTMENT

int

id

PK

string

name

EMPLOYEE

int

id

PK

string

full_name

string

ad_username

int

department_id

FK

PRINTER

int

id

PK

string

model

string

ip_address

string

connection_type

int

department_id

FK

LAPTOP

int

id

PK

string

hostname

string

serial_number

string

ip_address

string

rustdesk_id

int

employee_id

FK

DEPLOY_LOG

int

id

PK

int

laptop_id

FK

int

package_id

FK

string

status

datetime

created_at

SOFTWARE_PACKAGE

int

id

PK

string

name

string

deploy_type

string

deploy_flags

INSTALLED_SOFTWARE

int

id

PK

int

laptop_id

FK

string

name

string

version

SWITCH

int

id

PK

string

model

string

ip_address

string

vlan_info

SERVER

int

id

PK

string

hostname

string

role

string

ip_address