Sentinel App β Android Client¶
Version: 2026.06.022
Platform: Android 8.0+ (API 26+)
Framework: Flutter 3.22+ / Dart
Native Android application for infrastructure management. Provides full real-time monitoring, AI Autofix, and P2P admin communication from a mobile phone.
Architecture¶
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Android Device β
β β
β Flutter UI Layer (Material 3) β
β Β· Reactive dashboard Β· Biometric Vault β
β Β· Incident Matrix Β· AI Chat Console β
β β β
β β Provider State β
β βββββββββββΌβββββββββββββββββββββββββββββββββββ β
β β Android Foreground Service (Dart Isolate) β β
β β WakeLock Β· WiFi Lock Β· Socket.IO heartbeatβ β
β βββββββββββββββββββββββββββββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββ΄ββββββββ
βΌ βΌ
REST API WebSocket
(HTTP JSON) (Socket.IO)
GET/DELETE live stream
incidents P2P chat
Dual-Channel Communication¶
Every HTTP request and WebSocket handshake passes:
X-API-Keyβ unique cryptographic admin tokenX-Device-IDβ hardware-derived UUID (prevents echo-loop on multi-device)X-Client-Userβ verified user identity (e.g.FoxiK)
Foreground Service β 24/7¶
Android's power management would kill background processes. Sentinel App bypasses this with a persistent Android Foreground Service.
App start / biometric unlock
ββββΊ Spawn Dart Isolate
βββ WakeLock ββββ CPU & modem stay awake
βββ WiFi Lock βββ Wi-Fi modem stays active
βββ Socket.IO heartbeat (60 s)
βββ Network switch (Wi-Fi β LTE) β auto-reconnect
βββ Critical packet β flutter_local_notifications
(native push, no Google FCM)
Incident Matrix¶
4 domains displayed as colour-coded badges:
| Domain | Description | Colour |
|---|---|---|
| ποΈ LOG ISSUES | Faults from journalctl and edge system logs | Red/Orange |
| π‘ AGENTS STATUS | Agent outages or telemetry dropouts | Orange/Yellow |
| π ROOT SESSIONS | Active unmapped root terminal sessions | Red |
| π‘οΈ SECURITY LOGS | Fail2ban, port scans, CVE updates | Red |
Incident actions¶
| Action | Description |
|---|---|
| πͺ AI Autofix | Sends incident to LLM, displays remediation script with Execute/Decline |
| π Ignore | Suppresses incident on server and in the app |
| π Delete | Hard delete from the database |
| π Share | Copies hostname, timestamp, log origin and error text to clipboard |
Biometric Authentication¶
App start
β
βΌ
Biometric challenge (fingerprint / face)
β
βββ SUCCESS β Unlock UI + start foreground service
β
βββ FAIL / swipe from task switcher
β Immediate session key wipe from RAM
β Next open requires fresh biometric
Visual Offline Mode¶
When provider.isOnline drops to false:
- Entire dashboard widget tree gets a greyscale colour matrix filter
- Red overlay banner appears:
SPOJENΓ ZTRACENO - OFFLINE - Data polling freezes until reconnected
Since v2026.06.022 the offline state is only entered after two consecutive failures (30 s request timeouts), with a single guarded _refreshAll() β no auto-logout and no false OFFLINE flicker on transient blips.
Connection Stability (v2026.06.022)¶
The client version is synced with the Sentinel server (2026.06.022). Connection and auth were hardened:
- API-key auto-provisioning β after LLDAP login the app provisions an API key and switches to the fast
X-API-Keypath, avoiding a per-request LDAP bind - Stale-key self-healing β a
302 β /loginredirect is detected as an auth failure (no false success), and the key is re-provisioned - Reused provider/socket β settings changes reuse the existing provider and Socket.IO connection instead of recreating them
- Lazy tab loading β tabs load on demand, removing the startup request storm
- Full API audit β all 138 endpoints verified against the running server; corrected dashboard
top_plugins/recent_issues, metric history via/api/predictions, plugin stats, and fixed POST payloads (comment templates, patterns)
P2P Admin Chat¶
Volatile admin-to-admin messaging with zero database retention.
- Messages route through Socket.IO room
sentinel_adminsβ server is a zero-state relay - Device badge distinguishes mobile vs. web UI clients
X-Device-IDprevents self-messaging when same admin uses both phone and browser
Technology Stack¶
| Layer | Technology |
|---|---|
| Framework / Language | Flutter 3.22+ / Dart |
| State Management | Provider + ChangeNotifierProvider |
| Persistence | shared_preferences β Android Jetpack Security Crypto |
| Biometrics | local_auth (Fingerprint / Face Unlock) |
| Notifications | flutter_local_notifications (no FCM) |
| Background | flutter_background_service (Dart Isolate) |
| REST | http package (10 s timeout) |
| WebSocket | socket_io_client (polling β WebSocket upgrade) |
| Build | Native ARM binary (no WebView) |
Build & Deploy¶
flutter pub get
flutter pub run flutter_launcher_icons
flutter build apk --release --no-tree-shake-icons
Output: build/app/outputs/flutter-apk/app-release.apk
Required AndroidManifest.xml permissions¶
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.USE_BIOMETRIC" />