8000
Skip to content

Repository files navigation

Where Is My Forest

A Real-Time Deforestation Tracking & Community Reforestation Platform.

React Supabase Tailwind CSS Vite License: MIT PRs Welcome



Where Is My Forest is an open-source platform designed to provide rigorous data transparency regarding forest cover and environmental incidents. The system aggregates real-time satellite data with community-verified reforestation efforts.

We maintain a strict focus on system reliability, spatial data accuracy, and minimal operational overhead for self-hosting.

Core Capabilities

  • Interactive Geographic Tracking: Visualizing localized forest data and real-time incident heatmaps across multiple parameters utilizing Leaflet.
  • Incident Reporting Pipeline: A scalable event queue for tracking illegal logging, forest fires, poaching, and pollution metrics.
  • AI-Verified Validation Layer: Multi-modal analysis pipelines (via OpenRouter inference endpoints) to probabilistically validate field submissions.
  • Real-Time Data Ingestion: Serverless edge functions orchestrating periodic ETL pipelines from Global Forest Watch (GFW), NASA FIRMS, and continuous news sources.

System Architecture

The platform implements a decoupled, event-driven architecture optimized for local development and rapid iteration:

  • Client Application: React 19 bootstrapped via Vite for optimal HMR. Interface styling relies strictly on Tailwind CSS utilities, with complex layout animations handled by Framer Motion. Dataviz is implemented via Recharts.
  • Data Layer (Supabase):
    • Relational Store: PostgreSQL engine enforcing strict Row Level Security (RLS) constraints for read/write access.
    • Event Pub/Sub: Realtime subscriptions providing websocket-based mutation broadcasts for specific tables.
    • Object Storage: Secured S3-compatible buckets with mime-type validations for media submissions.
    • Compute: Deno-backed edge runtime executing periodic external API polling and payload generation.
  • External Dependencies: OpenRouter REST API for multimodal inference; NASA FIRMS spatial endpoints.

Local Development Environment

1. Prerequisites

Ensure the following binaries are available in your system path:

  • Node.js (v18 or higher)
  • A configured Supabase project or local Supabase CLI installation
  • An active OpenRouter API token (required for inference routes)

2. Environment Configuration

Clone the repository and install workspace dependencies:

git clone https://github.com/WhereIsMyForest/WhereIsMyForest.git
cd WhereIsMyForest
npm i

Provision your local environment variables based on the reference schema:

cp .env.example .env

Ensure you explicitly declare the VITE_SUPABASE_URL and VITE_SUPABASE_ANON_KEY variables in .env.

3. Database schema Initialization

Execute the reference schema against your targeted Supabase Postgres instance:

  1. Access your target database's SQL editor interface.
  2. Execute the entire content of supabase/schema.sql. The script is idempotent and resolves requisite extensions, relations, RLS definitions, constraints, and mock seed data.

4. Running the Client

npm run dev

The application server binds to http://localhost:5173 locally.


Contributing

All contributors are expected to adhere to standard maintainability metrics. Whether optimizing queries, extending GIS coverage, or resolving defects, patches are accepted through standard GitHub pull requests.

Review the Contributing Guidelines to initialize your workflow, conform to branch prefix conventions, and understand code review requirements.


Issue Tracking

  • Defects: Execute the Bug Report Template with explicit reproduction paths.
  • Enhancements: Draft specifications utilizing the Feature Request Template. Feature proposals require maintainer consensus prior to merged branches.

License

This project relies upon the MIT License.

About

An AI-powered, open-source dashboard mapping deforestation and community tree-planting efforts across India in real-time. Built with React, Vite, and Supabase. Lets make it a new movement

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0