How benjamin-future/fairtrade-chain works
FairTrace is a blockchain-backed fair-trade supply-chain tracker. Users browse batches and open a batch record; participants connect a wallet in the dashboard to register participants, record harvest and handling stages, transfers, wages and audits. The contract holds records and computes verification, which the frontend presents with wage, journey and audit details. README describes only a generic Hardhat sample, so domain capabilities here are supported by the sampled frontend and deployment script. The contract implementation was not excerpted; its behavior and its internal calls are therefore not mapped.
Main entry points: contract.js Contract client · router.js Page routes · App.vue App shell · HomeView.vue Batch browser
Components 12
FairTrace frontend
- App shell
frontend/src/App.vue - Page routes
frontend/src/router.js - Batch browser
frontend/src/views/HomeView.vue - Batch record
frontend/src/views/BatchView.vue - Participant dashboard
frontend/src/views/DashboardView.vue - Contract client
frontend/src/contract.js
Supply-chain records
- Supply-chain contract
contracts/FairTradeSupplyChain.sol - Deployment metadata
deployments/sepolia.json - Demo data seeding
scripts/deploy.js
Other components
- Browser user
- MetaMask wallet
- Ethereum RPC
Connections 13
- Browser user → App shell: opens
frontend/src/App.vue - App shell → Page routes: renders
frontend/src/router.js - Page routes → Batch browser: routes to
frontend/src/router.js - Page routes → Batch record: routes to
frontend/src/router.js - Page routes → Participant dashboard: routes to
frontend/src/router.js - Batch browser → Contract client: reads records
frontend/src/views/HomeView.vue - Batch record → Contract client: reads records
frontend/src/views/BatchView.vue - Participant dashboard → Contract client: reads and writes
frontend/src/views/DashboardView.vue - Contract client → Deployment metadata: loads ABI
frontend/src/contract.js - Contract client → Ethereum RPC: reads via
frontend/src/contract.js - Contract client → MetaMask wallet: requests signing
frontend/src/contract.js - Contract client → Supply-chain contract: calls
frontend/src/contract.js - Demo data seeding → Supply-chain contract: seeds records
scripts/deploy.js