# pinwaru/toolhub-th architecture

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

- Interactive diagram: https://gitdiagram.com/pinwaru/toolhub-th
- Repository: https://github.com/pinwaru/toolhub-th

## Overview

ToolHub TH is a collection of free browser-based calculators and utilities. The principal workflow is to choose a tool, enter values or provide content, and receive a calculated result or transformed/downloadable output. The tree documents broad tool categories; sampled scripts confirm several calculation and media workflows. Most page-to-script wiring and the behavior of unsampled tools cannot be verified from the supplied excerpts, so those connections are left implicit.

Main entry points: [`tools.html`](https://github.com/pinwaru/toolhub-th/blob/main/tools.html) (Tool catalog), [`calculators.html`](https://github.com/pinwaru/toolhub-th/blob/main/calculators.html) (Calculator catalog), [`js/currency-converter.js`](https://github.com/pinwaru/toolhub-th/blob/main/js/currency-converter.js) (Exchange rates and conversion), [`tools/tax-calculator.html`](https://github.com/pinwaru/toolhub-th/blob/main/tools/tax-calculator.html) (Tax calculator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Discovery"]
  node_home["Home<br/>[index.html]"]
  node_catalog["Tool catalog<br/>[tools.html]"]
  node_calculator_catalog["Calculator catalog<br/>[calculators.html]"]
end

subgraph group_calculators["Calculators"]
  node_finance_pages["Finance tools"]
  node_tax["Tax calculator"]
  node_tax_logic["Tax calculation<br/>[tax-calculator.js]"]
  node_loan["Loan calculator"]
  node_loan_logic["Loan calculation<br/>[loan-calculator.js]"]
  node_discount["Discount calculator"]
  node_discount_logic["Discount calculation"]
  node_student_pages["Student tools"]
  node_gpa["GPA calculator"]
  node_gpa_logic["GPA calculation<br/>[gpa-calculator.js]"]
  node_grade["Grade calculator"]
  node_grade_logic["Grade calculation"]
  node_health_pages["Health and date tools"]
  node_pregnancy["Pregnancy calculator"]
  node_pregnancy_logic["Pregnancy calculation"]
  node_other_calculators["Other calculators"]
  node_standard_calc["Standard calculator"]
  node_standard_logic["Standard calculation"]
  node_scientific_calc["Scientific calculator"]
  node_scientific_logic["Scientific calculation"]
  node_currency["Currency converter"]
  node_currency_logic["Exchange rates and conversion"]
end

subgraph group_utilities["Utilities"]
  node_utilities_catalog["Other utilities"]
  node_image_compressor["Image compressor"]
  node_image_logic["Image processing"]
  node_random_picker["Random picker<br/>[random-picker.html]"]
  node_random_logic["Wheel and winner<br/>[random-picker.js]"]
  node_countdown["Countdown and stopwatch"]
  node_countdown_logic["Timer behavior<br/>[countdown-timer.js]"]
end

subgraph group_content["Guides and information"]
end

node_visitor(("Visitor"))
node_exchange_api{{"Exchange-rate API"}}

node_visitor -->|"opens"| node_home
node_visitor -->|"browses"| node_catalog
node_visitor -->|"browses"| node_calculator_catalog
node_catalog -->|"lists"| node_finance_pages
node_catalog -->|"lists"| node_student_pages
node_catalog -->|"lists"| node_health_pages
node_catalog -->|"lists"| node_utilities_catalog
node_calculator_catalog -->|"lists"| node_other_calculators
node_tax -->|"uses"| node_tax_logic
node_loan -->|"uses"| node_loan_logic
node_discount -->|"uses"| node_discount_logic
node_gpa -->|"uses"| node_gpa_logic
node_grade -->|"uses"| node_grade_logic
node_pregnancy -->|"uses"| node_pregnancy_logic
node_standard_calc -->|"uses"| node_standard_logic
node_scientific_calc -->|"uses"| node_scientific_logic
node_currency -->|"uses"| node_currency_logic
node_currency_logic -.->|"fetches rates"| node_exchange_api
node_image_compressor -->|"uses"| node_image_logic
node_random_picker -->|"uses"| node_random_logic
node_countdown -->|"uses"| node_countdown_logic

click node_home "https://github.com/pinwaru/toolhub-th/blob/main/index.html"
click node_catalog "https://github.com/pinwaru/toolhub-th/blob/main/tools.html"
click node_calculator_catalog "https://github.com/pinwaru/toolhub-th/blob/main/calculators.html"
click node_finance_pages "https://github.com/pinwaru/toolhub-th/tree/main/tools"
click node_tax "https://github.com/pinwaru/toolhub-th/blob/main/tools/tax-calculator.html"
click node_tax_logic "https://github.com/pinwaru/toolhub-th/blob/main/js/tax-calculator.js"
click node_loan "https://github.com/pinwaru/toolhub-th/blob/main/tools/loan-calculator.html"
click node_loan_logic "https://github.com/pinwaru/toolhub-th/blob/main/js/loan-calculator.js"
click node_discount "https://github.com/pinwaru/toolhub-th/blob/main/tools/discount-calculator.html"
click node_discount_logic "https://github.com/pinwaru/toolhub-th/blob/main/js/discount-calculator.js"
click node_student_pages "https://github.com/pinwaru/toolhub-th/tree/main/tools"
click node_gpa "https://github.com/pinwaru/toolhub-th/blob/main/tools/gpa-calculator.html"
click node_gpa_logic "https://github.com/pinwaru/toolhub-th/blob/main/js/gpa-calculator.js"
click node_grade "https://github.com/pinwaru/toolhub-th/blob/main/tools/grade-calculator.html"
click node_grade_logic "https://github.com/pinwaru/toolhub-th/blob/main/js/grade-calculator.js"
click node_health_pages "https://github.com/pinwaru/toolhub-th/tree/main/tools"
click node_pregnancy "https://github.com/pinwaru/toolhub-th/blob/main/tools/pregnancy-calculator.html"
click node_pregnancy_logic "https://github.com/pinwaru/toolhub-th/blob/main/js/pregnancy-calculator.js"
click node_other_calculators "https://github.com/pinwaru/toolhub-th/tree/main/tools"
click node_standard_calc "https://github.com/pinwaru/toolhub-th/blob/main/tools/standard-calculator.html"
click node_standard_logic "https://github.com/pinwaru/toolhub-th/blob/main/js/standard-calculator.js"
click node_scientific_calc "https://github.com/pinwaru/toolhub-th/blob/main/tools/scientific-calculator.html"
click node_scientific_logic "https://github.com/pinwaru/toolhub-th/blob/main/js/scientific-calculator.js"
click node_currency "https://github.com/pinwaru/toolhub-th/blob/main/tools/currency-converter.html"
click node_currency_logic "https://github.com/pinwaru/toolhub-th/blob/main/js/currency-converter.js"
click node_utilities_catalog "https://github.com/pinwaru/toolhub-th/tree/main/tools"
click node_image_compressor "https://github.com/pinwaru/toolhub-th/blob/main/tools/image-compressor.html"
click node_image_logic "https://github.com/pinwaru/toolhub-th/blob/main/js/image-compressor.js"
click node_random_picker "https://github.com/pinwaru/toolhub-th/blob/main/tools/random-picker.html"
click node_random_logic "https://github.com/pinwaru/toolhub-th/blob/main/js/random-picker.js"
click node_countdown "https://github.com/pinwaru/toolhub-th/blob/main/tools/countdown-timer.html"
click node_countdown_logic "https://github.com/pinwaru/toolhub-th/blob/main/js/countdown-timer.js"

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_home,node_catalog,node_calculator_catalog toneBlue
class node_finance_pages,node_tax,node_tax_logic,node_loan,node_loan_logic,node_discount,node_discount_logic,node_student_pages,node_gpa,node_gpa_logic,node_grade,node_grade_logic,node_health_pages,node_pregnancy,node_pregnancy_logic,node_other_calculators,node_standard_calc,node_standard_logic,node_scientific_calc,node_scientific_logic,node_currency,node_currency_logic toneAmber
class node_utilities_catalog,node_image_compressor,node_image_logic,node_random_picker,node_random_logic,node_countdown,node_countdown_logic,node_exchange_api toneMint
class node_visitor toneIndigo
```

## Components

### Discovery

- [Home](https://github.com/pinwaru/toolhub-th/blob/main/index.html): `index.html`
- [Tool catalog](https://github.com/pinwaru/toolhub-th/blob/main/tools.html): `tools.html`
- [Calculator catalog](https://github.com/pinwaru/toolhub-th/blob/main/calculators.html): `calculators.html`

### Calculators

- [Finance tools](https://github.com/pinwaru/toolhub-th/tree/main/tools): `tools`
- [Tax calculator](https://github.com/pinwaru/toolhub-th/blob/main/tools/tax-calculator.html): `tools/tax-calculator.html`
- [Tax calculation](https://github.com/pinwaru/toolhub-th/blob/main/js/tax-calculator.js): `js/tax-calculator.js`
- [Loan calculator](https://github.com/pinwaru/toolhub-th/blob/main/tools/loan-calculator.html): `tools/loan-calculator.html`
- [Loan calculation](https://github.com/pinwaru/toolhub-th/blob/main/js/loan-calculator.js): `js/loan-calculator.js`
- [Discount calculator](https://github.com/pinwaru/toolhub-th/blob/main/tools/discount-calculator.html): `tools/discount-calculator.html`
- [Discount calculation](https://github.com/pinwaru/toolhub-th/blob/main/js/discount-calculator.js): `js/discount-calculator.js`
- [Student tools](https://github.com/pinwaru/toolhub-th/tree/main/tools): `tools`
- [GPA calculator](https://github.com/pinwaru/toolhub-th/blob/main/tools/gpa-calculator.html): `tools/gpa-calculator.html`
- [GPA calculation](https://github.com/pinwaru/toolhub-th/blob/main/js/gpa-calculator.js): `js/gpa-calculator.js`
- [Grade calculator](https://github.com/pinwaru/toolhub-th/blob/main/tools/grade-calculator.html): `tools/grade-calculator.html`
- [Grade calculation](https://github.com/pinwaru/toolhub-th/blob/main/js/grade-calculator.js): `js/grade-calculator.js`
- [Health and date tools](https://github.com/pinwaru/toolhub-th/tree/main/tools): `tools`
- [Pregnancy calculator](https://github.com/pinwaru/toolhub-th/blob/main/tools/pregnancy-calculator.html): `tools/pregnancy-calculator.html`
- [Pregnancy calculation](https://github.com/pinwaru/toolhub-th/blob/main/js/pregnancy-calculator.js): `js/pregnancy-calculator.js`
- [Other calculators](https://github.com/pinwaru/toolhub-th/tree/main/tools): `tools`
- [Standard calculator](https://github.com/pinwaru/toolhub-th/blob/main/tools/standard-calculator.html): `tools/standard-calculator.html`
- [Standard calculation](https://github.com/pinwaru/toolhub-th/blob/main/js/standard-calculator.js): `js/standard-calculator.js`
- [Scientific calculator](https://github.com/pinwaru/toolhub-th/blob/main/tools/scientific-calculator.html): `tools/scientific-calculator.html`
- [Scientific calculation](https://github.com/pinwaru/toolhub-th/blob/main/js/scientific-calculator.js): `js/scientific-calculator.js`
- [Currency converter](https://github.com/pinwaru/toolhub-th/blob/main/tools/currency-converter.html): `tools/currency-converter.html`
- [Exchange rates and conversion](https://github.com/pinwaru/toolhub-th/blob/main/js/currency-converter.js): `js/currency-converter.js`

### Utilities

- [Other utilities](https://github.com/pinwaru/toolhub-th/tree/main/tools): `tools`
- [Image compressor](https://github.com/pinwaru/toolhub-th/blob/main/tools/image-compressor.html): `tools/image-compressor.html`
- [Image processing](https://github.com/pinwaru/toolhub-th/blob/main/js/image-compressor.js): `js/image-compressor.js`
- [Random picker](https://github.com/pinwaru/toolhub-th/blob/main/tools/random-picker.html): `tools/random-picker.html`
- [Wheel and winner](https://github.com/pinwaru/toolhub-th/blob/main/js/random-picker.js): `js/random-picker.js`
- [Countdown and stopwatch](https://github.com/pinwaru/toolhub-th/blob/main/tools/countdown-timer.html): `tools/countdown-timer.html`
- [Timer behavior](https://github.com/pinwaru/toolhub-th/blob/main/js/countdown-timer.js): `js/countdown-timer.js`

### Other components

- **Visitor**
- **Exchange-rate API**

## Connections

- Visitor → Home: opens
- Visitor → Tool catalog: browses
- Visitor → Calculator catalog: browses
- Tool catalog → Finance tools: lists
- Tool catalog → Student tools: lists
- Tool catalog → Health and date tools: lists
- Tool catalog → Other utilities: lists
- Calculator catalog → Other calculators: lists
- Tax calculator → Tax calculation: uses
- Loan calculator → Loan calculation: uses
- Discount calculator → Discount calculation: uses
- GPA calculator → GPA calculation: uses
- Grade calculator → Grade calculation: uses
- Pregnancy calculator → Pregnancy calculation: uses
- Standard calculator → Standard calculation: uses
- Scientific calculator → Scientific calculation: uses
- Currency converter → Exchange rates and conversion: uses
- Exchange rates and conversion → Exchange-rate API: fetches rates
- Image compressor → Image processing: uses
- Random picker → Wheel and winner: uses
- Countdown and stopwatch → Timer behavior: uses
