Skip to content

Feature/firebase live iot 20260416#37

Open
sxhaakee wants to merge 13 commits intohacktofuture-sjec:mainfrom
haashid:feature/firebase-live-iot-20260416
Open

Feature/firebase live iot 20260416#37
sxhaakee wants to merge 13 commits intohacktofuture-sjec:mainfrom
haashid:feature/firebase-live-iot-20260416

Conversation

@sxhaakee
Copy link
Copy Markdown

No description provided.

Copilot AI review requested due to automatic review settings April 16, 2026 19:01
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds an end-to-end “live IoT → ML validation/agents → dashboard” workflow for NeuroMesh, including training/prediction scripts, a LangGraph-based pipeline, a Firebase polling bridge, and a Next.js dashboard for real-time visualization.

Changes:

  • Introduces ML training + prediction modules (seismic, gas, survivor, validator) and stores model artifacts.
  • Adds a LangGraph multi-agent pipeline and a Firebase RTDB live bridge that feeds the pipeline and posts telemetry to the dashboard.
  • Adds/updates a Next.js dashboard with live telemetry API route(s), mapping/visualization components, and setup docs.

Reviewed changes

Copilot reviewed 49 out of 68 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
train/train_validator.py Trains and saves IsolationForest “validator” model artifact.
train/train_survivor.py Trains and saves survivor LogisticRegression + scaler artifacts.
train/train_seismic.py Trains and saves TensorFlow/Keras 1D CNN seismic model artifact.
train/train_gas.py Trains and saves RandomForest gas model artifact.
tests/test_validation_and_agents.py Unit tests for verifier/triage helper logic and agent outputs.
tests/test_pipeline_and_dashboard.py Tests pipeline routing, logistics helpers, and presence of dashboard/model files.
predict/predict_validator.py Loads validator model and provides validator inference function.
predict/predict_survivor.py Loads survivor model/scaler and provides survivor inference function.
predict/predict_seismic.py Loads seismic model and provides seismic inference function.
predict/predict_gas.py Loads gas model and provides gas inference function.
predict/pycache/predict_validator.cpython-313.pyc Adds compiled Python bytecode for predict_validator (should not be committed).
predict/pycache/predict_survivor.cpython-313.pyc Adds compiled Python bytecode for predict_survivor (should not be committed).
predict/pycache/predict_seismic.cpython-313.pyc Adds compiled Python bytecode for predict_seismic (should not be committed).
predict/pycache/predict_gas.cpython-313.pyc Adds compiled Python bytecode for predict_gas (should not be committed).
pipeline/state.py Adds TypedDict schemas for pipeline state and agent outputs.
pipeline/langgraph_pipeline.py Adds standalone “run all models + call Mistral” pipeline script.
pipeline/graph.py Defines the LangGraph StateGraph and routing logic.
pipeline/firebase_live_bridge.py Adds Firebase RTDB polling bridge + dashboard telemetry posting.
models/survivor_scaler.pkl Adds trained scaler artifact for survivor model.
models/survivor_model.pkl Adds trained survivor model artifact.
iot.c Adds ESP32 firmware sketch that reads sensors and posts to Firebase RTDB.
data/generate_survivor_data.py Generates synthetic survivor training data CSV.
data/generate_seismic_data.py Generates synthetic seismic training data CSV.
data/generate_gas_data.py Generates synthetic gas training data CSV.
dashboard/tsconfig.json Sets TypeScript config for the dashboard app.
dashboard/src/components/WeatherPrediction.tsx Adds client-side weather + flood risk widget.
dashboard/src/components/SystemHealth.tsx Adds system health/status header component.
dashboard/src/components/SitrepPanel.tsx Adds SITREP detail panel UI.
dashboard/src/components/SimulationDashboard.tsx Adds scenario-based simulation UI for pipeline stages and SITREPs.
dashboard/src/components/NeoMap.tsx Adds Leaflet-based animated mesh map component.
dashboard/src/components/MapPanel.tsx Adds MapLibre-based real geospatial overlay and routing visualization.
dashboard/src/components/AlertFeed.tsx Adds live alert feed UI component.
dashboard/src/app/weatherApi.ts Adds helper functions for calling OpenWeather endpoints.
dashboard/src/app/page.tsx Main dashboard page: polling telemetry, simulation sequencing, UI layout.
dashboard/src/app/layout.tsx Next.js root layout + font setup.
dashboard/src/app/globals.css Global styling (Tailwind + Leaflet + neumorphic theme).
dashboard/src/app/favicon.ico Adds favicon asset.
dashboard/src/app/api/weather/route.ts Adds placeholder weather API route.
dashboard/src/app/api/telemetry/route.ts Adds telemetry ingest + snapshot API route for dashboard.
dashboard/public/window.svg Adds SVG asset.
dashboard/public/vercel.svg Adds SVG asset.
dashboard/public/next.svg Adds SVG asset.
dashboard/public/globe.svg Adds SVG asset.
dashboard/public/file.svg Adds SVG asset.
dashboard/postcss.config.mjs Adds PostCSS config for Tailwind.
dashboard/package.json Adds dashboard dependencies/scripts.
dashboard/next.config.ts Adds Next.js config (incl. turbopack root).
dashboard/light_theme_converter.py Utility script to rewrite classes for light theme.
dashboard/insert_weather.py Utility script to insert weather UI into page.tsx.
dashboard/eslint.config.mjs ESLint config for Next.js + TS.
dashboard/REALTIME_IOT_SETUP.md Docs for real-time IoT feed setup (ESP32 → dashboard).
dashboard/README.md Default Next.js readme.
dashboard/CLAUDE.md References agent rules file.
dashboard/AGENTS.md Adds agent rules note about Next.js breaking changes.
dashboard/.gitignore Dashboard-specific ignore file.
agents/verifier_agent.py Adds verifier agent with IsolationForest + heuristics + correlation checks.
agents/triage_agent.py Adds triage agent (survivability/gas/urgency + equipment checklist).
agents/reporter_agent.py Adds reporter agent with optional Mistral call + deterministic fallback SITREP.
agents/logistics_agent.py Adds logistics agent (route + debris/exclusion zone estimation).
README.md Rewrites top-level project README with NeuroMesh description and setup steps.
.gitignore Adds repo-level ignore patterns (Python, Node, IDE, etc.).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread agents/verifier_agent.py
Comment thread dashboard/src/components/WeatherPrediction.tsx
Comment thread pipeline/langgraph_pipeline.py
Comment thread agents/verifier_agent.py
Comment thread pipeline/state.py
Comment thread iot.c
Comment thread pipeline/firebase_live_bridge.py
Comment thread pipeline/state.py
Comment thread dashboard/src/app/page.tsx
Comment thread dashboard/src/app/weatherApi.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants