Logo Lanfrica

kigsCo/vuna-verify-backend

Domaine:

environment and energygeospatial

Type de record:

software
Créateur:
kig
Hôte:
Django REST backend for forest-carbon MRV in Kenya - GOSIF-based carbon-flux prediction over gazetted forests. 1st place, UoN EO Hackathon 2026. # VunaVerify Backend Django backend for forest-carbon MRV (monitoring, reporting, verification) in Kenya: it serves gazetted-forest boundaries, project records, and a hybrid GOSIF-based carbon-flux prediction API. ## Overview VunaVerify estimates carbon flux and the resulting CO2 sequestration and credit value for forest sites from satellite imagery. This backend exposes a REST API (Django + Django REST Framework) that lists monitored projects with their map boundaries and runs a prediction model over an uploaded or remote GeoTIFF to return carbon-flux, annual-tonnes-CO2, and estimated-revenue figures. It is intended for the project team and frontends (the interactive map) building carbon-monitoring tooling for Kenyan forests. ## Features / API All API routes are mounted under `/api/` (see `verifier/urls.py` and `vuna_backend/urls.py`). - `GET /api/projects/` — `ProjectListView`. Returns all `Project` records (id, name, latitude, longitude, `tiff_file`, cached flux/CO2/revenue, `geojson_boundary`, `updated_at`) for the interactive map. - `POST /api/verify/` — `VerifyCreditView`. Accepts a GeoTIFF as `image_file` (upload) or `image_url`, plus optional project metadata. It runs the `VunaVerifier` model and returns the prediction. The request is validated by `VerificationInputSerializer`, which requires either `image_file` or `image_url`. - Optional fields: `project_id` (update an existing project), or `project_name` + `latitude` + `longitude` (create a new project on the fly). - On success the prediction is cached onto the `Project` and the response is: ```json { "status": "success", "carbon_flux": 0.0, "annual_tonnes_co2": 0.0, "estimated_revenue_usd": 0.0, "project_id": 1 } ``` - The current view requires project details (name, lat, lon) or an existing `project_id` so the result can be saved; a bare file upload with no project target is rejected. - `GET /api/map/` — `map_view`. Renders the `verifier/map.html` template (interactive map page). - `GET /admin/` — …