TerraMind is an AI-powered environmental intelligence platform that helps farmers, researchers, and policymakers monitor, analyze, and predict land and crop health using satellite imagery, climate data, and machine learning
- Interactive Map Interface: Draw circular Areas of Interest (AOI) on satellite imagery
- Dual Image Analysis: Compare current vs. 12-month-old satellite images
- AI-Powered Analysis:
- AgroVision: Vegetation health, NDVI/NDWI analysis, crop stress detection
- EcoGuard: Deforestation and land degradation detection
- ClimaRisk: Weather risk prediction using climate data
- Predictive Analytics: LSTM/Prophet models for future vegetation conditions
- Automated Insights: AI-generated recommendations and eco-actions
- PDF Reports: Comprehensive reports with maps, analysis, and recommendations
terramind/
├── frontend/ # react + leaflet + tailwindCSS
│ ├── src/
│ │ ├── components/ # react components
│ │ ├── App.js # main application
│ │ └── index.js # entry point
│ ├── public/ # static assets
│ └── package.json # dependencies
├── backend/ # FastAPI + AI/ML modules
│ ├── modules/ # AI analysis modules
│ │ ├── agrovision.py # vegetation analysis
│ │ ├── ecoguard.py # environmental monitoring
│ │ ├── climarisk.py # climate risk assessment
│ │ ├── insight_engine.py # recommendations
│ │ ├── satellite_api.py # satellite imagery
│ │ └── report_generator.py # PDF reports
│ ├── main.py # FastAPI application
│ └── requirements.txt # python dependencies
├── models/ # pre-trained AI models
├── data/ # sample data and cache
├── reports/ # generated PDF reports
├── docker-compose.yml # docker configuration
├── setup.sh # linux/mac setup script
├── setup.bat # windows setup script
└── README.md # this file
Linux/Mac:
chmod +x setup.sh
./setup.shWindows:
setup.bat- Python 3.8+
- Node.js 16+
- Git
cd backend
python -m venv venv
source venv/bin/activate # on windows: venv\Scripts\activate
pip install -r requirements.txt
uvicorn main:app --reloadcd frontend
npm install
npm start- Copy
backend/env.exampletobackend/.env - Update with your API keys:
OPENWEATHER_API_KEY: Get from OpenWeatherMapSENTINEL_HUB_KEY: Get from Sentinel HubLANDSAT_API_KEY: Get from USGS
docker-compose up- U-Net Segmentation: Vegetation area detection
- NDVI/NDWI Analysis: Vegetation and water content assessment
- Crop Stress Detection: Health monitoring and stress indicators
- Predictive Modeling: Future vegetation condition forecasting
- Land Degradation Detection: Soil health and erosion monitoring
- Deforestation Analysis: Illegal clearing and forest loss detection
- Pollution Assessment: Water and air quality indicators
- Environmental Health Scoring: Overall ecosystem health metrics
- Drought Risk Assessment: Water stress prediction
- Flood Risk Analysis: Precipitation and runoff modeling
- Heat Stress Monitoring: Temperature impact on crops
- Weather Forecasting: Short and long-term climate predictions
- Contextual Recommendations: AI-generated action items
- Risk Prioritization: Urgent vs. long-term interventions
- Sustainable Practices: Eco-friendly farming suggestions
- Predictive Insights: Future condition recommendations
- React 18: Modern UI framework
- Leaflet.js: Interactive mapping
- TailwindCSS: Utility-first styling
- Chart.js: Data visualization
- Lucide React: Icon library
- FastAPI: High-performance Python web framework
- PyTorch: Deep learning models
- OpenCV: Computer vision processing
- NumPy/Pandas: Data manipulation
- ReportLab: PDF generation
- Sentinel Hub: High-resolution satellite imagery
- Landsat: Historical satellite data
- OpenWeatherMap: Climate and weather data
- Custom AI Models: Trained on agricultural datasets
- Select Area of Interest: Draw a circular area on the map
- Run Analysis: Click "Analyze Area" to start AI processing
- View Results: Explore vegetation, climate, and environmental insights
- Download Report: Generate comprehensive PDF reports
- Take Action: Follow AI-generated recommendations
GET /- API informationPOST /analyze- Analyze AOIGET /analysis/{aoi_id}- Get analysis resultsGET /report/{aoi_id}- Download PDF reportGET /satellite/imagery- Get satellite imageryGET /climate/forecast- Get climate forecast
# build and run with docker compose
docker-compose up --build
# or run individual services
docker-compose up backend
docker-compose up frontendcd backend
source venv/bin/activate
uvicorn main:app --reload --host 0.0.0.0 --port 8000cd frontend
npm startVisit http://localhost:8000/docs for interactive API documentation
TerraMind transforms agricultural monitoring from reactive to predictive by:
- Reducing Waste: Early detection of crop stress and disease
- Improving Yield: Optimized planting and irrigation recommendations
- Protecting Ecosystems: Environmental monitoring and conservation
- Enabling Sustainability: Data-driven farming decisions
- Supporting Policy: Evidence-based environmental management
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License, see the LICENSE file for details
- Satellite imagery providers (Sentinel Hub, Landsat)
- Weather data providers (OpenWeatherMap)
- Open source AI/ML libraries (PyTorch, TensorFlow)
- Mapping libraries (Leaflet.js)
- The agricultural and environmental research community
TerraMind is my biggest project yet and my first fullstack ai powered app and it was designed on the hopes that i win the local hackathon my uni organized sooo fingers crossed
didn't win but i mean we built TerraMind either way so it's still a win for me <3







