Skip to content

mianjunaid1223/EcoSync

Repository files navigation

🌍 EcoSync - From EarthData to Action: Forecasting Cleaner, Safer Skies

NASA Space Apps 2025 License

A cutting-edge MERN-based web application for NASA Space Apps Challenge 2025 that integrates real-time atmospheric data visualization with AI-powered insights to forecast air quality and weather patterns.

🚀 Features

🗺️ Interactive Map Visualization

  • Deck.gl Integration: High-performance WebGL-powered visualization layers
  • Multiple Layer Types: Heatmap, Scatterplot, GeoJSON, Text, and Arc layers
  • MapBox Base Map: Beautiful dark-themed satellite imagery with @vis.gl/react-google-maps

📊 Dynamic Data Overlays

Fetch and visualize real-time data from NASA POWER API:

  • T2M → Temperature (°C)
  • RH2M → Relative Humidity (%)
  • PRECTOT → Precipitation (mm/day)
  • WS2M → Wind Speed (m/s)
  • PS → Surface Pressure (kPa)
  • AOD_55 → Aerosol Optical Depth (Air Quality)

🤖 AI Assistant (Gemini 2.5 Flash)

  • Natural language query processing
  • Automatic location detection
  • Real-time data fetching
  • Context-aware responses

🛠️ Tech Stack

Frontend: React.js + Deck.gl + Google Maps (@vis.gl/react-google-maps) + Vite Backend: Node.js + Express.js + MongoDB AI: Google Gemini 2.5 Flash API: NASA POWER API

� Backend API Links

Base URL: http://localhost:5000

  • Health Check: GET /health
  • NASA Point Data: GET /api/nasa/data?lat=31.5497&lon=74.3436&parameters=T2M,RH2M
  • NASA Regional Data: GET /api/nasa/regional?latMin=31&latMax=32&lonMin=74&lonMax=75&parameters=T2M
  • AI Query: POST /api/ai/query (Body: {"query": "Show air quality in Lahore"})
  • Cities List: GET /api/ai/cities
  • Query History: GET /api/queries

See API_ENDPOINTS.md for complete documentation.

📄 Documentation

�🚀 Quick Start

Prerequisites

Installation

  1. Clone & Install
git clone https://github.com/mianjunaid1223/EcoSync.git
cd EcoSync

# Install backend dependencies
cd server
npm install

# Install frontend dependencies
cd ../client
npm install
  1. Configure Environment Variables

Create server/.env:

GEMINI_API_KEY=your_gemini_api_key
MONGODB_URI=mongodb://localhost:27017/ecosync
PORT=5000

Create client/.env:

VITE_GOOGLE_MAPS_API_KEY=your_google_maps_api_key
VITE_API_URL=http://localhost:5000
  1. Start the Application

Terminal 1 - Backend:

cd server
npm run dev

Terminal 2 - Frontend:

cd client
npm run build
  1. Open Browser Navigate to: http://localhost:5173

📁 Project Structure

EcoSync/
├── client/                 # React frontend
│   ├── src/
│   │   ├── components/
│   │   │   ├── ai/        # AI Assistant
│   │   │   ├── map/       # Map Visualization
│   │   │   └── ui/        # UI Components
│   │   ├── App.jsx
│   │   └── main.jsx
│   └── package.json
│
├── server/                 # Node.js backend
│   ├── models/            # MongoDB models
│   ├── routes/            # API routes
│   ├── server.js
│   └── package.json
│
├── WORK_PORTFOLIO.md       # Comprehensive work portfolio
├── WORK_PORTFOLIO.pdf      # PDF version of portfolio
└── README.md

🎯 API Endpoints

Get NASA Data

GET /api/nasa/data?lat=31.5497&lon=74.3436&parameters=T2M,RH2M,AOD_55

AI Query

POST /api/ai/query
Body: { "query": "Show me air quality in Lahore" }

💡 Usage Examples

AI Queries:

  • "Show me air quality in Lahore"
  • "Compare humidity and temperature in Tokyo"
  • "What's the wind speed in New York?"

👥 Authors

📄 License

ISC License - see LICENSE file

🙏 Acknowledgments

  • NASA POWER API
  • Google Gemini
  • Google Maps Platform
  • Deck.gl
  • vis.gl

Built with ❤️ for NASA Space Apps Challenge 2025

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •