Skip to content
This repository has been archived by the owner on Oct 16, 2021. It is now read-only.
/ EtherTrack Public archive

Traceability system based on Ethereum Blockchain

License

Notifications You must be signed in to change notification settings

MatthAmoros/EtherTrack

Repository files navigation

EtherTrack

! This project is no longer supported !

If you are interested by the idea behind it, feel free to contact me.

Traceability system based on Ethereum Blockchain

Live at : https://ethertrack.firebaseapp.com/

Travis CI + JSHint status : alt text

Main goal

This project's goal is mainly to present a concrete example of an off-chain (Firebase) and in-chain (contracts) dynamic content management.

What is traceability ?

Identify, follow and authenticate a product throught its whole life cycle.

What is the blockchain ?

You can see the blockchain as a decentralized database composed of nodes that uses peer-to-peer to exchange data. Each transaction issued on the blockchain is validated by severales nodes and added to other blocks of validated transaction. Validated transactions are unalterable and publicly available. Ethereum blockchain allow the creation of "Smart Contract", autonomous programs hosted in the decentralized network. EtherTrack use various types of smart contract to :

  1. Register companies
  2. Modify traceability unit state
  3. Record traceability unit movements
  4. Ensure traceability unit / owner identity

Why would I want to use a traceability sytem based on Ethereum Blockchain ?

The nature of the blockchain system address a lot of issues that you must face when you work with traceability, for example :

  • Descentralized architecture to ensure data integrity
  • Smart-Contract source code can be read and approved by everyone, data can not be tampered with.
  • Data format is publicly available, anyone can build an interface and get data from the chain.

Current version

Current version features :

  • 3 Contracts : EtherTrackNS (Naming Service) EtherTrackWarehouse (Manage traceability Unit) and EtherTrackDatastore (a data store proxy)
  • A basic web site designed with Bootstrap 4 to use with Metamask. It can deploy contracts and do basic contracts calls.
  • Truffle deploy scripts and refactored contracts.

Installing

Clone repository :

git clone https://github.com/SunPaz/EtherTrack

Start Node.js web server :

node Firebase/www/NodeJS/node-server.js

Compile contracts using Truffle :

truffle compile

(optional)

Launch truffle test network :

truffle develop

Migrate contracts to network (in truffle develop console) :

migrate --reset

Launch you browser on http://localhost:8081/ and you are done !

Built with :

  • Truffle : Ethereum development framework
  • Remix : Solidity IDE
  • JQuery : Javascript library
  • Solidity : Smart contract language
  • Web3.js : Ethereum JavaScript API
  • MetaMask : Ethereum chrome extension
  • Node.js : Asynchronous event driven JavaScript runtime
  • Express : Web framework for Node.js
  • Firebase : Google's mobile platform, used to cache user preferences
  • JSHint : Used as a JS linter