First-mile transparency and traceability on the edge: integrating traceability and AI-powered monitoring to deliver actionable insights on verification, risk, and quality
This repository contains the public release of a first-mile seafood traceability system designed to make the earliest stage of the seafood supply chain more transparent, verifiable, and useful to downstream buyers.
The system combines RFID tagging, onboard sensor data, and outputs from an AI-powered electronic monitoring (EM) system to generate fish-level traceability records. These records connect catch events with handling, storage, location, and sustainability information.
It can:
- create fish-level traceability records from RFID scan events
- connect each fish to onboard handling, storage, and location data
- integrate outputs from an AI-powered electronic monitoring system
- organize records into trips and fishing sets
- derive quality and sustainability indicators for downstream use
- store and manage traceability data in PostgreSQL
- prepare structured outputs for downstream traceability platforms such as Wholechain
This repository is closely related to the open-source project Monitoring fishing activity on the edge: mobilizing AI and edge technologies to advance near real-time electronic monitoring footage review, which provides the AI-powered electronic monitoring system used to generate the sustainability-related outputs integrated here.
While this repository focuses on the traceability and data-integration layer, the related repository focuses on the AI-powered EM layer, including onboard catch detection, counting, classification, and automated daily reporting.
Together, the two repositories show how onboard monitoring and first-mile traceability can be connected to produce fish-level records that link catch events, handling data, and sustainability information.
🔗 Companion repository: Monitoring fishing activity on the edge
🔗 Companion report: Report: Monitoring fishing activity on the edge
This repository is intended as a reusable reference implementation for first-mile seafood traceability. It can be adapted to different vessels, fisheries, hardware setups, and downstream supply-chain workflows.
The pilot deployment used RFID tags and readers, temperature sensing, and integrations with an existing EM system. Those specific hardware and service choices are not requirements of the overall approach. This implementation is shared as an example and can be adapted to other devices, providers, and downstream platforms, as long as equivalent data can be captured and mapped into the workflow.
This repository is made available under a custom license. See the LICENSE file for the full terms.
FastAPI service for capturing RFID tag reads, exposing operational endpoints, and supporting trip finalization workflows.
📘 See
traceability/traceability_api/README.mdfor endpoints, request formats, and API module details.
Database layer for the traceability system, including schema definitions, connection utilities, initialization, and core database operations.
Main integration logic that consolidates and enriches fish-level records using supporting data such as GPS, temperature, trip, and sustainability-related inputs.
📘 See
traceability/database/README.mdfor schema definitions and core database operations.
Integration layer for packaging and sending structured traceability outputs to downstream platforms such as Wholechain.
📘 See
traceability/README.mdfor package structure, pipeline flow, and configuration notes.
Shared supporting modules for configuration, logging, geospatial calculations, and storage/export helpers.
Docker and Docker Compose configuration for running PostgreSQL, initializing the database schema, and starting the API.
Repository documentation, including the top-level README and module-level READMEs.
The full technical report provides end-to-end details on the traceability system, including workflow, hardware setup, data model, and pilot results:
📥 Download Technical Report (PDF)
Docker Compose can be used to run PostgreSQL, initialize the database schema, and start the API locally.
This repository provides the traceability and integration layer, but it depends on external systems and data sources to execute the full workflow end to end.
- Docker and Docker Compose installed on your system
- a
.envfile with the required configuration values - access to the following external systems and data sources:
- LICOR Cloud API for temperature logger data
- Wholechain API for downstream traceability export
- an AI-powered electronic monitoring system that generates sustainability-related outputs
- an S3 bucket (or equivalent object storage) for CSV exports
- a coastline GeoJSON file for distance-to-coast calculations
Build the container image from the root directory:
docker compose build
docker compose up -d
docker compose psdocker compose logs -f api
docker compose logs -f postgres