Skip to content

Repository files navigation

EcoGrid Intelligence

EcoGrid Intelligence

AI-Driven Climate Resilience Analysis for Global Energy Infrastructure on Liquid Galaxy

Flutter Dart Gemini AI Liquid Galaxy License

A Google Summer of Code 2026 project under Liquid Galaxy LAB


🌍 About

EcoGrid Intelligence is a Flutter application built for the Liquid Galaxy platform that lets researchers and policymakers interactively explore global energy infrastructure through the lens of climate resilience.

It combines 34,000+ power plants from the Global Power Plant Database with real-time climate data, a custom Climate Vulnerability Score (CVS) engine, and Gemini AI insights — all visualized across a multi-screen Liquid Galaxy rig via dynamic KML overlays.


✨ Features

🔌 Liquid Galaxy Integration

  • SSH-based connection to control the LG rig
  • Dynamic KML deployment to master & slave screens
  • 3D extruded region boundaries from real GeoJSON
  • Smooth camera orbits around plants & regions
  • Automated comparison tours between plants
  • Logo overlays and HTML info balloons

🤖 AI-Powered Insights

  • Conversational chat with Gemini AI per plant
  • Context-aware prompts with CVS, climate & metadata
  • Scenario simulation narratives
  • Text-to-Speech readout of AI responses
  • Speech-to-Text for voice-based search

📊 Climate Vulnerability Score (CVS)

  • Custom scoring engine with 15-fuel-type sensitivity matrix
  • Real climate data from Open-Meteo API
  • Anomaly Engine — P90 peaks, drought ratios, gust frequency
  • Per-dimension stress breakdown (temp / water / wind)
  • Scenario simulation with adjustable multipliers

🗺️ Rich Visualization

  • Interactive Google Maps with fuel-type icon markers
  • Risk-colored marker rings (Low → Critical)
  • Historical climate trend charts (fl_chart)
  • Plant comparison side-by-side view
  • Animated globe background (custom painter)

Plus: Dark/Light theming · Localization (EN, ES, DE) · Guided FTUE tour · Secure API key management · Drift (SQLite) caching · Clean Architecture with BLoC


🏗️ Architecture

lib/
├── config/          # Theme, routes, localization
├── core/            # Constants, enums, utilities, KML generation
├── data/            # Remote (Gemini, Open-Meteo) & local (Drift DB) sources
├── di/              # Dependency injection (get_it)
├── domain/          # Models, repository interfaces, use cases
├── presentation/    # UI screens, BLoC state management, components
├── service/         # LG, SSH, TTS, STT, Tour services
└── main.dart

The app follows Clean Architecture with clear separation between data, domain, and presentation layers. State management uses the BLoC pattern throughout.


🚀 Getting Started

Prerequisites

  • Flutter SDK 3.12+
  • Android Studio / VS Code
  • A Google Gemini API key (get one here)
  • A Google Maps API key (get one here)
  • (Optional) A Liquid Galaxy rig for LG features

Installation

# 1. Clone the repository
git clone https://github.com/LiquidGalaxyLAB/ecogrid-intelligence.git
cd ecogrid-intelligence

# 2. Install dependencies
flutter pub get

# 3. Configure Google Maps API Key
# Open `android/app/src/main/AndroidManifest.xml` and locate line ~40.
# Replace `YOUR_MAPS_API_KEY` with your actual Google Maps API key.

# 4. Run the app
flutter run

Important

API Keys Configuration The Google Maps API key must be added directly into the AndroidManifest.xml file before running the app due to Android's native SDK requirements. The Gemini API key, however, can be configured later directly inside the app at runtime by going to Settings → General → API Keys.

Connecting to Liquid Galaxy

  1. Open the app and navigate to Settings (gear icon)
  2. Enter your LG rig's IP address, SSH port, username, and password
  3. Set the screen count to match your rig
  4. Tap Connect — the status pill will turn green when connected

🛠️ Tech Stack

Layer Technology
Framework Flutter 3.12+ / Dart
State Management flutter_bloc, bloc_concurrency
AI Google Gemini API (native REST)
Maps google_maps_flutter
SSH / LG dartssh2 (SSH + SFTP)
Local DB Drift (SQLite)
Charts fl_chart
DI get_it
Networking Dio
Voice speech_to_text, flutter_tts
Storage flutter_secure_storage, shared_preferences

📂 Key Components

Component Description
LGService Full LG lifecycle — connection, KML deployment, camera control, orbits, tours
SSHService SSH connection with serialization lock and atomic SFTP uploads
KmlUtils KML generation — regions, placemarks, balloons, tours, overlays
CVSCalculator Climate Vulnerability Score engine with fuel-type sensitivity matrix
AnomalyEngine Statistical climate anomaly computation from historical data
RegionBoundaryService Real country borders from Nominatim → 3D extruded KML
GeminiApiService Abstracted Gemini API transport layer

👨‍💻 Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feat/amazing-feature)
  3. Commit your changes (git commit -m 'feat: add amazing feature')
  4. Push to the branch (git push origin feat/amazing-feature)
  5. Open a Pull Request

📜 License

This project is developed as part of Google Summer of Code 2026 under the Liquid Galaxy LAB organization.


Built with ❤️ for Liquid Galaxy LAB — GSoC 2026

About

Bhoomi Shivhare

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages