How magomedmirza/zhaamon works
ZhaaMon is a local Android/desktop MikroTik hotspot manager. Users select a router, navigate management pages, and make requests to the local server; backend capabilities manage router configuration and hotspot activity through RouterOS, while router configuration is stored locally. The graph preserves documented feature areas even where their implementations were not sampled. Relationships are limited to those visible in excerpts or explicitly documented; unsampled handler and service internals are represented without guessed call chains.
Main entry points: routes.rs HTTP routes · app.js Browser / WebView · router_repo.rs Router repository · client.rs RouterOS client
Components 29
Web client
- Browser / WebView
static/js/app.js - Routes and navigation
static/js/routes.js - UI and shared state
static/js/dom.js - HTTP API client
static/js/api.js - Router selection
static/js/routers.js - Hotspot pages
static/js/routes.js - System pages
static/js/pages/ntp-client.js - Localization
static/js/i18n/index.js - Android bridge
static/bridge.js
HTTP server
- Server entry
src/main.rs - HTTP routes
src/routes.rs - Error responses
src/error/mod.rs
Management features
- Router management
src/handlers/routers.rs - Hotspot devices
src/handlers/devices - Profiles and vouchers
src/handlers/profiles - Users and sessions
src/handlers/users - System automation
src/handlers/system - NTP management
src/handlers/ntp - Domain services
src/services
Router integration
- RouterOS client
src/mikrotik/client.rs - Protocol records
src/mikrotik/record.rs - Transport stream
src/mikrotik/stream.rs
Local storage
- Router repository
src/store/router_repo.rs - File persistence
src/store/files.rs - Atomic writes
src/store/atomic.rs - Router data model
src/store/model.rs - Input validation
src/store/validation.rs
Other components
- Device user
- MikroTik router
Connections 28
- Device user → Browser / WebView: uses
README.md - Browser / WebView → Routes and navigation: boots routes
static/js/app.js - Browser / WebView → Router selection: loads routers
static/js/app.js - Routes and navigation → Hotspot pages: registers pages
static/js/routes.js - Routes and navigation → System pages: registers pages
static/js/routes.js - Hotspot pages → HTTP API client: requests data
- System pages → HTTP API client: requests data
static/js/pages/ntp-client.js - Router selection → HTTP API client: requests routers
static/js/pages/routers.js - Browser / WebView → Localization: initializes locale
static/js/app.js - Browser / WebView → Android bridge: uses native bridge
README.md - Browser / WebView → HTTP routes: fetches local API
- Server entry → HTTP routes: serves routes
- HTTP routes → Router management: routes requests
src/routes.rs - HTTP routes → Hotspot devices: routes requests
src/routes.rs - HTTP routes → Profiles and vouchers: routes requests
src/routes.rs - HTTP routes → Users and sessions: routes requests
src/routes.rs - HTTP routes → System automation: routes requests
src/routes.rs - HTTP routes → NTP management: routes requests
src/routes.rs - Router management → Domain services: delegates operations
- Domain services → RouterOS client: uses API client
src/services/router_ops.rs - RouterOS client → Transport stream: transfers sentences
src/mikrotik/client.rs - RouterOS client → Protocol records: parses records
src/mikrotik/client.rs - RouterOS client → MikroTik router: sends commands
- Domain services → Router repository: reads router data
src/services/routers.rs - Router repository → File persistence: loads router file
src/store/router_repo.rs - Router repository → Atomic writes: persists updates
src/store/router_repo.rs - Router repository → Router data model: uses models
src/store/router_repo.rs - Router repository → Input validation: validates input
src/store/router_repo.rs