Skip to content

Latest commit

 

History

History
101 lines (71 loc) · 6.45 KB

File metadata and controls

101 lines (71 loc) · 6.45 KB

Canopy

Canopy is a blockchain-based forest registry platform that enables users to register and verify forest areas using satellite imagery. The platform combines blockchain technology with remote sensing to provide transparent and verifiable forest registration with NDVI (Normalized Difference Vegetation Index) computation for forest health assessment.

Overview

Canopy allows forest owners to register their forest areas on the blockchain, with each registration including geographic boundaries, area measurements, and ownership information. The system uses Google Earth Engine to compute NDVI values from Sentinel-2 satellite imagery, providing scientific verification of forest health and coverage.

Architecture

The project consists of three main components:

  • Client: A React-based frontend application that provides the user interface for forest registration and management
  • Server: A Node.js Express API server that handles forest registration, user management, and coordinates with the Python service for NDVI computation
  • Python Service: A FastAPI service that interfaces with Google Earth Engine to compute NDVI values from satellite imagery
  • Smart Contracts: Solidity contracts for forest registry and carbon credit NFT management on the blockchain

Features

  • Forest registration with blockchain verification
  • NDVI computation using Google Earth Engine and Sentinel-2 satellite imagery
  • User management and forest ownership tracking
  • Geographic boundary validation using geohash encoding
  • Carbon credit NFT integration

Technology Stack

Backend

  • Node.js with Express
  • PostgreSQL with Drizzle ORM
  • Ethers.js for blockchain interactions

Python Service

  • FastAPI
  • Google Earth Engine API
  • Sentinel-2 satellite imagery processing

Frontend

  • React
  • Web3 wallet integration

Blockchain

  • Solidity smart contracts
  • Hardhat development environment

Getting Started

Prerequisites

  • Node.js and npm
  • Python 3.x
  • PostgreSQL database
  • Google Earth Engine account and authentication
  • Ethereum wallet and RPC endpoint

Installation

  1. Clone the repository

  2. Install server dependencies:

    cd server
    npm install
  3. Install Python dependencies:

    cd python
    pip install -r requirements.txt
  4. Set up environment variables for both server and Python service

  5. Configure database connection and run migrations

  6. Authenticate with Google Earth Engine for the Python service

Running the Application

Start the Node.js server:

cd server
npm run dev

Start the Python FastAPI service:

cd python
uvicorn app.main:app --reload

The server runs on port 3000 and the Python service runs on port 8000 by default.

API Endpoints

The server provides REST API endpoints for forest registration and NDVI computation. The Python service exposes endpoints for satellite imagery processing and NDVI calculation.

Database Schema

The system uses PostgreSQL to store user information and forest registration data, including forest IDs, ownership addresses, geographic boundaries, and transaction hashes from blockchain registrations.

License

ISC