# laksa19/template-hotspot-mikhmon architecture

> Architecture diagram of the GitHub repository laksa19/template-hotspot-mikhmon, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/laksa19/template-hotspot-mikhmon
- Repository: https://github.com/laksa19/template-hotspot-mikhmon

## Overview

This repository is a collection of MikroTik hotspot captive-portal templates intended to pair with Mikhmon, not a server application. A visitor reaches a template login page, enters voucher or user credentials, and the hotspot handles authentication; pages also cover redirects, status, logout, errors, and (in hotspot3/4) expiry messaging in a modal. Templates supply editable package lists, branding, and messages. The README documents these capabilities, but most page markup was not sampled, so page-to-page runtime links are shown only as unverified dashed relationships.

Main entry points: [`hotspot3/login.html`](https://github.com/laksa19/template-hotspot-mikhmon/blob/master/hotspot3/login.html) (Hotspot 3 login), [`hotspot4/login.html`](https://github.com/laksa19/template-hotspot-mikhmon/blob/master/hotspot4/login.html) (Hotspot 4 login), [`jsalonlTemplate/login.html`](https://github.com/laksa19/template-hotspot-mikhmon/blob/master/jsalonlTemplate/login.html) (Salon template), [`hotspot2/login.html`](https://github.com/laksa19/template-hotspot-mikhmon/blob/master/hotspot2/login.html) (Hotspot 2 login)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_portal["Portal templates"]
  node_h2login["Hotspot 2 login<br/>[login.html]"]
  node_h2pages["Hotspot 2 pages"]
  node_h3login["Hotspot 3 login<br/>[login.html]"]
  node_h3pages["Hotspot 3 pages"]
  node_h4login["Hotspot 4 login<br/>[login.html]"]
  node_h4pages["Hotspot 4 pages"]
  node_h5portal["Hotspot 5 portal<br/>[login.html]"]
  node_h5legportal["Hotspot 5 legend<br/>[login.html]"]
  node_h6portal["Hotspot 6 portal<br/>[login.html]"]
  node_h7portal["Hotspot 7 portal<br/>[login.html]"]
  node_jsportal["Salon template<br/>[login.html]"]
end

subgraph group_custom["Editable content"]
  node_packages["Wi-Fi packages<br/>[paket-wifi.csv]"]
  node_business["Business settings<br/>[data.js]"]
  node_business4["Hotspot 4 settings<br/>[data.js]"]
end

subgraph group_runtime["Client runtime"]
  node_h2hash["Hotspot 2 MD5<br/>[md5.js]"]
  node_h3hash["Hotspot 3 MD5<br/>[md5.js]"]
  node_h4hash["Hotspot 4 MD5<br/>[md5.js]"]
  node_h5hash["Hotspot 5 MD5<br/>[md5.js]"]
  node_h5leghash["Legend MD5<br/>[md5.js]"]
  node_h6hash["Hotspot 6 MD5<br/>[md5.js]"]
  node_h7hash["Hotspot 7 MD5<br/>[md5.js]"]
  node_jshash["Salon MD5<br/>[md5.js]"]
  node_validation["Form validation<br/>[main.js]"]
  node_bootstrap["Bootstrap bundle"]
  node_bootstrapcore["Bootstrap core<br/>[bootstrap.js]"]
end

subgraph group_integrations["Hotspot integration"]
  node_hotspot["MikroTik hotspot"]
  node_mikhmon["Mikhmon"]
end

node_visitor(("Visitor"))

node_visitor -.->|"opens portal"| node_h2login
node_visitor -.->|"opens portal"| node_h3login
node_visitor -.->|"opens portal"| node_h4login
node_visitor -.->|"opens portal"| node_h5portal
node_visitor -.->|"opens portal"| node_h5legportal
node_visitor -.->|"opens portal"| node_h6portal
node_visitor -.->|"opens portal"| node_h7portal
node_visitor -.->|"opens portal"| node_jsportal
node_h2login -.->|"submits credentials"| node_hotspot
node_h3login -.->|"submits credentials"| node_hotspot
node_h4login -.->|"submits credentials"| node_hotspot
node_h5portal -.->|"submits credentials"| node_hotspot
node_h5legportal -.->|"submits credentials"| node_hotspot
node_h6portal -.->|"submits credentials"| node_hotspot
node_h7portal -.->|"submits credentials"| node_hotspot
node_jsportal -.->|"submits credentials"| node_hotspot
node_mikhmon -.->|"manages users"| node_hotspot
node_h2login -.->|"lists packages"| node_packages
node_h3login -.->|"lists packages"| node_packages
node_h4login -.->|"lists packages"| node_packages
node_h3login -.->|"uses settings"| node_business
node_h4login -.->|"uses settings"| node_business4
node_h3login -.->|"shows expiry modal"| node_h3pages
node_h4login -.->|"shows expiry modal"| node_h4pages
node_h2login -.->|"serves portal pages"| node_h2pages
node_h3login -.->|"serves portal pages"| node_h3pages
node_h4login -.->|"serves portal pages"| node_h4pages
node_h2login -.->|"uses digest"| node_h2hash
node_h3login -.->|"uses digest"| node_h3hash
node_h4login -.->|"uses digest"| node_h4hash
node_h5portal -.->|"uses digest"| node_h5hash
node_h5legportal -.->|"uses digest"| node_h5leghash
node_h6portal -.->|"uses digest"| node_h6hash
node_h7portal -.->|"uses digest"| node_h7hash
node_jsportal -.->|"uses digest"| node_jshash
node_jsportal -.->|"validates form"| node_validation
node_jsportal -.->|"uses UI library"| node_bootstrap
node_jsportal -.->|"uses UI library"| node_bootstrapcore

click node_h2login "https://github.com/laksa19/template-hotspot-mikhmon/blob/master/hotspot2/login.html"
click node_h2pages "https://github.com/laksa19/template-hotspot-mikhmon/tree/master/hotspot2"
click node_h3login "https://github.com/laksa19/template-hotspot-mikhmon/blob/master/hotspot3/login.html"
click node_h3pages "https://github.com/laksa19/template-hotspot-mikhmon/tree/master/hotspot3"
click node_h4login "https://github.com/laksa19/template-hotspot-mikhmon/blob/master/hotspot4/login.html"
click node_h4pages "https://github.com/laksa19/template-hotspot-mikhmon/tree/master/hotspot4"
click node_h5portal "https://github.com/laksa19/template-hotspot-mikhmon/blob/master/hotspot5/login.html"
click node_h5legportal "https://github.com/laksa19/template-hotspot-mikhmon/blob/master/hotspot5legend/login.html"
click node_h6portal "https://github.com/laksa19/template-hotspot-mikhmon/blob/master/hotspot6/login.html"
click node_h7portal "https://github.com/laksa19/template-hotspot-mikhmon/blob/master/hotspot7/login.html"
click node_jsportal "https://github.com/laksa19/template-hotspot-mikhmon/blob/master/jsalonlTemplate/login.html"
click node_packages "https://github.com/laksa19/template-hotspot-mikhmon/blob/master/hotspot2/paket-wifi.csv"
click node_business "https://github.com/laksa19/template-hotspot-mikhmon/blob/master/hotspot3/data.js"
click node_business4 "https://github.com/laksa19/template-hotspot-mikhmon/blob/master/hotspot4/data.js"
click node_h2hash "https://github.com/laksa19/template-hotspot-mikhmon/blob/master/hotspot2/md5.js"
click node_h3hash "https://github.com/laksa19/template-hotspot-mikhmon/blob/master/hotspot3/md5.js"
click node_h4hash "https://github.com/laksa19/template-hotspot-mikhmon/blob/master/hotspot4/md5.js"
click node_h5hash "https://github.com/laksa19/template-hotspot-mikhmon/blob/master/hotspot5/md5.js"
click node_h5leghash "https://github.com/laksa19/template-hotspot-mikhmon/blob/master/hotspot5legend/md5.js"
click node_h6hash "https://github.com/laksa19/template-hotspot-mikhmon/blob/master/hotspot6/md5.js"
click node_h7hash "https://github.com/laksa19/template-hotspot-mikhmon/blob/master/hotspot7/md5.js"
click node_jshash "https://github.com/laksa19/template-hotspot-mikhmon/blob/master/jsalonlTemplate/md5.js"
click node_validation "https://github.com/laksa19/template-hotspot-mikhmon/blob/master/jsalonlTemplate/js/main.js"
click node_bootstrap "https://github.com/laksa19/template-hotspot-mikhmon/blob/master/jsalonlTemplate/js/bootstrap.bundle.js"
click node_bootstrapcore "https://github.com/laksa19/template-hotspot-mikhmon/blob/master/jsalonlTemplate/js/bootstrap.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_h2login,node_h2pages,node_h3login,node_h3pages,node_h4login,node_h4pages,node_h5portal,node_h5legportal,node_h6portal,node_h7portal,node_jsportal toneBlue
class node_packages,node_business,node_business4 toneAmber
class node_h2hash,node_h3hash,node_h4hash,node_h5hash,node_h5leghash,node_h6hash,node_h7hash,node_jshash,node_validation,node_bootstrap,node_bootstrapcore toneMint
class node_hotspot,node_mikhmon toneRose
class node_visitor toneIndigo
```

## Components

### Portal templates

- [Hotspot 2 login](https://github.com/laksa19/template-hotspot-mikhmon/blob/master/hotspot2/login.html): `hotspot2/login.html`
- [Hotspot 2 pages](https://github.com/laksa19/template-hotspot-mikhmon/tree/master/hotspot2): `hotspot2`
- [Hotspot 3 login](https://github.com/laksa19/template-hotspot-mikhmon/blob/master/hotspot3/login.html): `hotspot3/login.html`
- [Hotspot 3 pages](https://github.com/laksa19/template-hotspot-mikhmon/tree/master/hotspot3): `hotspot3`
- [Hotspot 4 login](https://github.com/laksa19/template-hotspot-mikhmon/blob/master/hotspot4/login.html): `hotspot4/login.html`
- [Hotspot 4 pages](https://github.com/laksa19/template-hotspot-mikhmon/tree/master/hotspot4): `hotspot4`
- [Hotspot 5 portal](https://github.com/laksa19/template-hotspot-mikhmon/blob/master/hotspot5/login.html): `hotspot5/login.html`
- [Hotspot 5 legend](https://github.com/laksa19/template-hotspot-mikhmon/blob/master/hotspot5legend/login.html): `hotspot5legend/login.html`
- [Hotspot 6 portal](https://github.com/laksa19/template-hotspot-mikhmon/blob/master/hotspot6/login.html): `hotspot6/login.html`
- [Hotspot 7 portal](https://github.com/laksa19/template-hotspot-mikhmon/blob/master/hotspot7/login.html): `hotspot7/login.html`
- [Salon template](https://github.com/laksa19/template-hotspot-mikhmon/blob/master/jsalonlTemplate/login.html): `jsalonlTemplate/login.html`

### Editable content

- [Wi-Fi packages](https://github.com/laksa19/template-hotspot-mikhmon/blob/master/hotspot2/paket-wifi.csv): `hotspot2/paket-wifi.csv`
- [Business settings](https://github.com/laksa19/template-hotspot-mikhmon/blob/master/hotspot3/data.js): `hotspot3/data.js`
- [Hotspot 4 settings](https://github.com/laksa19/template-hotspot-mikhmon/blob/master/hotspot4/data.js): `hotspot4/data.js`

### Client runtime

- [Hotspot 2 MD5](https://github.com/laksa19/template-hotspot-mikhmon/blob/master/hotspot2/md5.js): `hotspot2/md5.js`
- [Hotspot 3 MD5](https://github.com/laksa19/template-hotspot-mikhmon/blob/master/hotspot3/md5.js): `hotspot3/md5.js`
- [Hotspot 4 MD5](https://github.com/laksa19/template-hotspot-mikhmon/blob/master/hotspot4/md5.js): `hotspot4/md5.js`
- [Hotspot 5 MD5](https://github.com/laksa19/template-hotspot-mikhmon/blob/master/hotspot5/md5.js): `hotspot5/md5.js`
- [Legend MD5](https://github.com/laksa19/template-hotspot-mikhmon/blob/master/hotspot5legend/md5.js): `hotspot5legend/md5.js`
- [Hotspot 6 MD5](https://github.com/laksa19/template-hotspot-mikhmon/blob/master/hotspot6/md5.js): `hotspot6/md5.js`
- [Hotspot 7 MD5](https://github.com/laksa19/template-hotspot-mikhmon/blob/master/hotspot7/md5.js): `hotspot7/md5.js`
- [Salon MD5](https://github.com/laksa19/template-hotspot-mikhmon/blob/master/jsalonlTemplate/md5.js): `jsalonlTemplate/md5.js`
- [Form validation](https://github.com/laksa19/template-hotspot-mikhmon/blob/master/jsalonlTemplate/js/main.js): `jsalonlTemplate/js/main.js`
- [Bootstrap bundle](https://github.com/laksa19/template-hotspot-mikhmon/blob/master/jsalonlTemplate/js/bootstrap.bundle.js): `jsalonlTemplate/js/bootstrap.bundle.js`
- [Bootstrap core](https://github.com/laksa19/template-hotspot-mikhmon/blob/master/jsalonlTemplate/js/bootstrap.js): `jsalonlTemplate/js/bootstrap.js`

### Hotspot integration

- **MikroTik hotspot**
- **Mikhmon**

### Other components

- **Visitor**

## Connections

- Visitor → Hotspot 2 login: opens portal
- Visitor → Hotspot 3 login: opens portal
- Visitor → Hotspot 4 login: opens portal
- Visitor → Hotspot 5 portal: opens portal
- Visitor → Hotspot 5 legend: opens portal
- Visitor → Hotspot 6 portal: opens portal
- Visitor → Hotspot 7 portal: opens portal
- Visitor → Salon template: opens portal
- Hotspot 2 login → MikroTik hotspot: submits credentials
- Hotspot 3 login → MikroTik hotspot: submits credentials
- Hotspot 4 login → MikroTik hotspot: submits credentials
- Hotspot 5 portal → MikroTik hotspot: submits credentials
- Hotspot 5 legend → MikroTik hotspot: submits credentials
- Hotspot 6 portal → MikroTik hotspot: submits credentials
- Hotspot 7 portal → MikroTik hotspot: submits credentials
- Salon template → MikroTik hotspot: submits credentials
- Mikhmon → MikroTik hotspot: manages users (evidence: `README.md`)
- Hotspot 2 login → Wi-Fi packages: lists packages (evidence: `README.md`)
- Hotspot 3 login → Wi-Fi packages: lists packages (evidence: `README.md`)
- Hotspot 4 login → Wi-Fi packages: lists packages (evidence: `README.md`)
- Hotspot 3 login → Business settings: uses settings (evidence: `README.md`)
- Hotspot 4 login → Hotspot 4 settings: uses settings (evidence: `README.md`)
- Hotspot 3 login → Hotspot 3 pages: shows expiry modal (evidence: `README.md`)
- Hotspot 4 login → Hotspot 4 pages: shows expiry modal (evidence: `README.md`)
- Hotspot 2 login → Hotspot 2 pages: serves portal pages
- Hotspot 3 login → Hotspot 3 pages: serves portal pages
- Hotspot 4 login → Hotspot 4 pages: serves portal pages
- Hotspot 2 login → Hotspot 2 MD5: uses digest
- Hotspot 3 login → Hotspot 3 MD5: uses digest
- Hotspot 4 login → Hotspot 4 MD5: uses digest
- Hotspot 5 portal → Hotspot 5 MD5: uses digest
- Hotspot 5 legend → Legend MD5: uses digest
- Hotspot 6 portal → Hotspot 6 MD5: uses digest
- Hotspot 7 portal → Hotspot 7 MD5: uses digest
- Salon template → Salon MD5: uses digest
- Salon template → Form validation: validates form
- Salon template → Bootstrap bundle: uses UI library
- Salon template → Bootstrap core: uses UI library
