Golden Mac-Eteli
Back to Projects
Supply Chain Traceability Platform
Contractfull stack

Supply Chain Traceability Platform

Full-stack enterprise traceability platform with AI-driven farm assessments tracking the rate of change of deforestation and afforestation in vegetation cover.

About the Project

An enterprise traceability platform connecting farms, commodities, batches, and compliance assessments — with AI-powered vegetation analysis that tracks how deforestation or afforestation rates change over time at farm boundaries.

Problem

Operators lacked a single system to trace products across farms, quantify vegetation loss or gain over time, and enforce role-based workflows with geospatial farm data.

Features I Handled

Described using the STAR method — Situation, Task, Action, Result.

Feature 1

Modular Domain Backend

Situation

Supply chain logic spanned commodities, farms, batches, assessments, and boundaries — each with distinct rules.

Task

Organize the backend into isolated modules without deploying separate microservices prematurely.

Action

Implemented a modular monolith with tsyringe DI, repository pattern, and per-domain controllers/services under Express.

Result

Clear module boundaries and testable services while keeping operational complexity of a single deployable API.

Feature 2

Vegetation Change & Deforestation Assessments

Situation

Compliance teams needed to track how deforestation or afforestation rates change over time within farm vegetation boundaries — not just static boundary maps.

Task

Integrate geospatial farm data with vegetation metrics and compute year-over-year deforestation and afforestation rate of change.

Action

Built farm assessment modules with Global Forest Watch API integration (GfwClient), yearly loss metrics, and risk scoring tied to farm boundary polygons via Turf.js.

Result

Auditable vegetation change assessments linked to supply chain entities for compliance and export reporting.

Feature 3

Next.js BFF & RBAC

Situation

The frontend needed typed API access without exposing backend URLs or auth tokens to the browser.

Task

Provide a secure BFF layer and role-based permissions across supply chain modules.

Action

Built Next.js route handlers as a BFF proxy to the Express API with session/JWT forwarding and module-level RBAC checks.

Result

Unified frontend experience with centralized auth and no direct client-to-backend credential exposure.

Architecture & Technical Decisions

The platform splits Next.js (BFF + UI) from an Express modular monolith backed by PostgreSQL — Docker-compose for local/prod parity, not serverless functions.

Microservices?

No — modular monolith

AI / analytics?

Vegetation change & deforestation rate tracking

Database

PostgreSQL (relational)

Frontend pattern

BFF proxy via Next.js route handlers

Architecture pattern
Modular monolith backend + Next.js BFF frontend
Hosting & deployment
Docker containers (backend + Postgres); Next.js app separately deployed
Data layer
PostgreSQL via Prisma ORM with relational supply chain models
Integrations & services
Global Forest Watch Data API; geospatial (Turf.js); Docker Compose orchestration
flowchart LR
  next[NextjsBFF] --> express[ExpressModularMonolith]
  express --> prisma[PrismaORM]
  prisma --> postgres[(PostgreSQL)]
  next --> ui[SupplyChainUI]