How devops941/process-guard works
ProcessGuard AI is an industrial multivariate anomaly-detection and operator-review dashboard. Operators select a plant, inspect telemetry, establish or configure baselines, run detection, review alerts and signal contributions, then evaluate results and export reports. The documented product also includes uploads, audit, administration, drift monitoring and synthetic demo telemetry. The excerpts show the run router invoking analytics and the app registering routers; several other branches are documented in the README but their runtime wiring was not sampled.
Main entry points: runs.py Detection orchestration · App.tsx Workspace shell · main.py FastAPI application · api.ts API client
Components 31
Operator workspace
- Workspace shell
frontend/src/App.tsx - Sign-in state
frontend/src/lib/authContext.tsx - API client
frontend/src/lib/api.ts - Signals and uploads
frontend/src/features/signals/SignalsPanel.tsx - Baseline models
frontend/src/features/baseline/BaselinePanel.tsx - Detection view
frontend/src/features/detect/DetectPanel.tsx - Alert investigation
frontend/src/features/investigate/InvestigatePanel.tsx - Signal wall
frontend/src/components/signalwall/SignalWall.tsx - Reports and evaluation
frontend/src/features/report/ReportPanel.tsx
API and access
- FastAPI application
backend/app/main.py - Authentication routes
backend/app/api/v1/routers/auth.py - Telemetry and uploads
backend/app/api/v1/routers - Models and runs
backend/app/api/v1/routers - Alerts and events
backend/app/api/v1/routers - Evaluation and reports
backend/app/api/v1/routers - Plants and audit
backend/app/api/v1/routers - Token security
backend/app/core/security.py - Detection orchestration
backend/app/api/v1/routers/runs.py
Analytics
- Preprocessing
backend/app/analytics/preprocess.py - Multivariate detectors
backend/app/analytics/pca_monitor.py - Score ensemble
backend/app/analytics/ensemble.py - Alert thresholds
backend/app/analytics/thresholds.py - Signal contributions
backend/app/analytics/contributions.py - Correlation shifts
backend/app/analytics/corrshift.py - Evaluation metrics
backend/app/analytics/evaluate.py - Model drift
backend/app/analytics/drift.py - Univariate monitors
backend/app/analytics/univariate.py - Synthetic telemetry
backend/app/analytics/synth.py
Persistence
- Data repositories
backend/app/repositories/db_repo.py - MongoDB storage
backend/app/core/database.py
Other components
- Operator
Connections 36
- Operator → Workspace shell: uses
README.md - Workspace shell → Sign-in state: provides auth
frontend/src/App.tsx - Workspace shell → Signals and uploads: renders
frontend/src/App.tsx - Workspace shell → Baseline models: renders
frontend/src/App.tsx - Workspace shell → Detection view: renders
frontend/src/App.tsx - Workspace shell → Alert investigation: renders
frontend/src/App.tsx - Workspace shell → Reports and evaluation: renders
frontend/src/App.tsx - Sign-in state → API client: requests identity
frontend/src/lib/authContext.tsx - Signals and uploads → API client: requests telemetry
frontend/src/features/signals/SignalsPanel.tsx - Baseline models → API client: requests models
frontend/src/features/baseline/BaselinePanel.tsx - Alert investigation → API client: reviews alerts
frontend/src/features/investigate/InvestigatePanel.tsx - Reports and evaluation → API client: requests reports
frontend/src/features/report/ReportPanel.tsx - Baseline models → Signal wall: renders
frontend/src/features/baseline/BaselinePanel.tsx - Alert investigation → Signal wall: renders
frontend/src/features/investigate/InvestigatePanel.tsx - API client → FastAPI application: calls API
- FastAPI application → Authentication routes: registers
backend/app/main.py - FastAPI application → Telemetry and uploads: registers
backend/app/main.py - FastAPI application → Models and runs: registers
backend/app/main.py - FastAPI application → Alerts and events: registers
backend/app/main.py - FastAPI application → Evaluation and reports: registers
backend/app/main.py - FastAPI application → Plants and audit: registers
backend/app/main.py - Authentication routes → Token security: validates tokens
backend/app/api/v1/routers/auth.py - Authentication routes → Data repositories: reads users
backend/app/api/v1/routers/auth.py - Models and runs → Detection orchestration: dispatches runs
- Detection orchestration → Data repositories: loads and saves
backend/app/api/v1/routers/runs.py - Detection orchestration → Preprocessing: preprocesses
backend/app/api/v1/routers/runs.py - Detection orchestration → Multivariate detectors: scores with
backend/app/api/v1/routers/runs.py - Detection orchestration → Score ensemble: fuses scores
backend/app/api/v1/routers/runs.py - Detection orchestration → Alert thresholds: applies thresholds
backend/app/api/v1/routers/runs.py - Detection orchestration → Signal contributions: computes shares
backend/app/api/v1/routers/runs.py - Detection orchestration → Correlation shifts: computes shifts
backend/app/api/v1/routers/runs.py - Evaluation and reports → Evaluation metrics: evaluates runs
- Evaluation and reports → Model drift: monitors drift
- Detection orchestration → Univariate monitors: compares monitors
- Synthetic telemetry → Preprocessing: supplies demo data
- Data repositories → MongoDB storage: reads and writes
backend/app/repositories/db_repo.py