GitHub - agstack/inatrace: INATrace β€” Open-source blockchain-based track and trace for agricultural supply chains. Meta repo linking backend, frontend, mobile, and blockchain components.


πŸ“Œ About This Repository

This is the INATrace meta repository β€” the central hub for project-wide documentation, governance, technical specifications, and cross-repo coordination.

Source code lives in the four dedicated component repositories (listed below). This repo is the canonical home for everything that spans the full project:

What lives here Purpose
πŸ“‹ Project charter & governance Decision-making processes, roles, contribution policies
πŸ“ Technical specs & proposals Architecture decisions, integration designs, enhancement proposals
πŸ”— Integration documentation Cross-system specs (e.g., Asset Registry, EUDR/Whisp, AgStack ecosystem)
πŸ—ΊοΈ Roadmap & planning Project-wide priorities, phased roadmaps, task breakdowns
πŸ“– Landing page & overview This README β€” the single entry point for understanding INATrace
🀝 Contributing guide How to get involved across all INATrace repos

Repository Structure

agstack/inatrace/                    ← You are here
β”‚
β”œβ”€β”€ README.md                        ← Project landing page (this file)
β”œβ”€β”€ ASSET_REGISTRY_INTEGRATION.md    ← AgStack Asset Registry integration spec & roadmap
β”œβ”€β”€ CONTRIBUTING.md                  ← (planned) Cross-repo contribution guide
β”œβ”€β”€ CHARTER.md                       ← (planned) Project charter
β”œβ”€β”€ GOVERNANCE.md                    ← (planned) Decision-making & roles
β”‚
β”œβ”€β”€ specs/                           ← (planned) Technical specs & enhancement proposals
β”‚   β”œβ”€β”€ 001-asset-registry-v2.md
β”‚   β”œβ”€β”€ 002-eudr-compliance.md
β”‚   └── ...
β”‚
β”œβ”€β”€ decisions/                       ← (planned) Architecture Decision Records (ADRs)
β”‚   β”œβ”€β”€ 001-meta-repo-structure.md
β”‚   └── ...
β”‚
└── .github/                         ← Issue/PR templates for cross-repo concerns

Design intent: Any document that applies to INATrace as a whole β€” not just one component β€” belongs here. Code changes go in the component repos. Project-level decisions, specs, governance, and roadmaps go here.


🌍 What is INATrace?

INATrace is an end-to-end digital traceability platform for agricultural commodities (coffee, cocoa, and beyond). It provides:

  • πŸ”— Full supply chain transparency β€” trace every step from smallholder farm to final buyer
  • ⛓️ Blockchain-backed trust β€” immutable records on Hyperledger Fabric
  • 🏒 Multi-tenant, multi-value-chain β€” one system for multiple organizations and commodity types
  • πŸ“± Mobile-first field data β€” GPS polygon mapping, offline-capable farmer registration
  • πŸ“Š Quality & compliance β€” assure quality standards and support EU Deforestation Regulation (EUDR) compliance
  • πŸ’° Fair pricing β€” transparent pricing and payment tracking for smallholder farmers

INATrace enhances the economic conditions of smallholder farmers by improving traceability of global supply chains.


πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                         INATrace Platform                          β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚              β”‚              β”‚                 β”‚                    β”‚
β”‚  πŸ“± Mobile   β”‚  πŸ–₯️ Frontend  β”‚  βš™οΈ Backend      β”‚  ⛓️ Blockchain     β”‚
β”‚  App         β”‚  (Angular)   β”‚  (Java/Spring)  β”‚  (Hyperledger)    β”‚
β”‚              β”‚              β”‚                 β”‚                    β”‚
β”‚ React Native β”‚ TypeScript   β”‚ Java 17         β”‚ Fabric Network    β”‚
β”‚ Expo         β”‚ Angular 10+  β”‚ Spring Boot     β”‚ Chaincode (Go)    β”‚
β”‚ MapBox       β”‚              β”‚ MySQL 8.4       β”‚ CouchDB            β”‚
β”‚              β”‚              β”‚ REST API        β”‚                    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                                     β”‚
β”‚  πŸ—„οΈ MySQL Database    πŸ“§ Email (SMTP)    πŸ—ΊοΈ MapBox    πŸ’± Exchange API  β”‚
β”‚                                                                     β”‚
β”‚  🌐 AgStack Asset Registry (GeoID)    πŸ›°οΈ Whisp/EUDR (Compliance)    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“¦ Component Repositories

Source code lives in four dedicated repositories. Each has its own README with setup instructions, development guide, and component-specific docs.

βš™οΈ inatrace-backend β€” Java API Server

Stars Forks Last Commit Language

The core API server powering INATrace. Handles user management, product configuration, supply chain operations, processing actions, payments, and integrations.

Stack Java 17, Spring Boot, Maven, MySQL 8.4
License MPL-2.0
Last Updated 2025-12-24
Top Maintainers @pece-a (495 commits), @RebernikNejc (126), @MusicDin (96)

Quick Start:

git clone https://github.com/agstack/inatrace-backend.git
# Set up MySQL via Docker:
docker run --name inatrace-mysql -e MYSQL_ROOT_PASSWORD=root \
  -e MYSQL_DATABASE=inatrace -e MYSQL_USER=inatrace \
  -e MYSQL_PASSWORD=inatrace -p 3306:3306 -d mysql:8.4.6
# Configure application.properties, then run INATraceBackendApplication.java

πŸ–₯️ inatrace-frontend β€” Angular Web Application

Stars Forks Last Commit Language

The web-based user interface for managing products, companies, value chains, stakeholders, processing, orders, and payments.

Stack Angular 10+, TypeScript, Node 14
License MPL-2.0
Last Updated 2025-12-24
Top Maintainers @pece-a (987 commits), @RebernikNejc (175), @borce-paspalovski (145)

Quick Start:

git clone https://github.com/agstack/inatrace-frontend.git
cd inatrace-frontend
npm install
# Configure environment, then:
ng serve

πŸ“± inatrace-mobile β€” React Native Mobile App

Stars Forks Last Commit Language

The field-level mobile app for cooperatives and farmers β€” GPS polygon mapping, farmer registration, offline data collection, and synchronization.

Stack React Native, Expo, TypeScript, MapBox
Platforms Android (Google Play) Β· iOS (App Store)
License MPL-2.0
Last Updated 2025-12-24
Top Maintainers @pinokokol (120 commits), @pece-a (9)

Key Features:

  • πŸ“ Polygon Mapping β€” GPS-based field boundary capture
  • πŸ‘¨β€πŸŒΎ Farmer Profiles β€” Detailed cooperative member records
  • πŸ“΄ Offline Mode β€” Full functionality without connectivity, auto-sync when online

Quick Start:

git clone https://github.com/agstack/inatrace-mobile.git
cd inatrace-mobile
npm install
# Configure .env (API URIs, MapBox tokens)
npx expo run:android   # or run:ios

⛓️ inatrace-coffee-network β€” Hyperledger Fabric Blockchain

Stars Forks Last Commit Language

The blockchain layer β€” a Hyperledger Fabric network with smart contracts (chaincode) that provide immutable, auditable records for supply chain transactions.

Stack Hyperledger Fabric, Docker, CouchDB, Go chaincode
Based On BasicNetwork-2.0, Fabric Samples
License MPL-2.0
Last Updated 2025-11-20
Documentation Hyperledger Fabric Docs

πŸ“ Specifications & Enhancement Docs

Cross-repo technical specifications, integration designs, and enhancement proposals live in this meta repository. These documents describe work that spans multiple INATrace components or connects INATrace to external systems.

Document Status Summary
Asset Registry Integration πŸ“‹ Draft Full spec for INATrace ↔ AgStack Asset Registry. Includes current state analysis, gap analysis, proposed architecture (async queue, ListIDs, EUDR pipeline), 5-phase roadmap, and task breakdown.
EUDR Compliance Pipeline πŸ”œ Planned Automated deforestation risk assessment via Whisp API, feeding compliance scores back into INATrace for batch reporting.
Asset Registry v2.0 Migration πŸ”œ Planned Hub+Node federation, WKT masking, ListIDs, shared identity β€” adapting INATrace for the next-gen registry.

πŸ’‘ Want to propose an enhancement? Open an issue in this repo with the enhancement label, or submit a spec document as a PR.


πŸ”— AgStack Asset Registry Integration

⚠️ Partial Integration β€” Spec & Roadmap Available

INATrace has an existing but limited integration with the AgStack Asset Registry. When farmer plots are created with polygon coordinates, INATrace calls the Asset Registry's /register-field-boundary API to obtain a GeoID β€” a deterministic 64-character identifier for each geospatial boundary.

Current State

Feature Status Details
Plot β†’ GeoID registration βœ… Implemented AgStackClientService.java calls Asset Registry on plot create/update
GeoID stored in database βœ… Implemented Plot.geoId column persists the identifier
GeoID displayed in UI βœ… Implemented Web (Angular) + Mobile (React Native) show GeoID with copy button
"Open in Whisp" (EUDR analysis) βœ… Implemented Opens whisp.earthmap.org with GeoID
Manual GeoID refresh βœ… Implemented POST /userCustomers/{id}/plots/{plotId}/updateGeoID
GeoID in Excel export βœ… Implemented Included in farmer data exports

Known Gaps

Gap Severity
πŸ”΄ Silent failure β€” registration errors return null with no user notification Critical
πŸ”΄ No batch registration β€” Excel farmer import skips GeoID generation Critical
πŸ”΄ Integration disabled by default β€” config values are empty in template Critical
🟑 No reverse lookup (GeoID β†’ boundary from registry) Medium
🟑 No GeoID history/versioning when boundaries change Medium
🟑 No overlap intelligence surfaced to users Medium
🟑 No automated EUDR compliance pipeline (Whisp is view-only) Medium
🟑 No preparation for Asset Registry v2.0 (federated Hub+Node, ListIDs) Medium

πŸ‘‰ Full technical specification: ASSET_REGISTRY_INTEGRATION.md


πŸ“Š Project Stats

Metric Backend Frontend Mobile Blockchain Total
⭐ Stars 8 1 0 1 10
🍴 Forks 6 5 2 3 16
πŸ› Open Issues 4 0 0 0 4
πŸ“… Created 2020-11 2020-11 2024-12 2020-11 β€”
πŸ“ Last Push 2025-12-24 2025-12-24 2025-12-24 2025-11-20 β€”

πŸ‘₯ Core Maintainers


@pece-a

1,492 commits Β· Backend & Frontend lead

@RebernikNejc

301 commits Β· Backend & Frontend

@borce-paspalovski

223 commits Β· Frontend

@pinokokol

120 commits Β· Mobile lead

@MusicDin

148 commits Β· Backend

@MHA10

186 commits Β· Backend

@dockerymick

163 commits

@genovoxx

108 commits Β· Frontend

@sumerjohal

AgStack core team

@MBJuric

Mobile & Blockchain

✨ Key Features (INATrace 2.x)

INATrace 2 is a major release that significantly expanded the platform:

Value Chain Management

  • βœ… Generic value chain support β€” configure different commodity chains with specific settings
  • βœ… Multi-tenant architecture β€” multiple organizations in one deployment
  • βœ… Company profiles β€” facilities, processing actions, farmers, and collectors per company
  • βœ… Product admin companies β€” delegated product management within value chains

Supply Chain Operations

  • βœ… Processing actions β€” multiple types including bulk purchases for semi-products
  • βœ… Final products β€” output of final processing, configurable by product admins
  • βœ… Customer orders β€” linked to final products
  • βœ… Purchases, processing & payments β€” comprehensive workflow management

Data & Compliance

  • βœ… Farmer import β€” bulk import from Excel files
  • βœ… Processing evidence fields β€” configurable in system settings
  • βœ… Multi-language support β€” translations for facilities, actions, semi-products, and evidence types
  • βœ… Multi-currency β€” configurable currencies with daily exchange rate sync via exchangeratesapi.io
  • βœ… EUDR compliance β€” EU Deforestation Regulation support through polygon mapping and traceability

Mobile & Field

  • βœ… GPS polygon mapping β€” field boundary capture on mobile devices
  • βœ… Offline-first β€” full data collection without connectivity
  • βœ… Auto-sync β€” seamless data synchronization when online
  • βœ… Available on Google Play and App Store

πŸš€ Getting Started

Full Platform Deployment

To deploy the complete INATrace platform, you'll need to set up:

  1. Database β€” MySQL 8.4+ (can use Docker)
  2. Backend β€” Java 17 + Spring Boot API server
  3. Frontend β€” Angular web application
  4. Mobile (optional) β€” React Native app via Expo
  5. Blockchain (optional) β€” Hyperledger Fabric network
# 1. Clone all repositories
git clone https://github.com/agstack/inatrace-backend.git
git clone https://github.com/agstack/inatrace-frontend.git
git clone https://github.com/agstack/inatrace-mobile.git
git clone https://github.com/agstack/inatrace-coffee-network.git

# 2. Start MySQL
docker run --name inatrace-mysql \
  -e MYSQL_ROOT_PASSWORD=root \
  -e MYSQL_DATABASE=inatrace \
  -e MYSQL_USER=inatrace \
  -e MYSQL_PASSWORD=inatrace \
  -p 3306:3306 -d mysql:8.4.6

# 3. Start Backend (see inatrace-backend README for full config)
cd inatrace-backend
# Configure application.properties
mvn spring-boot:run

# 4. Start Frontend
cd ../inatrace-frontend
npm install && ng serve

# 5. (Optional) Start Mobile
cd ../inatrace-mobile
npm install && npx expo run:android

For detailed setup instructions, see each repository's README.


πŸ”— Related Projects

INATrace is part of the broader AgStack Foundation ecosystem of open digital infrastructure for agriculture:

Project Description
TraceFoodChain Flutter app for tracing goods along food production chains
TerraTrac EUDR compliance mobile app by TechnoServe Labs
Asset Registry Geospatial asset registration for agricultural land
OpenAgri Platform Modular digital agriculture microservices

πŸ‘‰ See all AgStack projects: github.com/agstack


πŸ›οΈ Governance & Charter

Governance documents are being established for the INATrace project.

This meta repository is the canonical location for:

  • Project Charter β€” Mission, scope, and guiding principles
  • Governance Model β€” Decision-making process, maintainer roles, voting procedures
  • Code of Conduct β€” Community standards and enforcement
  • Release Process β€” How releases are coordinated across the four component repos

These documents will be added as the governance framework is formalized. For now, INATrace operates under the broader AgStack Foundation governance.

Document Status
CHARTER.md πŸ”œ Planned
GOVERNANCE.md πŸ”œ Planned
CODE_OF_CONDUCT.md πŸ”œ Planned
RELEASE_PROCESS.md πŸ”œ Planned

πŸ“œ License

All INATrace repositories are licensed under the Mozilla Public License 2.0 (MPL-2.0).


🀝 Contributing

We welcome contributions of all kinds β€” code, documentation, specs, and ideas!

Where to contribute

Type of contribution Where
Bug fix or feature in backend, frontend, mobile, or blockchain The relevant component repository
Cross-repo enhancement proposal or technical spec This meta repo β€” open an issue or submit a spec PR
Governance, charter, or process proposal This meta repo
Integration design (Asset Registry, EUDR, etc.) This meta repo β€” see specs section
General question or discussion This meta repo β€” open a discussion or issue

How to contribute

  1. Browse open issues across INATrace repos
  2. Fork the relevant repository
  3. Create a feature branch and submit a pull request
  4. See individual repo READMEs for development setup details