Skip to content
tanakornk.me
← All projects
In progressPrivate repository

RiceWatch.

Satellite-based early warning for rice fields across a whole district

Role
Backend + Google Earth Engine
Year
In progress · Team of 3
Links
Private repository

The source code is private, so this page describes the project at a high level only.

Overview

A web application for government agriculture officers in Dok Khamtai, Phayao. It scans every rice field in the district with Sentinel-2 imagery, flags areas whose vegetation and water indices drop abnormally compared with a 5-season baseline, ranks them into a field-survey queue, and alerts officers through LINE and email. It grew out of an earlier per-field prototype (FastAPI + PostGIS + Earth Engine).

What I did

  • Developed a 17-step Google Earth Engine pipeline that turns Sentinel-2 imagery into NDVI/EVI/NDWI anomaly maps for 158,567 rai (31,392 grid cells, 12 sub-districts).
  • Built the FastAPI + PostGIS backend with JWT cookie auth, audit logging and LINE/email alerts, sharing generated OpenAPI types with the Next.js frontend.
  • Automated quality gates in a 6-job GitHub Actions pipeline: linting, architecture checks, containerised tests, Playwright E2E and a Docker Compose smoke test over HTTPS.
  • Containerised 6 services (Caddy, web, API, worker, PostGIS, backup) with pinned images and env-only secrets, backed by 680+ automated test cases.

Tech stack

  • FastAPI
  • Python
  • PostgreSQL
  • PostGIS
  • Google Earth Engine
  • Next.js
  • TypeScript
  • Tailwind CSS
  • MapLibre GL
  • Docker
  • GitHub Actions
  • Caddy
  • Playwright
  • pytest