Skip to content

NotW41k3R/nerve

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nerve: Smart Supply Chain Monitor

Nerve is a real-time, digital twin of a global supply chain network. It tracks shipments across 24 global nodes (ports, factories, warehouses), dynamically fetches real-world weather data, automatically detects anomalies that could lead to delays, and uses an intelligent Multi-Agent system to autonomously calculate alternative routes—all streaming live to a high-fidelity frontend dashboard.


🌟 Core System Capabilities

The system operates as a fully functional, autonomous end-to-end loop:

  1. Autonomous Simulation Loop: The backend maintains a continuous background cycle, fetching live weather conditions across all 24 global nodes and running AI-driven risk evaluations every 60 seconds.
  2. Intelligent Anomaly Detection: The system parses environmental data against safety thresholds. Users can also manually inject extreme weather (like Category 5 Typhoons) via the frontend Simulate Disruption interface to test network resilience.
  3. LLM-Powered Multi-Agent Orchestration: When an anomaly is detected, a specialized team of agents (powered by Groq/LLMs) coordinates a response:
    • Scout Agent: Verifies the severity and confirms the disruption.
    • Mapper Agent: Identifies all active shipments whose paths intersect with the impacted nodes.
    • Optimizer Agent: Runs advanced Dijkstra-based cost functions (distance, risk, cascade debt) to find optimal detours.
    • Communicator Agent: Translates routing logic into human-readable logs and updates shipment paths via WebSockets.
  4. Dynamic Booking Engine: A dedicated UI allows for the ingestion of new shipments. The RoutePlanner agent calculates the optimal initial path based on real-time network health.
  5. MongoDB Atlas Persistence: All network state, shipment histories, and AI decisions are persisted in a cloud MongoDB database, ensuring data survives restarts.
  6. Real-Time Visualization: A dark-themed React/Leaflet dashboard renders the global network, displaying live "Health" metrics and "Cascade Debt" analytics.

🛠️ Current Project State (Demo Mode)

For the current deployment and review, the project is configured in "Always-On Demo Mode":

  • Remote Backend: The frontend is pre-configured to communicate with a hosted backend at https://nerve-u178.onrender.com.
  • Secure Streaming: Live updates are pushed via Secure WebSockets (wss) for real-time telemetry and agent logging.

🚀 Getting Started

To view the dashboard locally, you only need to run the frontend application:

1. Navigate to the Frontend

Open your terminal and enter the frontend directory:

cd frontend

2. Install Dependencies

If this is your first time running the project:

npm install

3. Start the Development Server

npm run dev

4. View the Dashboard

Open your browser to http://localhost:5173/. The dashboard will automatically connect to the remote backend. Within 60 seconds, you will see the first live telemetry push, agent logs will begin reporting, and any detected weather anomalies will appear in the Alerts panel.


🔮 Future Roadmap

  1. Live Map Animation: Interpolating shipment coordinates to display moving vehicle icons (🚢/🚛) along map polylines for a true "live" feel.
  2. Redis Pub/Sub Scaling: Migrating in-memory state to Redis to allow horizontal scaling of backend instances.
  3. Financial & Carbon Analytics: Calculating the $ saving and CO2 impact of AI-driven rerouting decisions.
  4. Predictive Risk Horizons: Implementing time-series ML to reroute shipments pre-emptively based on 72-hour weather forecasts.
  5. Interactive Graph Editing: A UI for admins to dynamically add new warehouses or ports to the global network.

About

Real-Time Supply Chain Monitor

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors