Geospatial Platform Backend
The backend of a regional government plantation-management platform: a spatial API that maps every plantation parcel, tracks commodities and farmer groups, ingests field pest reports, and publishes interactive map layers — backed by PostGIS, served as GeoJSON and Mapbox Vector Tiles, and paired with a Hasura GraphQL data layer, JWT/Google auth, and object storage. (Built as a government client project; my role was backend engineering.)
What it does (backend). The platform helps a regional plantation authority see and manage its crops spatially. The backend exposes the data and geometry behind that: it serves map-ready geospatial layers of plantation parcels (crop type, yield, planting method), accepts and stores field pest reports with their locations, manages commodity price data, and handles public-facing inputs (suggestions / comments) plus the various sub-apps the authority runs (Service Portal, Info Portal). Spatial data is delivered both as GeoJSON feature collections (for detail/overlay) and as Mapbox Vector Tiles generated directly in the database (for fast, zoomable maps).
A plantation authority's data is inherently spatial and operational, and off-the-shelf tooling didn't fit:
FeatureCollections via
ST_AsGeoJSON + json_build_object/json_agg, filterable by village/commodity/pest so the
frontend can overlay exactly what it needs.z/x/y tiles straight from PostGIS
(ST_AsMVT + ST_AsMVTGeom + ST_TileEnvelope, with SRID auto-detected via Find_SRID and
reprojection to 3857) for fast, scalable web maps.| Layer | Technologies |
|---|---|
| API | FastAPI, Uvicorn, Pydantic, CORS |
| Database | PostgreSQL + PostGIS, asyncpg async pool |
| Geospatial | ST_AsGeoJSON, ST_AsMVT / ST_AsMVTGeom / ST_TileEnvelope, Find_SRID, reprojection (3857) |
| GraphQL | Hasura (tracked tables, allow-list, query collections, cron triggers, actions) |
| Auth | JWT (PyJWT), passlib password hashing, Google OAuth (Authlib) |
| Storage / files | MinIO object storage, presigned URLs, aiofiles, multipart uploads |
aiosmtplib async SMTP mailer | |
| Infra | Docker / docker-compose, GitHub Actions CI/CD, Poetry |
The backend in one glance: PostGIS is the source of truth; FastAPI serves spatial + app data and Hasura serves relational CRUD to the maps and apps.
Disclaimer: sample visuals may contain anonymized, simulated, or non-production values for presentation purposes.