How mdmesh-app/mdmesh works
MDMesh is a self-hosted Android MDM: administrators enroll and manage a device fleet through a React console and Java control plane, while a Kotlin Device-Owner agent checks in, reports state, and applies commands and desired configuration. The graph emphasizes enrollment, fleet management, app delivery, kiosk/policy control, telemetry/location, and connectivity. Several server and console capabilities are documented but their full implementations were not sampled; those links are identified as README-supported rather than inferred from source.
Main entry points: resource REST control plane · App.tsx Console routes · CheckInCoordinator.kt Check-in coordination · CommandDispatcher.kt Command dispatch
Components 22
Admin console
- Console routes
web/src/App.tsx - Fleet views
web/src/pages/DevicesPage.tsx - Device detail
web/src/pages/DeviceDetailPage.tsx - Apps and configs
web/src/pages/AppsPage.tsx - Enrollment view
web/src/pages/EnrollPage.tsx
Control plane
- REST control plane
server/src/main/java/com/hmdm/rest/resource - Device persistence
common/src/main/java/com/hmdm/persistence/DeviceDAO.java - Configuration status
common/src/main/java/com/hmdm/service/DeviceStatusService.java - Event dispatch
common/src/main/java/com/hmdm/event/EventService.java
Device agent
- Device enrollment
agent-android/core/src/main/kotlin/com/mdmesh/core/sync/EnrollmentManager.kt - Check-in runtime
agent-android/app/src/main/kotlin/com/mdmesh/agent/service/CheckInService.kt - Check-in coordination
agent-android/core/src/main/kotlin/com/mdmesh/core/sync/CheckInCoordinator.kt - Device telemetry
agent-android/core/src/main/kotlin/com/mdmesh/core/telemetry/TelemetryAssembler.kt - Command dispatch
agent-android/core/src/main/kotlin/com/mdmesh/core/command/CommandDispatcher.kt
Device management
- App installation
agent-android/core/src/main/kotlin/com/mdmesh/core/install/InstallManager.kt - Device policies
agent-android/policy/src/main/kotlin/com/mdmesh/policy/PolicyManager.kt - Kiosk mode
agent-android/core/src/main/kotlin/com/mdmesh/core/kiosk/KioskApplier.kt - Location tracking
agent-android/core/src/main/kotlin/com/mdmesh/core/location/LocationCollector.kt
Connectivity and updates
- Wake transport
agent-android/core/src/main/kotlin/com/mdmesh/core/transport/TransportManager.kt - Device identity
agent-android/core/src/main/kotlin/com/mdmesh/core/store/DeviceIdentity.kt
Other components
- Administrator
- MDM server
Connections 25
- Administrator → Console routes: manages fleet
README.md - Console routes → Fleet views: routes to
web/src/App.tsx - Console routes → Device detail: routes to
web/src/App.tsx - Console routes → Apps and configs: routes to
web/src/App.tsx - Console routes → Enrollment view: routes to
web/src/App.tsx - Fleet views → REST control plane: requests fleet data
- Device detail → REST control plane: requests device data
- Apps and configs → REST control plane: manages apps and configs
README.md - Enrollment view → REST control plane: requests enrollment QR
README.md - REST control plane → Device persistence: reads and writes
- REST control plane → Configuration status: reports config status
- Device enrollment → REST control plane: posts enrollment
agent-android/core/src/main/kotlin/com/mdmesh/core/sync/EnrollmentManager.kt - Device enrollment → Device identity: saves credentials
agent-android/core/src/main/kotlin/com/mdmesh/core/sync/EnrollmentManager.kt - Check-in runtime → Check-in coordination: runs check-in
agent-android/app/src/main/kotlin/com/mdmesh/agent/service/CheckInService.kt - Check-in runtime → Wake transport: starts wake transport
agent-android/app/src/main/kotlin/com/mdmesh/agent/service/CheckInService.kt - Check-in coordination → MDM server: checks in
README.md - Check-in coordination → Device telemetry: collects device state
- Check-in coordination → Command dispatch: handles commands
README.md - Command dispatch → App installation: installs apps
README.md - Command dispatch → Device policies: applies policies
README.md - Command dispatch → Kiosk mode: applies kiosk state
README.md - Check-in coordination → Location tracking: reports location
README.md - Wake transport → MDM server: signals wake
README.md - REST control plane → Event dispatch: publishes events
- MDM server → Check-in runtime: delivers desired state
README.md