|
1 | | -# SentraCore Dashboard (Flutter / Windows) |
| 1 | +# SentraCore Dashboard (Flutter Desktop) |
2 | 2 |
|
3 | | -The SentraCore dashboard is a Flutter Windows desktop UI that connects to the local Python engine and renders real-time system intelligence: |
| 3 | +The **SentraCore Dashboard** is the desktop visualization and interaction layer of the SentraCore platform. |
4 | 4 |
|
5 | | -- Live system state stream (WebSocket) |
6 | | -- Status/health/process/event queries (REST) |
7 | | -- Stability Index, stress, predictions, and root cause panels |
| 5 | +Built with **Flutter for Windows**, the dashboard connects to the local intelligence engine to deliver **real-time telemetry visibility**, **system health analytics**, and **explainable operational insights** through an interactive desktop experience. |
| 6 | + |
| 7 | +The dashboard is designed to provide a low-latency interface for observing system behavior while exposing actionable intelligence generated by the backend engine. |
| 8 | + |
| 9 | +--- |
| 10 | + |
| 11 | +## Overview |
| 12 | + |
| 13 | +The dashboard communicates with the local SentraCore engine through a combination of: |
| 14 | + |
| 15 | +- **REST APIs** for state retrieval and command operations |
| 16 | +- **WebSocket streams** for real-time updates and event delivery |
| 17 | + |
| 18 | +This architecture separates intelligence processing from presentation while maintaining responsive desktop performance. |
| 19 | + |
| 20 | +--- |
| 21 | + |
| 22 | +## Core Capabilities |
| 23 | + |
| 24 | +### Real-Time Monitoring |
| 25 | +- Live system telemetry streaming |
| 26 | +- Dynamic health and status updates |
| 27 | +- Continuous event visualization |
| 28 | + |
| 29 | +### Intelligence Visualization |
| 30 | +- Stability Index monitoring |
| 31 | +- System stress analysis |
| 32 | +- Predictive risk indicators |
| 33 | +- Root cause investigation panels |
| 34 | + |
| 35 | +### Operational Insight |
| 36 | +- Process and event inspection |
| 37 | +- Historical system context |
| 38 | +- Diagnostic views |
| 39 | +- Explainable intelligence outputs |
| 40 | + |
| 41 | +--- |
8 | 42 |
|
9 | 43 | ## Connectivity |
10 | 44 |
|
11 | | -By default the engine runs on: |
| 45 | +By default, the dashboard connects to a locally running SentraCore engine. |
| 46 | + |
| 47 | +### REST API |
| 48 | + |
| 49 | +```text |
| 50 | +http://127.0.0.1:8740/api/v1/ |
| 51 | +``` |
| 52 | + |
| 53 | +Used for: |
| 54 | + |
| 55 | +- System status |
| 56 | +- Health queries |
| 57 | +- Process inspection |
| 58 | +- Historical retrieval |
| 59 | +- Control actions |
| 60 | + |
| 61 | +--- |
| 62 | + |
| 63 | +### WebSocket |
| 64 | + |
| 65 | +```text |
| 66 | +ws://127.0.0.1:8740/ws/live |
| 67 | +``` |
12 | 68 |
|
13 | | -- REST: `http://127.0.0.1:8740/api/v1/` |
14 | | -- WebSocket: `ws://127.0.0.1:8740/ws/live` |
| 69 | +Used for: |
15 | 70 |
|
16 | | -If you change the engine port, update `EngineService` in `lib/services/engine_service.dart` (or make it configurable via settings). |
| 71 | +- Live telemetry streaming |
| 72 | +- Event propagation |
| 73 | +- Dashboard updates |
| 74 | +- Realtime intelligence output |
17 | 75 |
|
18 | | -## Running locally |
| 76 | +--- |
19 | 77 |
|
20 | | -From the repository root, start the engine: |
| 78 | +## Configuration |
| 79 | + |
| 80 | +If the engine host or port changes, update the dashboard connection settings. |
| 81 | + |
| 82 | +Current location: |
| 83 | + |
| 84 | +```text |
| 85 | +dashboard/lib/services/engine_service.dart |
| 86 | +``` |
| 87 | + |
| 88 | +Recommended future enhancement: |
| 89 | + |
| 90 | +```text |
| 91 | +Settings → Engine Endpoint Configuration |
| 92 | +``` |
| 93 | + |
| 94 | +This would allow runtime endpoint configuration without rebuilding the application. |
| 95 | + |
| 96 | +--- |
| 97 | + |
| 98 | +## Local Development |
| 99 | + |
| 100 | +### 1. Start SentraCore Engine |
| 101 | + |
| 102 | +From the repository root: |
21 | 103 |
|
22 | 104 | ```powershell |
23 | 105 | .venv\Scripts\python -m engine.main |
24 | 106 | ``` |
25 | 107 |
|
26 | | -Then in a second terminal: |
| 108 | +Expected startup: |
| 109 | + |
| 110 | +```text |
| 111 | +Engine available at: |
| 112 | +http://127.0.0.1:8740 |
| 113 | +``` |
| 114 | + |
| 115 | +--- |
| 116 | + |
| 117 | +### 2. Start Dashboard |
| 118 | + |
| 119 | +Open a second terminal. |
27 | 120 |
|
28 | 121 | ```powershell |
29 | 122 | cd dashboard |
| 123 | +
|
30 | 124 | flutter pub get |
| 125 | +
|
31 | 126 | flutter run -d windows |
32 | 127 | ``` |
33 | 128 |
|
34 | | -## Quality checks |
| 129 | +The dashboard should automatically connect to the local engine. |
| 130 | + |
| 131 | +--- |
| 132 | + |
| 133 | +## Build Desktop Application |
| 134 | + |
| 135 | +Generate a Windows desktop build: |
| 136 | + |
| 137 | +```powershell |
| 138 | +cd dashboard |
| 139 | +
|
| 140 | +flutter build windows |
| 141 | +``` |
| 142 | + |
| 143 | +Build output: |
| 144 | + |
| 145 | +```text |
| 146 | +dashboard/build/windows/x64/runner/Release/ |
| 147 | +``` |
| 148 | + |
| 149 | +--- |
| 150 | + |
| 151 | +## Quality Validation |
| 152 | + |
| 153 | +Run quality checks before committing changes. |
| 154 | + |
| 155 | +### Static Analysis |
35 | 156 |
|
36 | 157 | ```powershell |
37 | 158 | cd dashboard |
| 159 | +
|
38 | 160 | flutter analyze |
| 161 | +``` |
| 162 | + |
| 163 | +--- |
| 164 | + |
| 165 | +### Automated Tests |
| 166 | + |
| 167 | +```powershell |
39 | 168 | flutter test |
40 | 169 | ``` |
| 170 | + |
| 171 | +--- |
| 172 | + |
| 173 | +## Development Workflow |
| 174 | + |
| 175 | +Typical iteration cycle: |
| 176 | + |
| 177 | +```text |
| 178 | +Start Engine |
| 179 | + ↓ |
| 180 | +Launch Dashboard |
| 181 | + ↓ |
| 182 | +Modify UI / Services |
| 183 | + ↓ |
| 184 | +Hot Reload |
| 185 | + ↓ |
| 186 | +Validate |
| 187 | + ↓ |
| 188 | +Commit Changes |
| 189 | +``` |
| 190 | + |
| 191 | +--- |
| 192 | + |
| 193 | +## Project Structure |
| 194 | + |
| 195 | +```text |
| 196 | +dashboard/ |
| 197 | +│ |
| 198 | +├── lib/ |
| 199 | +│ ├── screens/ |
| 200 | +│ ├── widgets/ |
| 201 | +│ ├── services/ |
| 202 | +│ ├── models/ |
| 203 | +│ └── theme/ |
| 204 | +│ |
| 205 | +├── test/ |
| 206 | +├── windows/ |
| 207 | +└── pubspec.yaml |
| 208 | +``` |
| 209 | + |
| 210 | +--- |
| 211 | + |
| 212 | +## Troubleshooting |
| 213 | + |
| 214 | +| Issue | Possible Cause | |
| 215 | +|---|---| |
| 216 | +| Dashboard cannot connect | Engine not running | |
| 217 | +| Empty realtime panels | WebSocket unavailable | |
| 218 | +| REST requests fail | Incorrect engine endpoint | |
| 219 | +| Flutter build fails | Missing Windows desktop support | |
| 220 | +| UI not updating | Hot reload required | |
| 221 | + |
| 222 | +--- |
| 223 | + |
| 224 | +## Platform Support |
| 225 | + |
| 226 | +| Platform | Status | |
| 227 | +|---|---| |
| 228 | +| Windows | Fully Supported | |
| 229 | +| Linux | Experimental | |
| 230 | +| macOS | Experimental | |
| 231 | + |
| 232 | +--- |
| 233 | + |
| 234 | +<div align="center"> |
| 235 | + |
| 236 | +### SentraCore Dashboard |
| 237 | + |
| 238 | +Observe • Understand • Act |
| 239 | + |
| 240 | +</div> |
0 commit comments