Senior Project · Mahidol University
Thai Cattle Passport
A cattle passport app giving every animal a verifiable identity and a health record that follows it to its next owner. I built the marketplace, the auth flow, and the QR-linked public profile.
Sep 2025 — May 2026
- Flutter
- Dart
- Riverpod
- go_router
- Supabase
- PostgreSQL
- Google Maps
- QR & Camera
- Screens in the app
- 25+
- Verification accuracy
- 94.6%
- AUC
- > 0.94
- People on the team
- 3
Overview
Cattle in Thailand change hands often, and the animal's history — vaccinations, treatments, previous owners — tends not to travel with it. A buyer takes the seller's word for it, because there is no record to check.
Thai Cattle Passport gives every animal a verifiable identity and a health record that follows it. The identity is the animal itself: a ConvNeXt-Tiny model served over REST decides whether two photos show the same cow, rather than trusting an ear tag that can be swapped or lost.
Three of us built it over the final year of the degree. My part was everything around the transaction — who owns the animal, who wants to buy it, and how a stranger checks its history before agreeing to anything.
What I did
- Built the marketplace: listings, filtering, seller and farm details, offer tracking, and the ownership-transfer flow including foster arrangements.
- Designed the Supabase (Postgres) data model behind the features I built — owners, animals, listings, offers, ownership transfers and foster arrangements, and the activity history each animal carries.
- Implemented authentication end to end — login, registration, and password recovery with deep links back into the app.
- Built the QR passport: a public read-only cattle profile that opens straight from a scan, plus the in-app scanner and QR export to the photo library.
- Built the multi-step camera capture flow and image import used to register an animal's reference photos.
- Worked on the identification model with the team — a ConvNeXt-Tiny trained on 1,026 images of 43 animals, averaging 94.6% accuracy and AUC above 0.94 over five folds.
Key features
QR health passports
Each animal carries a QR code that resolves to a read-only profile of its health record. A buyer or vet scans it and reads the history — no app install, no account, no permission from the seller.
Ownership-transfer marketplace
Owners list cattle, receive offers, and transfer ownership — moving the animal's full record to the new owner along with it. Foster arrangements are handled as their own status, since an animal in someone else's care has not actually changed hands.
AI cattle identification
Two photos go to the model and come back as a same-animal or different-animal answer. Because it compares learned embeddings rather than picking from a fixed list, it works on cattle it was never trained on — the only thing that can work on a farm that registers new animals every month.
Multi-step animal registration
A guided capture flow walks the owner through photographing a new animal from the angles the identification model needs, with import from the gallery as a fallback.
Screens





