← projects

Soil health · AI · IoT · Agtech

TerraSensus

Soil health is invisible until it's catastrophic. TerraSensus makes it continuous — sensor monitoring, AI crop recommendations, and instant critical alerts for farmers who can't afford to be wrong.

FastAPIReact NativeGCPVertex AIPub/SubBigQuerydbtPostgreSQLTerraform
GitHubIn progress

🌱 The Problem

💧

30–50%

of applied nitrogen never reaches the crop — leaches into groundwater or volatilises as N₂O

🌍

265×

more potent than CO₂ — nitrous oxide from over-fertilisation accounts for 6% of global greenhouse gas emissions

💰

$12,500

average annual savings on a 200 ha farm through precision application — from a $50,000 fertiliser budget

🪴 Most farmers apply fertiliser by habit, by last season's results, or by blanket agronomic guidelines — not by what is actually in their soil right now. Soil composition changes with weather, crop rotation, microbial activity, and drainage. A field that needed heavy nitrogen last autumn may have adequate levels this spring.

♻️ The ecological cost is externalised — paid by rivers, insects, and future generations. Agricultural runoff is a leading cause of freshwater dead zones. TerraSensus makes that cost visible and attributable, season by season, field by field.

⚠️ The harder problem: one-size fertiliser rules don't work. Every crop has a different relationship with nitrogen, salinity, and pH — what looks like a deficiency on a generic chart is a perfectly healthy reading for the right variety. A system that fires the same alerts regardless of what's growing is worse than no system at all. Three real plots illustrate why, below.

🗺️ Three Plots, Three Realities

🍉

Mykola

Kherson Oblast, Ukraine

Watermelon (GI protected) · Sandy chernozem · Continental

Watermelons need high potassium to develop fruit — but too much nitrogen and the plant puts all its energy into leaves instead. Generic fertiliser guidelines would over-apply nitrogen here and ruin the crop. Kherson watermelons are also culturally significant — they became a symbol of Ukrainian resilience during the occupation.

🌾

Fatima

Ferghana Valley, Uzbekistan

Cotton · Arid desert, saline irrigation · Arid

Cotton naturally tolerates high salt levels in the soil — levels that would kill most other crops. So when TerraSensus reads high salinity on Fatima's field, it's not an emergency. A generic alert system would fire a warning here every single day, on a perfectly healthy field.

🍇

Elena

Willamette Valley, Oregon

Pinot Noir · Volcanic Jory loam · Maritime

Great wine grapes actually need low nitrogen — too much and the vine grows lush leaves instead of concentrating flavour into the fruit. Elena's soil readings look like a deficiency on any standard chart. They're not. This is exactly what a healthy Pinot Noir vineyard looks like.

🤖 AI Usage Policy

🚨 AI never touches a critical alert

Rule-based engine only — synchronous, local, zero network. A farmer in a drought cannot wait for an API call.

🧾 AI never touches financial calculations

ROI, savings, spend totals are deterministic SQL/Python. Numbers affecting livelihoods are not estimated.

🔍 Every AI response shows its source

Model name, agronomist disclaimer, flag button — visible on every recommendation. TerraSensus is a decision support tool, not a decision maker.

🌿 Crop-aware thresholds, not global defaults

Pinot Noir runs intentionally low N. Cotton tolerates high EC. Watermelon needs high K. Global defaults create false alarms on healthy fields.

🏗️ Stack

📱 Mobile

React Native (Expo)

iOS-first, farmers in the field

🌐 Web

Next.js

Admin dashboard, analytics

⚙️ Backend

FastAPI (Python)

4 microservices on Cloud Run

📡 Queue

GCP Pub/Sub

Sensor telemetry pipeline

🗄️ Operational DB

Cloud SQL (PostgreSQL)

Sensor readings, logs, plots

📊 Analytics DB

BigQuery + dbt

ELT via Datastream, mart tables

🤖 AI

Vertex AI (Gemini Pro)

Fallback: Claude Sonnet → rule-based

📄 Documents

Google Document AI

Lab report parsing + Gemini Vision fallback

🔔 Alerts

Firebase Cloud Messaging

Push to mobile, rule-based only — no AI

🏗️ Infra

Terraform

Cloud Run, Cloud SQL, BigQuery, Pub/Sub, GCS — all provisioned as code

📍 Status

Phase 1Simulation + alert engine + CI
Phase 2Ingestion service + Cloud SQL schema
Phase 3Mobile app + AI recommendations
Phase 4GCP deploy + real Vertex AI integration
FuturePySensorMQTT — real hardware sensors

Cover artwork via ArtStation