How ani503/vajra works
VAJRA is an offline-first predictive-maintenance and fleet-readiness platform. Operators use its management console to inspect fleet and engine health, review alerts and forecasts, and coordinate maintenance and spares; telemetry replay feeds live scoring and safety-rule evaluation, with results exposed through the API and WebSocket. The graph preserves the documented ML, reporting, audit, and readiness capabilities. Some routes and integrations are represented from README and SOURCE INDEX references rather than inspected implementation excerpts, so only documented or indexed relationships are shown.
Main entry points: main.py FastAPI application · database.py SQLite database · simulator.py Telemetry replay · engines.py Engine health API
Components 21
Application entry
- FastAPI application
backend/app/main.py
Telemetry and prediction
- Simulator API
backend/app/api/routes/simulator.py - Telemetry replay
backend/app/services/simulator.py - ML health scoring
ml/inference.py - Live scoring bridge
ml/live_scoring.py - Feature engineering
ml/preprocessing.py - Safety rule engine
backend/app/core/rule_engine.py - WebSocket hub
backend/app/api/routes/websocket.py
Fleet operations
- Engine health API
backend/app/api/routes/engines.py - Dashboard KPIs
backend/app/api/routes/dashboard.py - Fleet readiness
backend/app/api/routes/fleet.py - Alerts
backend/app/api/routes/alerts.py - Maintenance optimizer
backend/app/api/routes/maintenance.py - Spares routing
backend/app/api/routes/spares.py - Reports
backend/app/api/routes/reports.py - PDF report engine
backend/app/services/pdf_report.py
Platform services
- SQLite database
backend/app/database.py - Audit logging
backend/app/services/audit.py - RBAC authentication
backend/app/core/auth.py
User interfaces
- Management console
VAJRA_REVIEW/frontend/vajra-bridge.js
Other components
- Operator
Connections 29
- Operator → Management console: uses
README.md - Management console → FastAPI application: calls API
README.md - FastAPI application → Engine health API: routes
backend/app/main.py - FastAPI application → Dashboard KPIs: routes
backend/app/main.py - FastAPI application → Fleet readiness: routes
backend/app/main.py - FastAPI application → Alerts: routes
backend/app/main.py - FastAPI application → Maintenance optimizer: routes
backend/app/main.py - FastAPI application → Spares routing: routes
backend/app/main.py - FastAPI application → Reports: routes
backend/app/main.py - FastAPI application → Simulator API: routes
backend/app/main.py - FastAPI application → WebSocket hub: registers
backend/app/main.py - Engine health API → SQLite database: queries
backend/app/api/routes/engines.py - Dashboard KPIs → SQLite database: queries
backend/app/api/routes/dashboard.py - Fleet readiness → SQLite database: queries
backend/app/api/routes/fleet.py - Alerts → SQLite database: queries
backend/app/api/routes/alerts.py - Maintenance optimizer → SQLite database: queries
backend/app/api/routes/maintenance.py - Spares routing → SQLite database: queries
backend/app/api/routes/spares.py - Reports → SQLite database: queries
backend/app/api/routes/reports.py - Engine health API → ML health scoring: scores engines
backend/app/api/routes/engines.py - Simulator API → Telemetry replay: delegates
backend/app/api/routes/simulator.py - Telemetry replay → SQLite database: updates state
backend/app/services/simulator.py - Telemetry replay → Live scoring bridge: scores readings
backend/app/services/simulator.py - Telemetry replay → Safety rule engine: checks thresholds
backend/app/services/simulator.py - ML health scoring → Feature engineering: uses features
- Reports → PDF report engine: generates PDFs
backend/app/api/routes/reports.py - RBAC authentication → SQLite database: loads user
backend/app/core/auth.py - Alerts → Audit logging: records actions
backend/app/api/routes/alerts.py - Maintenance optimizer → Audit logging: records actions
backend/app/api/routes/maintenance.py - Management console → WebSocket hub: streams telemetry
README.md