Skip to content

Latest commit

 

History

History
102 lines (74 loc) · 1.84 KB

File metadata and controls

102 lines (74 loc) · 1.84 KB

Installation Guide

This project has two parts:

  • Client (React + Vite)
  • Server (Flask + Google Earth Engine)

1. Clone and open project

git clone https://github.com/shivamm-verma/Earth-Resource-Monitor.git
cd Earth-Resource-Monitor

2. Server setup (Python + venv)

Create virtual environment

Windows (PowerShell):

cd Server
python -m venv .venv
.\.venv\Scripts\Activate.ps1

Windows (CMD):

cd Server
python -m venv .venv
.venv\Scripts\activate.bat

macOS/Linux:

cd Server
python3 -m venv .venv
source .venv/bin/activate

Install backend dependencies

pip install -r requirements.txt

Configure environment variables

  1. Copy the example file:
cp .env.example .env

On Windows PowerShell, use:

Copy-Item .env.example .env
  1. Open .env and fill values using your Google service account key details.

Important for GEE_PRIVATE_KEY:

  • Keep it in one line.
  • Replace line breaks with \\n.

Run backend

python app.py

Backend runs on: http://localhost:5000

3. Client setup (React)

In a new terminal:

cd Client
npm install
npm run dev

Frontend runs on: http://localhost:5173

4. Deactivate virtual environment

deactivate

  • Example fetch url: (Local)
http://127.0.0.1:5000/api/vegetation?lat=28.61&lon=77.20&start_date=2023-01-01&end_date=2023-12-31

Link to above 1

  • Example fetch url: (Deployed)
https://earth-resource-monitor-backend.onrender.com/api/vegetation?lat=28.61&lon=77.20&start_date=2023-01-01&end_date=2023-12-31

Link to above 2