Skip to content

othmaneechc/fert-recon-map

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fert Recon

React + Vite + Leaflet frontend and FastAPI backend for Morocco fertilizer recommendations and EE-powered maps.

Frontend

npm install
npm run dev           # localhost:5173

Set VITE_API_BASE to point at your backend in prod (defaults to /api locally).

Backend

python -m venv .venv
source .venv/bin/activate
pip install -r server/requirements.txt
uvicorn server.main:app --host 0.0.0.0 --port 8000

Provide EE creds via GOOGLE_APPLICATION_CREDENTIALS (or upload through /api/auth/service-account in the UI). Ensure public/data/fertimap_grid.csv and server/fertimap_rf_models.joblib are present; retrain surrogates with:

python - <<'PY'
from server.fertimap_service import train_local_models
train_local_models()
PY

Deploy hints

  • Frontend: build npm run build (output dist), serve statically; set VITE_API_BASE=https://your-backend.
  • Backend: deploy uvicorn server.main:app (Railway/Fly/Render/etc.), install server/requirements.txt, keep model/data files accessible, add EE auth env vars.

About

Interactive Morocco fertilizer recommendation map: React + Leaflet frontend on Vite, backed by a FastAPI/Earth Engine service with locally trained Fertimap surrogate models for soil-based nutrient recommendations.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors