ENGINEERING CASE STUDY · DATA & GEOSPATIAL
Land Quality API
Engineering case study.
DJANGO · DJANGO REST FRAMEWORK · SIMPLEJWT · POSTGRESQL · POSTGIS · DOCKER COMPOSE
A JWT-secured REST API for land owners, parcels and soil quality assessments.
- Role
- Backend developer
- Type
- REST API, later used by a Kenyan land-sales company
- Status
- In use by a company selling land in Kenya
- Source
- Base project public; client-modified components private
01 / OVERVIEW
The project
A Django REST backend for land management. It models owners, land parcels and soil quality assessments behind JWT authentication, and ships with environment-based configuration and a Docker Compose setup for the API and its PostgreSQL database. The API was later used by a company that sells land in Kenya. The public repository contains the base project only; the components completed or modified for that company are privately owned and cannot be shared.
02 / ARCHITECTURE
How it fits together
How an authenticated client reaches the land records API and its PostgreSQL database.
CONSUMER
API client
Any application or service that manages land records, using a bearer token on each request.
Sends to: JWT authentication
Based on the published repository. The coordinate-analysis prototype is not part of it.
03 / CONTRIBUTION
My contribution
- Modelled owners, land parcels and quality assessments (pH level, moisture content, nutrient levels and a quality score) with relational links between them.
- Exposed CRUD REST endpoints with Django REST Framework viewsets and a router, secured by JWT token issue and refresh.
- Moved secrets and database settings into environment variables, with an example configuration file and a Docker Compose stack.
- Documented the API with an endpoint reference, data model diagram and quick-start requests in the repository README.
04 / ENGINEERING
Engineering notes
- Every land-records endpoint requires authentication, so data is not exposed publicly by default.
- Serializers and viewsets keep the API thin: validation and persistence stay in the Django models and DRF layers.
- The coordinate-analysis prototype separates analysis and tokens into their own apps. Its geospatial retrieval step returns placeholder values, and integrations with OpenStreetMap, NASA Earthdata and Google Earth Engine are planned, not claimed as complete.
TECHNOLOGY
Tools selected for the work.
- Django and Django REST Framework. Django's ORM, admin and security defaults give a reliable data layer quickly, and DRF's viewsets and serializers turn models into a consistent REST API with little boilerplate.
- SimpleJWT. Stateless tokens let any client, such as a web or mobile app, authenticate against the API without server-side sessions.
- PostgreSQL. Land, owner and assessment data is relational, and PostgreSQL offers strong integrity guarantees and a path to PostGIS if spatial queries are needed.
- Docker Compose. Runs the API and its database together the same way on every machine, which made handover and deployment simpler.