How asliadarsh/pravah works
Pravah is a drilling-intelligence application: engineers inspect a live well against nearby offsets, correlated formations and historical events, then review evidence, alerts and mitigation context before making a decision. The backend seeds published well, report and telemetry data; exposes domain analysis through FastAPI; and stores the resulting corpus and engineer actions. The frontend provides the dashboard and specialist screens. Several engine and page implementations were not excerpted, so their capabilities are included from the README, while uncertain internal call paths are omitted.
Main entry points: client.ts API Client · routers API Routers · seed_real.py Corpus Seeding · main.py FastAPI Application
Components 31
Engineer Experience
- Web Application
frontend/src/App.tsx - API Client
frontend/src/api/client.ts - Well Dashboard
frontend/src/pages/Dashboard.tsx - Offset Map and Replay
frontend/src/pages/OffsetMap.tsx - Event Timeline
frontend/src/pages/Timeline.tsx - Alert Decisions
frontend/src/components/DecisionPanel.tsx - Evidence Viewer
frontend/src/pages/Documents.tsx - Knowledge Search
frontend/src/pages/Search.tsx - Telemetry and Validation
frontend/src/pages/TelemetryMonitor.tsx
API and Services
- FastAPI Application
backend/app/main.py - API Routers
backend/app/routers - Composite Services
backend/app/services.py
Well Intelligence
- Risk and Alerts
backend/app/risk.py - Offset Relevance
backend/app/relevance.py - AHP Weighting
backend/app/ahp.py - Geospatial Correlation
backend/app/geo.py - Telemetry Anomaly Engine
backend/app/anomaly.py - Detector Backtest
backend/app/backtest.py - Knowledge Graph
backend/app/graph.py - Graph Retrieval
backend/app/graphrag.py - Hybrid Search
backend/app/search.py
Evidence and Data
- Document Ingestion
backend/app/ingestion.py - Event Type Registry
backend/app/event_types.py - Published Data Sources
backend/app/datasources.py - Corpus Seeding
backend/app/seed_real.py - Optional Synthesis
backend/app/llm.py
Persistence
- Database and ORM
backend/app/db.py - Domain Records
backend/app/models.py
Other components
- Rig Engineer
- Published Well Data
- LLM Provider
Connections 31
- Rig Engineer → Web Application: uses
README.md - Web Application → API Client: uses
frontend/src/App.tsx - API Client → FastAPI Application: calls API
- FastAPI Application → API Routers: mounts
backend/app/main.py - FastAPI Application → Corpus Seeding: seeds on startup
backend/app/main.py - API Routers → Composite Services: delegates to
backend/app/routers/alerts.py - API Routers → Risk and Alerts: uses risk logic
backend/app/routers/alerts.py - API Routers → Hybrid Search: runs search
backend/app/routers/search.py - Composite Services → Offset Relevance: uses
backend/app/services.py - Composite Services → Risk and Alerts: uses
backend/app/services.py - Risk and Alerts → Event Type Registry: checks hazard types
backend/app/risk.py - Offset Relevance → AHP Weighting: uses weighting
- Offset Relevance → Geospatial Correlation: uses proximity
- Hybrid Search → Optional Synthesis: synthesizes retrieved records
backend/app/search.py - Hybrid Search → Graph Retrieval: uses graph retrieval
backend/app/graphrag.py - Graph Retrieval → Knowledge Graph: queries graph
backend/app/graphrag.py - Document Ingestion → Event Type Registry: classifies events
backend/app/ingestion.py - Corpus Seeding → Published Data Sources: loads corpus
backend/app/seed_real.py - Corpus Seeding → Document Ingestion: ingests reports
backend/app/seed_real.py - Published Well Data → Corpus Seeding: provides records
- Optional Synthesis → LLM Provider: optional synthesis
backend/app/llm.py - Database and ORM → Domain Records: creates schema
backend/app/db.py - API Routers → Database and ORM: reads and writes
backend/app/routers/alerts.py - Well Dashboard → API Client: loads well context
- Offset Map and Replay → API Client: loads offsets
- Event Timeline → API Client: loads events
- Alert Decisions → API Client: reviews alerts
- Evidence Viewer → API Client: loads evidence
- Knowledge Search → API Client: submits queries
- Telemetry and Validation → API Client: loads telemetry
- Telemetry Anomaly Engine → Detector Backtest: evaluated by