Skip to content

Sagarshivalingappaathani/TrustFlow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

17 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

TrustFlow - Agentic Supply Chain Management on Ethereum

Solidity Next.js Hardhat

๐Ÿ“‹ Table of Contents

Problem Statement

In Today's global markets, product authenticity and traceability are becoming critical business differentiators โ€” especially for industries dealing in high-value or safety-critical products like electronics, pharmaceuticals etc. However, most businesses cannot prove the full journey of their product, and trust is often broken between suppliers, buyers, and end consumers. Meanwhile, businesses struggle to scale operations efficiently, often missing optimal trade opportunities due to delayed decisions and lack of automation.

Our Solution: Agentic SCM on Ethereum

We present a decentralized supply chain management platform powered by Ethereum blockchain and AI-driven agents โ€” designed to offer trust, traceability, and automation at scale.

โœ… Why Blockchain?

  • Our platform uses Ethereum smart contracts to ensure:

  • Tamper-proof product journey records: Every transaction, handoff, or quality verification is immutably recorded.

  • Proof of Origin: Businesses using our platform receive a blockchain-certified product trail they can display to customers โ€” boosting brand trust, just like "PETA certified" or "USDA Organic".

  • Transparent compliance: Buyers can validate product claims (e.g., organic, ethical sourcing) independently.

  • This enables businesses to capitalize on the rising demand for transparent sourcing. Our platform becomes a stamp of credibility โ€” and we monetize it by charging certified sellers who wish to showcase their supply chain through our trusted infrastructure.

๐Ÿค– Why AI Agents?

We deploy autonomous Seller Strategy Agent that:

  • Monitor the network for optimal trade opportunities.

  • Analyze product history, price trends, and seller ratings.

  • Automatically sells orders once conditions match.

  • Help businesses operate at machine-level efficiency, minimizing human delay.

  • This agentic automation empowers businesses to scale faster, make informed decisions, and tap into a dynamic ecosystem of verified partners โ€” without manual oversight.

Example Use Case: Verified Smart Power Bank โ€“ โ€œMade in Indiaโ€

  • A customer buys a 20,000mAh power bank from a retailer. It has a QR code powered by our platform.
  • The battery cells came from Panasonic India, batch ID #2231.
  • The product was manufactured in India by a government-certified SME electronics unit.
  • Each component and stage passed quality and temperature tests.
  • The full journey โ€” from supplier to assembly to retailer โ€” is recorded on Ethereum, tamper-proof.

Screenshots

demo video

https://youtu.be/PganpPv28KU?feature=shared

Homepage Dashboard Product Relationship Marketplace

Features

Blockchain Features

  • Smart Contract Management: Complete supply chain operations on Ethereum
  • Product Traceability: End-to-end product journey tracking
  • Order Management: QR Based Delivery tracking
  • Relationship Management: Supplier-buyer relationship establishment
  • Marketplace Integration: Spot market for immediate transactions

AI Agent Features

  • Autonomous Trading: Seller Strategy Agent helps seller to automatically sell his goods after doing market analysis.
  • Product Analysis: Real-time trend and price analysis
  • Company Analysis: AI generates detailed PDF review of the company
  • AI Chat: Agents integrated RAG based models to query the blockchain thorugh NLP.

Tracking & Monitoring

  • Real-time Order Tracking: 6-stage delivery pipeline
  • OriginTreeโ„ข Scan: QR-based product history showing full component lineage and ownership hierarchy
  • Payment Integration: Secure payment processing via ETH or UPI

Security & Trust

  • Immutable Records: Tamper-proof transaction history
  • Role-based Access: Secure permission management
  • Audit Trail: Complete audit trail for all operations
  • Data Integrity: Cryptographic verification of all data

System Architecture

TrustFlow High-Level Design

AI Agent HLD

Sellar AI Agent High-Level Design

Technology Stack

Frontend

  • Next.js 14: React framework with App Router
  • TypeScript: Type-safe development
  • Tailwind CSS: Utility-first CSS framework
  • Web3.js: Ethereum blockchain integration
  • MetaMask: Wallet connection

Blockchain

  • Solidity 0.8.28: Smart contract development
  • Hardhat: Development environment
  • Ethereum: Blockchain network

AI/Backend

  • Gemini: LLM for AI suggestions
  • Python: Backend API development
  • FastAPI: REST API framework

Getting Started

Prerequisites

  • Node.js 18+
  • Python 3.8+
  • MetaMask browser extension
  • Git

Quick Start

  1. Clone the repository

    git clone https://github.com/your-username/trustflow.git
    cd trustflow
  2. Blockchain Setup

    cd blockchain
    npm install
    npx hardhat node
  3. Deploy Smart Contract

    npx hardhat run scripts/deploy.js --network localhost
  4. Frontend Setup

    cd frontend
    npm install
    npm run dev
  5. AI Backend Setup

    # Install Ollama
    curl -fsSL https://ollama.com/install.sh | sh
    
    # Pull Mistral model
    ollama pull mistral:7b
    
    # Start Python backend
    cd backend
    python3 -m venv venv
    source venv/bin/activate
    pip install -r requirements.txt
    python3 app.py

Configuration

  1. MetaMask Network Setup:

    • Network Name: localhost
    • RPC URL: http://127.0.0.1:8545/
    • Chain ID: 31337
    • Currency Symbol: ETH
  2. Contract Address:

    • Update frontend/lib/contract.ts with deployed contract address
  3. Environment Variables:

    NEXT_PUBLIC_CONTRACT_ADDRESS=your_contract_address
    NEXT_PUBLIC_NETWORK_ID=31337

๐Ÿ”ฎ Future Roadmap

  • ๐Ÿ“‹ Buyer and Negotiation AI Agents
  • ๐Ÿ“‹ Advanced Inventory management
  • ๐Ÿ“‹ IoT integration
  • ๐Ÿ“‹ Android App support

๐Ÿ‘ฅ Team

  • Sagar Athani
  • Praveen kumar
  • Adya N A
  • Abhay Singh Rajput

About

AI-powered supply chain platform with Ethereum-based traceability and automation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •