EcoSentra
Land-cover and ecosystem analysis for Indonesia, built on real satellite data — documented with the same honesty a system needs before anyone should trust it.
Land-cover change moves faster than manual survey can track
Indonesia needs continuous, ground-truthed visibility into land cover and ecosystem health — deforestation, drought, and land-use change don't wait for the next manual survey cycle. Satellite imagery and Google Earth Engine make the raw data available, and machine learning can turn that imagery into land-cover classifications. But turning that into something a decision-maker could actually rely on takes more than a working notebook: it takes an API with access control, a service that survives being deployed, and — just as important — a model that's honest about how good it actually is. That gap, between an ML prototype and infrastructure someone can depend on, is where EcoSentra started.
Built the platform as connected services, not one demo script
As team lead, I structured EcoSentra as a monorepo with pieces that have to work together:
- Frontend + API — a Next.js app with its own backend routes on Firestore: 10 endpoints (fields, alerts, users, and more), all validated with Zod so malformed input gets rejected before it touches the database.
- Geo analysis service — a FastAPI service in Python, the language Google Earth Engine's SDK actually ships in, that takes a coordinate and returns a real land-cover analysis from GEE, with rate limiting so it can't be hammered.
- MCP server — a Model Context Protocol server that exposes that same land-cover lookup as a tool an AI agent can call. It runs in a safe mock mode by default and switches to the real GEE-backed service with a single environment variable.
- ML classification — a SegFormer semantic segmentation model, trained on satellite imagery to classify land cover into 9 classes.
Beyond the code: I wrote a real security checklist, set up a CI pipeline (lint, type-check, build), and cleaned up 41 unused files and 33 unused dependencies left over from the UI starter template. And instead of documentation that describes the intended final product, the README keeps a status table labeling every feature LIVE, PARTIAL, MOCK, or PLANNED — an honest checkpoint, not a feature list.
What's actually working, and what I'm choosing not to hide
Some of this is genuinely working: the interactive map renders real data (including a fix for label clutter at low zoom levels), the Firestore API validates input across nine routes, and the Earth Engine integration is verified working end-to-end locally with rate limiting active. The MCP server's mock/real switch is built and ready — flipping one environment variable is all it takes to point it at the real geo service once that service is deployed.
Some of it isn't there yet, and I'd rather say so than hide it. The SegFormer model's first training run landed at 12–23% pixel accuracy — close to random guessing across 9 classes — so I deliberately have not built the ML-serving API yet; shipping a "working" endpoint backed by a model that isn't accurate would be worse than not shipping one at all. There's no authentication on any of the ten Firestore routes yet, which I've flagged as the top security priority. And there's no automated test suite yet — just one manual script for the Earth Engine connection.
The lesson I take from EcoSentra isn't "I built a finished platform." It's that I know, precisely, which parts of it I'd trust in production and which parts I wouldn't yet — and I built the habit of writing that down instead of letting a demo imply more than what's real.
| Feature | Status | Note |
|---|---|---|
| Interactive map (Leaflet) | Live | Real rendering, including a low-zoom label-clutter fix |
| Firestore API (10 routes) | Live | Zod input validation active; no auth yet |
| Security basics | Live | Input validation, rate limiting, documented audit |
| Land-cover analysis (Earth Engine) | Partial | Verified locally; not yet deployed to production |
| SegFormer land-cover classification | Partial | Trained baseline at 12–23% pixel accuracy — not yet usable |
| CI/CD pipeline | Partial | Lint/type-check/build configured; currently red on missing secrets |
| Dashboard data | Mock | Simulated data, not yet wired to Firestore |
| MCP land-cover tool | Mock | Architecture ready; one env var away from real data |
| ML model serving API | Planned | Intentionally not built until model accuracy is usable |
| Automated tests | Planned | Zero test suites; one manual script exists |
| Authentication | Planned | Top priority on the security roadmap |
A few of the calls, and their trade-offs
| Technology | Why | Trade-off |
|---|---|---|
| Next.js | One framework for frontend + lightweight API routes | Server and client code share an app — needs folder discipline to avoid leaking server-only code to the client |
| FastAPI (Python) | Python is Earth Engine's official SDK language | A second language in the monorepo, with its own venv/Docker setup |
| Firebase / Firestore | Fast MVP setup, no database server to manage | Admin SDK bypasses Firestore Security Rules — access control has to live in the API layer, which has no auth yet |
| MCP (Model Context Protocol) | Lets the geo service be called as a tool by an AI agent | Still a young standard with a smaller tooling ecosystem than plain REST |
| SegFormer | Lightweight semantic segmentation model for land-cover classification | Needs real GPU time to train well — the first run shows that effort hasn't happened yet |
Want to talk through how this gets from prototype to production?
Happy to walk through the architecture, the security checklist, or where the model training goes next.
Email me →