# excelpic/palm-oil-weighbridge-system architecture

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

- Interactive diagram: https://gitdiagram.com/excelpic/palm-oil-weighbridge-system
- Repository: https://github.com/excelpic/palm-oil-weighbridge-system

## Overview

Sistem Timbangan PKS is a VB.NET desktop weighbridge application for palm oil mill transactions. Its principal workflow captures vehicle and transaction details, records inbound and outbound weights, calculates and validates net weight, then records the transaction and supports ticketing, audit, and reporting. The graph preserves the README’s documented product capabilities and uses its workflow statements as relationship evidence. Only the unrelated SQL Server spatial loader was excerpted, so application-level links are based on README documentation rather than inspected implementation calls.

Main entry points: [`Forms/FormInputTimbangan.vb`](https://github.com/excelpic/palm-oil-weighbridge-system/blob/main/Forms/FormInputTimbangan.vb) (Transaction entry), [`Forms/FormLaporan.vb`](https://github.com/excelpic/palm-oil-weighbridge-system/blob/main/Forms/FormLaporan.vb) (Daily reporting), [`Classes/AuditLog.vb`](https://github.com/excelpic/palm-oil-weighbridge-system/blob/main/Classes/AuditLog.vb) (Audit logging), [`Classes/SerialPortHelper.vb`](https://github.com/excelpic/palm-oil-weighbridge-system/blob/main/Classes/SerialPortHelper.vb) (Serial indicator input)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_weighing["Weighing workflow"]
  node_transaction_entry["Transaction entry"]
  node_vehicle_data["Vehicle identification"]
  node_inbound_weighing["Inbound weighing<br/>[Timbangan.vb]"]
  node_loading_process["Loading or unloading"]
  node_outbound_weighing["Outbound weighing<br/>[Timbangan.vb]"]
  node_net_calculation["Net weight calculation<br/>[Timbangan.vb]"]
  node_validation["Transaction validation"]
  node_serial_indicator["Serial indicator input"]
end

subgraph group_operations["Operations and access"]
  node_master_data["Master data<br/>[FormMasterData.vb]"]
  node_authentication["User authentication<br/>[FormLogin.vb]"]
  node_user_management["User management"]
  node_audit_log["Audit logging<br/>[AuditLog.vb]"]
end

subgraph group_platform["Application services"]
  node_settings["Application settings<br/>[SettingsHelper.vb]"]
  node_password_hashing["Password hashing<br/>[PasswordHasher.vb]"]
  node_database_setup["Database initialization<br/>[DatabaseSetup.vb]"]
  node_database_migration["Schema migrations"]
  node_database[("SQL Server")]
end

subgraph group_outputs["Tickets and reporting"]
  node_ticket_printing["Ticket printing<br/>[PrintHelper.vb]"]
  node_daily_reports["Daily reporting<br/>[FormLaporan.vb]"]
  node_report_definition["RDLC report"]
  node_report_export["Report export<br/>[FormLaporan.vb]"]
  node_audit_view["Audit log view<br/>[FormAuditLog.vb]"]
end

node_operator(("Weighbridge operator"))

node_operator -->|"enters data"| node_transaction_entry
node_transaction_entry -->|"captures vehicle"| node_vehicle_data
node_transaction_entry -->|"records first weight"| node_inbound_weighing
node_transaction_entry -->|"records process"| node_loading_process
node_transaction_entry -->|"records second weight"| node_outbound_weighing
node_serial_indicator -.->|"supplies weight"| node_inbound_weighing
node_serial_indicator -.->|"supplies weight"| node_outbound_weighing
node_transaction_entry -->|"calculates net"| node_net_calculation
node_transaction_entry -->|"validates transaction"| node_validation
node_validation -->|"records transaction"| node_database
node_master_data -->|"stores master data"| node_database
node_authentication -->|"hashes credentials"| node_password_hashing
node_authentication -->|"checks users"| node_database
node_user_management -->|"manages users"| node_database
node_validation -->|"records activity"| node_audit_log
node_user_management -->|"records activity"| node_audit_log
node_audit_view -->|"views records"| node_audit_log
node_settings -->|"configures connection"| node_database
node_database_setup -->|"initializes schema"| node_database
node_database_migration -->|"updates schema"| node_database
node_validation -->|"prints ticket"| node_ticket_printing
node_validation -->|"provides transactions"| node_daily_reports
node_daily_reports -->|"renders report"| node_report_definition
node_daily_reports -->|"exports data"| node_report_export
node_daily_reports -->|"reads transactions"| node_database

click node_transaction_entry "https://github.com/excelpic/palm-oil-weighbridge-system/blob/main/Forms/FormInputTimbangan.vb"
click node_vehicle_data "https://github.com/excelpic/palm-oil-weighbridge-system/blob/main/Forms/FormInputTimbangan.vb"
click node_inbound_weighing "https://github.com/excelpic/palm-oil-weighbridge-system/blob/main/Classes/Timbangan.vb"
click node_loading_process "https://github.com/excelpic/palm-oil-weighbridge-system/blob/main/Forms/FormInputTimbangan.vb"
click node_outbound_weighing "https://github.com/excelpic/palm-oil-weighbridge-system/blob/main/Classes/Timbangan.vb"
click node_net_calculation "https://github.com/excelpic/palm-oil-weighbridge-system/blob/main/Classes/Timbangan.vb"
click node_validation "https://github.com/excelpic/palm-oil-weighbridge-system/blob/main/Forms/FormInputTimbangan.vb"
click node_serial_indicator "https://github.com/excelpic/palm-oil-weighbridge-system/blob/main/Classes/SerialPortHelper.vb"
click node_master_data "https://github.com/excelpic/palm-oil-weighbridge-system/blob/main/Forms/FormMasterData.vb"
click node_authentication "https://github.com/excelpic/palm-oil-weighbridge-system/blob/main/Forms/FormLogin.vb"
click node_user_management "https://github.com/excelpic/palm-oil-weighbridge-system/blob/main/Forms/FormManajemenUser.vb"
click node_audit_log "https://github.com/excelpic/palm-oil-weighbridge-system/blob/main/Classes/AuditLog.vb"
click node_settings "https://github.com/excelpic/palm-oil-weighbridge-system/blob/main/Classes/SettingsHelper.vb"
click node_password_hashing "https://github.com/excelpic/palm-oil-weighbridge-system/blob/main/Classes/PasswordHasher.vb"
click node_database_setup "https://github.com/excelpic/palm-oil-weighbridge-system/blob/main/Classes/DatabaseSetup.vb"
click node_database_migration "https://github.com/excelpic/palm-oil-weighbridge-system/blob/main/Classes/DatabaseMigration.vb"
click node_ticket_printing "https://github.com/excelpic/palm-oil-weighbridge-system/blob/main/Classes/PrintHelper.vb"
click node_daily_reports "https://github.com/excelpic/palm-oil-weighbridge-system/blob/main/Forms/FormLaporan.vb"
click node_report_definition "https://github.com/excelpic/palm-oil-weighbridge-system/blob/main/Reports/RptLaporanHarian.rdlc"
click node_report_export "https://github.com/excelpic/palm-oil-weighbridge-system/blob/main/Forms/FormLaporan.vb"
click node_audit_view "https://github.com/excelpic/palm-oil-weighbridge-system/blob/main/Forms/FormAuditLog.vb"

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_transaction_entry,node_vehicle_data,node_inbound_weighing,node_loading_process,node_outbound_weighing,node_net_calculation,node_validation,node_serial_indicator toneBlue
class node_master_data,node_authentication,node_user_management,node_audit_log toneAmber
class node_settings,node_password_hashing,node_database_setup,node_database_migration,node_database toneMint
class node_ticket_printing,node_daily_reports,node_report_definition,node_report_export,node_audit_view toneRose
class node_operator toneIndigo
```

## Components

### Weighing workflow

- [Transaction entry](https://github.com/excelpic/palm-oil-weighbridge-system/blob/main/Forms/FormInputTimbangan.vb): `Forms/FormInputTimbangan.vb`
- [Vehicle identification](https://github.com/excelpic/palm-oil-weighbridge-system/blob/main/Forms/FormInputTimbangan.vb): `Forms/FormInputTimbangan.vb`
- [Inbound weighing](https://github.com/excelpic/palm-oil-weighbridge-system/blob/main/Classes/Timbangan.vb): `Classes/Timbangan.vb`
- [Loading or unloading](https://github.com/excelpic/palm-oil-weighbridge-system/blob/main/Forms/FormInputTimbangan.vb): `Forms/FormInputTimbangan.vb`
- [Outbound weighing](https://github.com/excelpic/palm-oil-weighbridge-system/blob/main/Classes/Timbangan.vb): `Classes/Timbangan.vb`
- [Net weight calculation](https://github.com/excelpic/palm-oil-weighbridge-system/blob/main/Classes/Timbangan.vb): `Classes/Timbangan.vb`
- [Transaction validation](https://github.com/excelpic/palm-oil-weighbridge-system/blob/main/Forms/FormInputTimbangan.vb): `Forms/FormInputTimbangan.vb`
- [Serial indicator input](https://github.com/excelpic/palm-oil-weighbridge-system/blob/main/Classes/SerialPortHelper.vb): `Classes/SerialPortHelper.vb`

### Operations and access

- [Master data](https://github.com/excelpic/palm-oil-weighbridge-system/blob/main/Forms/FormMasterData.vb): `Forms/FormMasterData.vb`
- [User authentication](https://github.com/excelpic/palm-oil-weighbridge-system/blob/main/Forms/FormLogin.vb): `Forms/FormLogin.vb`
- [User management](https://github.com/excelpic/palm-oil-weighbridge-system/blob/main/Forms/FormManajemenUser.vb): `Forms/FormManajemenUser.vb`
- [Audit logging](https://github.com/excelpic/palm-oil-weighbridge-system/blob/main/Classes/AuditLog.vb): `Classes/AuditLog.vb`

### Application services

- [Application settings](https://github.com/excelpic/palm-oil-weighbridge-system/blob/main/Classes/SettingsHelper.vb): `Classes/SettingsHelper.vb`
- [Password hashing](https://github.com/excelpic/palm-oil-weighbridge-system/blob/main/Classes/PasswordHasher.vb): `Classes/PasswordHasher.vb`
- [Database initialization](https://github.com/excelpic/palm-oil-weighbridge-system/blob/main/Classes/DatabaseSetup.vb): `Classes/DatabaseSetup.vb`
- [Schema migrations](https://github.com/excelpic/palm-oil-weighbridge-system/blob/main/Classes/DatabaseMigration.vb): `Classes/DatabaseMigration.vb`
- **SQL Server**

### Tickets and reporting

- [Ticket printing](https://github.com/excelpic/palm-oil-weighbridge-system/blob/main/Classes/PrintHelper.vb): `Classes/PrintHelper.vb`
- [Daily reporting](https://github.com/excelpic/palm-oil-weighbridge-system/blob/main/Forms/FormLaporan.vb): `Forms/FormLaporan.vb`
- [RDLC report](https://github.com/excelpic/palm-oil-weighbridge-system/blob/main/Reports/RptLaporanHarian.rdlc): `Reports/RptLaporanHarian.rdlc`
- [Report export](https://github.com/excelpic/palm-oil-weighbridge-system/blob/main/Forms/FormLaporan.vb): `Forms/FormLaporan.vb`
- [Audit log view](https://github.com/excelpic/palm-oil-weighbridge-system/blob/main/Forms/FormAuditLog.vb): `Forms/FormAuditLog.vb`

### Other components

- **Weighbridge operator**

## Connections

- Weighbridge operator → Transaction entry: enters data (evidence: `README.md`)
- Transaction entry → Vehicle identification: captures vehicle (evidence: `README.md`)
- Transaction entry → Inbound weighing: records first weight (evidence: `README.md`)
- Transaction entry → Loading or unloading: records process (evidence: `README.md`)
- Transaction entry → Outbound weighing: records second weight (evidence: `README.md`)
- Serial indicator input → Inbound weighing: supplies weight (evidence: `README.md`)
- Serial indicator input → Outbound weighing: supplies weight (evidence: `README.md`)
- Transaction entry → Net weight calculation: calculates net (evidence: `README.md`)
- Transaction entry → Transaction validation: validates transaction (evidence: `README.md`)
- Transaction validation → SQL Server: records transaction (evidence: `README.md`)
- Master data → SQL Server: stores master data (evidence: `README.md`)
- User authentication → Password hashing: hashes credentials (evidence: `README.md`)
- User authentication → SQL Server: checks users (evidence: `README.md`)
- User management → SQL Server: manages users (evidence: `README.md`)
- Transaction validation → Audit logging: records activity (evidence: `README.md`)
- User management → Audit logging: records activity (evidence: `README.md`)
- Audit log view → Audit logging: views records (evidence: `README.md`)
- Application settings → SQL Server: configures connection (evidence: `README.md`)
- Database initialization → SQL Server: initializes schema (evidence: `README.md`)
- Schema migrations → SQL Server: updates schema (evidence: `README.md`)
- Transaction validation → Ticket printing: prints ticket (evidence: `README.md`)
- Transaction validation → Daily reporting: provides transactions (evidence: `README.md`)
- Daily reporting → RDLC report: renders report (evidence: `README.md`)
- Daily reporting → Report export: exports data (evidence: `README.md`)
- Daily reporting → SQL Server: reads transactions (evidence: `README.md`)
