This workspace contains a minimal React (Vite) frontend and a small Express backend to prototype integrations with Google Earth Engine (GEE).
Quick start (PowerShell) — relative paths
- Frontend
cd frontend
npm install
npm run dev
# open http://localhost:5173- Backend (Express)
cd backend
npm install
npm run start
# listens on http://localhost:3001- Python microservice (optional — recommended for real GEE calls)
cd backend/gee_microservice
python -m venv .venv
. .\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
# set env vars (or copy .env.example -> .env and edit)
$env:GEE_SERVICE_ACCOUNT = 'your-sa@project.iam.gserviceaccount.com'
$env:GEE_PRIVATE_KEY_PATH = 'path\to\service-account.json'
python app.py
# listens on http://localhost:5001Notes
- The frontend proxies
/apito the Express backend (seefrontend/vite.config.js). - The Express backend forwards
/api/ndvito the microservice athttp://localhost:5001/ndviby default. Override viaGEE_MICROSVC_URLenv var. - If the microservice is not running or not configured for GEE, it runs in mock mode and returns a sample GeoJSON so the frontend still works.
Quick tests
# call via express (frontend expects this)
curl http://localhost:3001/api/ndvi
# call microservice directly
curl "http://localhost:5001/ndvi?bbox=-122.45,37.74,-122.4,37.8&dateStart=2020-06-01&dateEnd=2020-08-31"