-
Notifications
You must be signed in to change notification settings - Fork 0
Development Setup
Asiedu Minta Kwaku edited this page May 3, 2026
·
1 revision
This guide covers how to get the SentraCore development environment running on your local machine for both the Python Engine and the Flutter Dashboard.
- Python 3.11 or higher
- Git
- Windows OS (some
psutiltelemetry counters are Windows-specific)
- Flutter SDK (stable channel, 3.x or higher)
- Visual Studio 2022 Community or higher
- Required Workload: Desktop development with C++
- Required Components: MSVC v142 build tools, C++ CMake tools for Windows, Windows 10/11 SDK
- Windows Developer Mode enabled
SentraCore/
├── engine/ # Python monitoring engine
│ ├── alerts/ # Alert Manager and RCA integration
│ ├── api/ # FastAPI REST and WebSocket server
│ ├── baseline/ # Adaptive baseline model
│ ├── buffer/ # Time-series ring buffers
│ ├── collector/ # psutil system telemetry collector
│ ├── events/ # System event logger
│ ├── intelligence/ # Trend, Anomaly, Prediction, Stability engines
│ ├── normalization/ # EMA-based metric normalizer
│ ├── process/ # Process impact tracker
│ └── stress/ # Multi-state stress engine
├── dashboard/ # Flutter Windows desktop UI
│ └── lib/
│ ├── models/ # Dart data models mirroring the Python API
│ ├── providers/ # State management (ChangeNotifier)
│ ├── screens/ # Top-level screens
│ ├── services/ # WebSocket and REST service layer
│ ├── theme/ # Design tokens and theme configuration
│ └── widgets/ # Reusable UI components
├── tests/ # Python unit tests
├── docs/ # Project documentation
├── scripts/ # Build automation scripts
└── installer/ # Inno Setup installer configuration
python -m venv .venv
.venv\Scripts\Activatepip install -r requirements.txtThe engine must be started as a module from the repository root so that all internal imports resolve correctly:
.venv\Scripts\python -m engine.mainThe engine will start and expose:
-
REST API:
http://localhost:8000/api/v1/ -
WebSocket (live state):
ws://localhost:8000/ws/live
.venv\Scripts\python -m pytest tests/ -vSentraCore uses ruff for static analysis. Run it before submitting any pull request:
.venv\Scripts\ruff check engine/ tests/ --select=E9,F63,F7,F82Flutter requires Windows Developer Mode to create necessary symlinks during the build.
- Open Windows Settings.
- Search for Developer Mode.
- Toggle it to On.
cd dashboard
flutter pub getEnsure the Python Engine is running first, then:
flutter run -d windowsflutter analyze
flutter test- Always start the Python Engine before launching the Flutter Dashboard. The dashboard will display a connection banner and retry automatically, but it needs the engine to be running to show live data.
- The engine's collection interval is configurable in
engine/config.pyviaCOLLECTION_INTERVAL_SEC. - Alert thresholds (
ALERT_STRESS_THRESHOLD,ALERT_CONSECUTIVE_COUNT,ALERT_COOLDOWN_SEC) are also inengine/config.py.