Skip to content

Commit a75a59d

Browse files
docs: add setup guides for engine, dashboard and update project documentation
1 parent f63e2f5 commit a75a59d

4 files changed

Lines changed: 265 additions & 224 deletions

File tree

README.md

Lines changed: 78 additions & 170 deletions
Original file line numberDiff line numberDiff line change
@@ -1,220 +1,128 @@
11
# SentraCore
22

3-
SentraCore is a local system behavior intelligence layer that continuously analyzes time-based system telemetry to understand performance behavior, estimate degradation risk, and provide explainable root-cause insights with safe optimization recommendations.
3+
SentraCore is a **Local System Behavior Intelligence Platform** for Windows. It continuously analyzes system telemetry to understand performance behavior, detect statistical anomalies, explain the root cause of slowdowns, and forecast resource exhaustion before it occurs.
44

5-
It is designed to go beyond traditional monitoring tools by interpreting system behavior over time rather than simply displaying real-time system metrics.
5+
Unlike traditional monitoring tools that display raw snapshots, SentraCore interprets system behavior over time — answering not just *what* is happening, but *why* it is happening and *when* it will become critical.
66

77
---
88

9-
## Overview
10-
11-
Most system tools focus on snapshots of current resource usage. SentraCore focuses on behavior over time.
12-
13-
It answers three key questions:
14-
15-
- What is happening in the system?
16-
- Why is it happening?
17-
- What is likely to happen next in terms of performance impact?
18-
19-
SentraCore does not replace tools like Task Manager. Instead, it enhances understanding by providing behavioral intelligence and explanation layers on top of raw system data.
20-
21-
---
22-
23-
## Core Capabilities
24-
25-
### System Telemetry Collection
26-
Collects real-time system data including:
27-
- CPU usage trends
28-
- Memory usage and paging behavior
29-
- Disk activity and latency signals
30-
- Process-level resource usage
31-
- System events and state changes
32-
33-
---
34-
35-
### Behavioral Modeling
36-
Builds a baseline model of normal system behavior per machine using:
37-
- Moving averages
38-
- Trend analysis
39-
- Statistical deviation tracking
40-
- Time-windowed behavior patterns
41-
42-
---
43-
44-
### Anomaly Detection (Probabilistic)
45-
Detects deviations from normal system behavior using a risk-based model rather than deterministic rules.
46-
47-
Outputs a system degradation risk score based on:
48-
- Sustained resource pressure
49-
- Behavioral deviation from baseline
50-
- Rate of change in system metrics
51-
- Multi-resource saturation patterns
52-
53-
---
54-
55-
### Correlation and Root Cause Analysis
56-
Identifies likely contributors to system performance degradation by analyzing:
57-
- Temporal relationships between system events and performance changes
58-
- Resource contention across CPU, memory, and disk
59-
- Process behavior patterns over time
60-
61-
Outputs explainable insights rather than raw process rankings.
62-
63-
---
9+
## Current Status
6410

65-
### Responsiveness Modeling
66-
Estimates user-perceived system performance impact by analyzing:
67-
- Disk latency patterns
68-
- CPU scheduling pressure
69-
- Memory paging frequency
70-
- Context switching behavior
11+
**All six phases are complete and production-ready.**
7112

72-
This translates system-level metrics into real-world usability impact such as lag or slow response.
13+
| Phase | Name | Status |
14+
|---|---|---|
15+
| Phase 1 | Core Telemetry Engine | Complete |
16+
| Phase 2 | Behavioral Intelligence Layer | Complete |
17+
| Phase 3 | Correlation & Root Cause Engine | Complete |
18+
| Phase 4 | Prediction & Risk Engine | Complete |
19+
| Phase 5 | Flutter Dashboard System | Complete |
20+
| Phase 6 | Productization Layer | Complete |
7321

7422
---
7523

76-
### Process Intelligence
77-
Processes are analyzed based on:
78-
- Sustained resource impact over time
79-
- Historical correlation with system slowdown events
80-
- Contribution to system-wide pressure
81-
82-
Processes are ranked by system impact rather than instantaneous usage.
24+
## What SentraCore Does
8325

84-
---
85-
86-
### Baseline Learning
87-
SentraCore adapts to each machine by learning normal behavior patterns over time, including:
88-
- Idle behavior
89-
- Active workload patterns
90-
- Time-of-day usage trends
91-
- System-specific performance characteristics
26+
### System Stability Index
27+
The primary dashboard metric is the **System Stability Index (1–100)**. Unlike a raw CPU percentage, this score synthesises instantaneous resource pressure, statistical anomaly deviation, and forward-looking predictive risk into a single, actionable number. A score of 100 is perfect health.
9228

93-
---
29+
### Root Cause Analysis
30+
When the system enters a high-stress state and an alert fires, SentraCore's Correlation Engine automatically generates a **Root Cause Analysis** — identifying the primary bottleneck (CPU, Memory, or Disk), the most likely offending process, and the system event that triggered the degradation.
9431

95-
### Event Correlation
96-
Tracks system events such as:
97-
- Application launches and closures
98-
- Background service execution
99-
- System updates
100-
- Disk indexing and maintenance operations
32+
### Predictive Forecasting
33+
The Prediction Engine uses Exponential Moving Averages on trend slopes to generate **Time-to-Exhaustion (ETA)** countdowns. If memory is growing at a sustained rate, SentraCore will warn you that saturation is expected in X seconds, not just that usage is high.
10134

102-
These events improve accuracy of behavioral and correlation analysis.
35+
### Adaptive Baseline Learning
36+
SentraCore does not use static thresholds. It learns what is *normal* for the specific machine it runs on, segmented by time-of-day. A CPU spike at 2 AM during a known backup job is treated differently from the same spike at 2 PM.
10337

10438
---
10539

106-
### Safety-First Optimization Layer
107-
SentraCore provides system optimization suggestions with strict safety constraints.
40+
## Architecture
10841

109-
Three levels of intervention:
42+
SentraCore is structured as two decoupled layers communicating over a local WebSocket and REST API:
11043

111-
- Recommendation Only (default)
112-
- User-approved actions
113-
- Safe automated actions (restricted to non-critical processes)
114-
115-
No forced termination of critical system processes is performed.
44+
```
45+
Flutter Dashboard (Windows Desktop)
46+
↕ WebSocket (ws://localhost:8000/ws/live)
47+
↕ REST API (http://localhost:8000/api/v1/)
48+
Python Engine (Headless Background Process)
49+
├── SystemCollector (psutil telemetry)
50+
├── Normalizer (EMA smoothing)
51+
├── TimeSeriesBuffer (ring buffers)
52+
├── BaselineModel (adaptive learning)
53+
├── TrendAnalyzer (linear regression)
54+
├── AnomalyDetector (Z-score analysis)
55+
├── StressEngine (multi-state composite)
56+
├── PredictionEngine (ETA forecasting)
57+
├── StabilityCalculator (global health index)
58+
├── CorrelationEngine (root cause analysis)
59+
└── AlertManager (threshold evaluation)
60+
```
11661

11762
---
11863

119-
## System Architecture
64+
## Technology Stack
12065

121-
Flutter Dashboard ↓ (WebSocket / Local API) SentraCore Engine (Python Core) ├── Telemetry Collector ├── Time-Series Storage Layer ├── Behavior Modeling Engine ├── Anomaly Detection Engine ├── Correlation Engine ├── Decision & Safety Controller ↓ Operating System (CPU, RAM, Disk, Processes)
66+
| Layer | Technology |
67+
|---|---|
68+
| Monitoring Engine | Python 3.11, psutil |
69+
| API Server | FastAPI, uvicorn |
70+
| Real-time Communication | WebSockets |
71+
| Dashboard UI | Flutter (Dart), Windows Desktop |
72+
| Build & Packaging | PyInstaller, Inno Setup |
73+
| CI/CD | GitHub Actions (ruff, pytest, flutter analyze) |
74+
| Testing | pytest, flutter test |
12275

12376
---
12477

125-
## Data Model (Conceptual)
78+
## Getting Started
12679

127-
SentraCore operates on structured time-series data:
80+
### Run in Development
12881

129-
- Timestamped CPU usage
130-
- Memory consumption trends
131-
- Disk activity metrics
132-
- Process-level statistics
133-
- System event logs
82+
See [docs/setup/development_setup.md](docs/setup/development_setup.md) for the full guide.
13483

135-
This enables historical analysis rather than snapshot-based monitoring.
136-
137-
---
84+
```powershell
85+
# 1. Start the Python Engine
86+
.venv\Scripts\python -m engine.main
13887
139-
## System Output Example
88+
# 2. In a second terminal, run the Flutter Dashboard
89+
cd dashboard
90+
flutter run -d windows
91+
```
14092

141-
Instead of raw metrics, SentraCore produces structured insights:
93+
### Install from Installer
14294

143-
System State: Degrading
144-
Primary Pressure: Memory and Disk I/O
145-
Risk Level: 72% (Moderate)
146-
User Impact: Application lag likely during multitasking
147-
Likely Contributors: Chrome processes, background update service, increased disk queue activity
95+
Download the latest `SentraCore_Setup.exe` from the [Releases](../../releases) page and run it. The installer will:
96+
- Place both executables in `C:\Program Files\SentraCore\`.
97+
- Optionally configure the engine to start automatically on Windows login.
98+
- Create Desktop and Start Menu shortcuts for the dashboard.
14899

149100
---
150101

151-
## Technology Stack
102+
## Documentation
152103

153-
- Python (core engine)
154-
- psutil (system telemetry)
155-
- FastAPI or local API layer (communication)
156-
- WebSockets (real-time updates)
157-
- Flutter Desktop (dashboard UI)
158-
- SQLite or lightweight time-series storage (optional)
104+
| Document | Description |
105+
|---|---|
106+
| [Development Setup](docs/setup/development_setup.md) | Full local development environment guide |
107+
| [Engine Setup](docs/setup/engine_setup.md) | Engine-specific installation reference |
108+
| [Dashboard Setup](docs/setup/dashboard_setup.md) | Flutter-specific setup reference |
109+
| [Intelligence Pipeline](docs/architecture/intelligence_layer.md) | Deep dive into all 10 processing stages |
110+
| [Building SentraCore](docs/architecture/building.md) | How to produce production executables and the installer |
159111

160112
---
161113

162114
## Project Philosophy
163115

164116
SentraCore is built around five principles:
165117

166-
1. Observation — collect raw system data
167-
2. Behavioral Modeling — understand normal system behavior
168-
3. Anomaly Detection — detect deviation patterns
169-
4. Correlation Analysis — identify likely contributing factors
170-
5. User Impact Translation — convert system data into human-readable insights
171-
172-
---
173-
174-
## Positioning
175-
176-
SentraCore belongs to a new category of system software:
177-
178-
System Behavior Intelligence Layer
179-
180-
It differs from traditional tools:
181-
182-
- Task Manager: reactive snapshots
183-
- Process Explorer: manual deep inspection
184-
- Monitoring tools: infrastructure-focused
185-
186-
SentraCore focuses on:
187-
- time-based behavior understanding
188-
- probabilistic performance degradation detection
189-
- explainable system insights
190-
- user-centric performance interpretation
191-
192-
---
193-
194-
## Current Status
195-
196-
This project is in architecture and design phase, transitioning toward MVP implementation.
197-
198-
---
199-
200-
## Future Roadmap
201-
202-
- Core telemetry collector implementation
203-
- Baseline learning engine
204-
- Anomaly detection model
205-
- Process correlation system
206-
- Flutter dashboard integration
207-
- Optimization recommendation engine
208-
- Optional automation layer (user-controlled)
118+
1. **Observation** — Collect accurate, smoothed system telemetry.
119+
2. **Behavioral Modeling** — Understand what is normal for this machine.
120+
3. **Anomaly Detection** — Detect statistically significant deviations.
121+
4. **Correlation Analysis** — Explain *why* the system is degrading.
122+
5. **Prediction** — Forecast *when* critical thresholds will be breached.
209123

210124
---
211125

212126
## License
213127

214128
To be defined.
215-
216-
---
217-
218-
## Author
219-
220-
SentraCore is designed and developed as a system intelligence research and engineering project focused on next-generation local system understanding.

docs/README.md

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,37 @@
11
# SentraCore Documentation
22

3-
Welcome to the SentraCore documentation directory. This folder contains all necessary guides and architectural overviews for the SentraCore Mono-Repo.
3+
This directory contains all technical documentation for the SentraCore project.
44

5-
## Table of Contents
5+
---
66

7-
### Setup Guides
8-
- [Engine Setup](setup/engine_setup.md) - How to install and run the Python backend.
9-
- [Dashboard Setup](setup/dashboard_setup.md) - How to compile and run the Flutter UI.
7+
## Setup Guides
108

11-
### Architecture
12-
- [Intelligence Layer (Phase 2)](architecture/intelligence_layer.md) - Deep dive into the behavioral anomaly detection and trend analysis engines.
9+
| Guide | Description |
10+
|---|---|
11+
| [Development Setup](setup/development_setup.md) | Complete local development environment guide for both the engine and dashboard |
12+
| [Engine Setup](setup/engine_setup.md) | Python engine installation reference |
13+
| [Dashboard Setup](setup/dashboard_setup.md) | Flutter dashboard setup reference |
14+
15+
---
16+
17+
## Architecture & Technical Reference
18+
19+
| Document | Description |
20+
|---|---|
21+
| [Intelligence Pipeline](architecture/intelligence_layer.md) | Deep dive into all 10 processing stages from raw telemetry to Root Cause Analysis |
22+
| [Building SentraCore](architecture/building.md) | How to produce standalone executables and compile the Inno Setup installer |
23+
24+
---
25+
26+
## Project Status
27+
28+
All six development phases are complete:
29+
30+
| Phase | Scope |
31+
|---|---|
32+
| Phase 1 | Core Telemetry Engine — psutil collection, normalizer, buffers, alert system |
33+
| Phase 2 | Behavioral Intelligence — baseline learning, anomaly detection, trend analysis |
34+
| Phase 3 | Correlation & RCA Engine — root cause analysis, event correlation, alert enrichment |
35+
| Phase 4 | Prediction & Risk Engine — ETA forecasting, risk scoring, stability index |
36+
| Phase 5 | Flutter Dashboard — stability indicator, prediction panel, RCA panel, charts |
37+
| Phase 6 | Productization — PyInstaller packaging, Flutter build, Inno Setup installer |

0 commit comments

Comments
 (0)