How blackbird-e1/wildfire-management-rag works
Wildfire Management RAG is a decision-support application: users explore wildfire incidents and risk, ask questions or request reports grounded in an ingested knowledge base, and can optimize resource deployment. The principal path is the React interface to the Express API, through retrieval and answer generation, backed by vector storage. Separate branches cover web/PDF ingestion, risk visualization and quantum optimization, and scheduled weather alerts. Several UI details and the MCP server were not sampled, so only documented or evidenced relationships are shown.
Main entry points: App.tsx React Application · server.ts Express API · example.ts Scheduled Weather Check · ingest.ts Web Ingestion
Components 30
Decision Interface
- React Application
frontend/src/App.tsx - Incident Explorer
frontend/src/components/Incidents.tsx - Incident Detail
frontend/src/components/IncidentDetail.tsx - Risk Map
frontend/src/components/RiskMap.tsx - Monitoring View
frontend/src/components/Monitoring.tsx - Reports View
frontend/src/components/Reports.tsx - Knowledge Base UI
frontend/src/components/KnowledgeBase.tsx - PDF Upload
frontend/src/components/PdfUpload.tsx - Optimizer View
frontend/src/components/QuantumOptimizer.tsx
RAG Backend
- Express API
backend/src/server.ts - RAG Workflow
backend/src/graph/wildfireGraph.ts - Retrieval and Generation
backend/src/graph/nodes.ts - Embedding and LLM
backend/src/lib/ai.ts - Astra Vector Store
backend/src/lib/db.ts
Knowledge Ingestion
- Web Ingestion
backend/src/ingest.ts - PDF Ingestion
backend/src/lib/pdfIngest.ts - Web Scraper
backend/src/lib/scrape.ts - PDF Chunker
backend/src/lib/pdf.ts
Risk Optimization
- Optimization API
backend/src/quantum.ts - Optimizer Runner
quantum/run_optimizer.py - QUBO and QAOA
quantum/optimizer.py - Risk and Resources
quantum/resource_model.py
Autonomous Alerts
- Scheduled Weather Check
autonomous/src/trigger/example.ts - Weather Provider
autonomous/src/weather/openMeteo.ts - Alert Rules
autonomous/src/rules/alertRules.ts - Subscriber Lookup
autonomous/db/subscribers.ts - Email Delivery
autonomous/email/resend.ts
Other components
- Wildfire Analyst
- Open-Meteo
- Resend
Connections 34
- Wildfire Analyst → React Application: uses
README.md - React Application → Incident Explorer: renders
frontend/src/App.tsx - React Application → Risk Map: renders
frontend/src/App.tsx - React Application → Monitoring View: renders
frontend/src/App.tsx - React Application → Reports View: renders
frontend/src/App.tsx - React Application → Optimizer View: renders
frontend/src/App.tsx - React Application → Knowledge Base UI: renders
frontend/src/App.tsx - Incident Explorer → Incident Detail: renders
frontend/src/components/Incidents.tsx - Knowledge Base UI → PDF Upload: renders
frontend/src/components/KnowledgeBase.tsx - React Application → Express API: requests answers
README.md - Express API → RAG Workflow: routes questions
backend/src/server.ts - Express API → RAG Workflow: requests reports
backend/src/server.ts - RAG Workflow → Retrieval and Generation: dispatches steps
backend/src/graph/wildfireGraph.ts - Retrieval and Generation → Embedding and LLM: embeds and generates
backend/src/graph/nodes.ts - Retrieval and Generation → Astra Vector Store: queries vectors
backend/src/graph/nodes.ts - Express API → Web Ingestion: starts ingestion
backend/src/server.ts - Express API → PDF Ingestion: processes uploads
backend/src/server.ts - Web Ingestion → Web Scraper: scrapes pages
backend/src/ingest.ts - Web Ingestion → Embedding and LLM: embeds chunks
backend/src/ingest.ts - Web Ingestion → Astra Vector Store: stores vectors
backend/src/ingest.ts - PDF Ingestion → PDF Chunker: chunks documents
backend/src/lib/pdfIngest.ts - PDF Ingestion → Embedding and LLM: embeds chunks
backend/src/lib/pdfIngest.ts - PDF Ingestion → Astra Vector Store: stores vectors
backend/src/lib/pdfIngest.ts - React Application → Optimization API: submits risk
README.md - Express API → Optimization API: mounts endpoint
backend/src/server.ts - Optimization API → Optimizer Runner: runs optimizer
README.md - Optimizer Runner → QUBO and QAOA: builds and solves
quantum/run_optimizer.py - QUBO and QAOA → Risk and Resources: uses inputs
quantum/optimizer.py - Scheduled Weather Check → Weather Provider: fetches conditions
autonomous/src/trigger/example.ts - Weather Provider → Open-Meteo: requests weather
README.md - Scheduled Weather Check → Alert Rules: evaluates conditions
autonomous/src/trigger/example.ts - Scheduled Weather Check → Subscriber Lookup: loads recipients
autonomous/src/trigger/example.ts - Scheduled Weather Check → Email Delivery: sends alerts
autonomous/src/trigger/example.ts - Email Delivery → Resend: delivers messages
README.md