How iam-pradeepkumar/chainquake works
ChainQuake monitors supply-chain disruptions, models their cascading impact, and supports operator response through alerts, recovery plans, and simulations. The principal workflow runs from an operator dashboard request through the frontend API client and FastAPI routes into graph, risk, or simulation services; results return to dashboard views. README capabilities include news and weather ingestion, neural graph mapping, email and voice dispatch, and Firebase persistence. Some subsystem links are documented or indexed rather than shown in full source excerpts, so uncertain integrations are omitted.
Main entry points: api.js Frontend API client · Dashboard.jsx Dashboard · main.py FastAPI application · simulate.py Simulation API
Components 30
Operator interface
- App and auth state
frontend/src/App.jsx - Sign-in
frontend/src/pages/AuthPage.jsx - Dashboard
frontend/src/pages/Dashboard.jsx - Supply-chain graph
frontend/src/components/SupplyChainGraph.jsx - Risk insights
frontend/src/components/AIInsightsPanel.jsx - Alerts and dispatch
frontend/src/components/AlertsPanel.jsx - Crisis simulator
frontend/src/components/SimulationPanel.jsx - News feed
frontend/src/components/NewsFeed.jsx - Chat commander
frontend/src/components/ChatCommander.jsx - Frontend API client
frontend/src/services/api.js
API orchestration
- FastAPI application
backend/main.py - Authentication API
backend/api/auth.py - Alerts API
backend/api/alerts.py - Risk API
backend/api/risk.py - Simulation API
backend/api/simulate.py - News API
backend/api/news.py - Chat API
backend/api/chat.py
Supply-chain intelligence
- Supply-chain graph engine
backend/services/graph_engine.py - Risk prediction
backend/services/ai_engine.py - Scenario and recovery engine
backend/services/simulation_engine.py - News and weather ingestion
backend/services/news_service.py - Weather integration
backend/services/weather_service.py - Notification service
backend/services/notification_service.py
Identity and persistence
- Firebase web auth
frontend/src/firebase.js - Firebase admin and Firestore
backend/core/firebase_admin.py - Network and event seed data
backend/core/seed_data.py
Other components
- Operator
- Email recipient
- Phone recipient
- News and weather sources
Connections 46
- Operator → App and auth state: opens
frontend/src/App.jsx - App and auth state → Sign-in: renders
frontend/src/App.jsx - App and auth state → Dashboard: renders
frontend/src/App.jsx - App and auth state → Firebase web auth: checks auth
frontend/src/App.jsx - Sign-in → Firebase web auth: uses
frontend/src/pages/AuthPage.jsx - Dashboard → Supply-chain graph: renders
frontend/src/pages/Dashboard.jsx - Dashboard → Risk insights: renders
frontend/src/pages/Dashboard.jsx - Dashboard → Alerts and dispatch: renders
frontend/src/pages/Dashboard.jsx - Dashboard → Crisis simulator: renders
frontend/src/pages/Dashboard.jsx - Dashboard → News feed: renders
frontend/src/pages/Dashboard.jsx - Dashboard → Chat commander: renders
frontend/src/pages/Dashboard.jsx - Alerts and dispatch → Frontend API client: requests
frontend/src/components/AlertsPanel.jsx - Crisis simulator → Frontend API client: requests
frontend/src/components/SimulationPanel.jsx - Chat commander → Frontend API client: requests
frontend/src/components/ChatCommander.jsx - Frontend API client → Alerts API: calls alert routes
frontend/src/services/api.js - Frontend API client → Risk API: calls risk routes
frontend/src/services/api.js - Frontend API client → Simulation API: calls simulation routes
frontend/src/services/api.js - Frontend API client → News API: calls news route
frontend/src/services/api.js - Frontend API client → Chat API: calls chat route
frontend/src/services/api.js - Frontend API client → Authentication API: calls auth routes
frontend/src/services/api.js - FastAPI application → Alerts API: routes to
backend/main.py - FastAPI application → Risk API: routes to
backend/main.py - FastAPI application → Simulation API: routes to
backend/main.py - FastAPI application → News API: routes to
backend/main.py - FastAPI application → Chat API: routes to
backend/main.py - FastAPI application → Authentication API: routes to
backend/main.py - Alerts API → Supply-chain graph engine: reads network risk
backend/api/alerts.py - Alerts API → Notification service: dispatches alerts
backend/api/alerts.py - Risk API → Supply-chain graph engine: queries network
backend/api/risk.py - Risk API → Risk prediction: requests predictions
backend/api/risk.py - Simulation API → Scenario and recovery engine: runs scenarios
backend/api/simulate.py - Simulation API → Supply-chain graph engine: uses network
backend/api/simulate.py - Simulation API → Alerts API: adds alerts
backend/api/simulate.py - Simulation API → Notification service: dispatches notifications
backend/api/simulate.py - News API → News and weather ingestion: gets news
backend/api/news.py - Chat API → Risk prediction: uses intelligence
backend/api/chat.py - Chat API → Supply-chain graph engine: queries network
backend/api/chat.py - Scenario and recovery engine → Network and event seed data: loads disruption templates
backend/services/simulation_engine.py - Scenario and recovery engine → Supply-chain graph engine: simulates and recovers
backend/services/simulation_engine.py - Supply-chain graph engine → Firebase admin and Firestore: persists graph updates
backend/services/graph_engine.py - News and weather ingestion → Weather integration: uses weather data
backend/services/news_service.py - News and weather sources → News and weather ingestion: provides signals
- Notification service → Email recipient: sends email
README.md - Notification service → Phone recipient: places voice call
README.md - Authentication API → Firebase admin and Firestore: verifies and saves users
backend/api/auth.py - Firebase admin and Firestore → Network and event seed data: seeds network
backend/core/firebase_admin.py