Skip to content

Trace is a supply chain transparency platform based on the Ethereum blockchain.

License

Notifications You must be signed in to change notification settings

RaphCayou/trace

 
 

Repository files navigation

logo

Trace

A transparent supply chain management platform with end users in mind.

Trace is a decentralized application based on the Ethereum blockchain aiming to let consumers see the data behind the products they buy every day. It currently allows industry experts to add products to the app, as well as create certifications that can be added to products. A mobile companion app (not developed yet) would allow scanning Trace QR codes placed on the actual products to see the data on-premise (e.g. at the grocery store).

Keep in mind that this is a proof of concept. It is not production ready by any means. However, we do invite you to play around with the project and use it as you see fit. There are some rough edges, so we definitely appreciate your help in improving the platform.

This project was developed under the supervision of Bessam Abdulrazak, director of the Ambient Intelligence Lab at Université de Sherbrooke.

Made using the Truffle toolkit, React.js, Redux, and Webpack.

Logo design by Laurence Mailhiot.

Screenshot

scrot

Installing / Getting started

  1. Clone the repo:

    git clone https://github.com/maximevaillancourt/trace.git
    cd trace
  2. Install the Truffle toolkit globally and install project dependencies:

    npm install -g truffle && npm install
  3. In a new shell, start the Truffle development console:

    truffle develop
  4. In the Truffle console, compile and deploy the smart contracts:

    This will effectively reset your local blockchain, meaning that all existing transactions will be deleted.

    migrate --reset
  5. Back in a regular shell, start the Webpack server:

    npm run start

A browser window should then open automatically at http://localhost:3000 (or whatever port you set manually).

Developing

To change something in the "smart contracts" side of things, you need to compile your contracts every time you change something using the following command in the Truffle console:

migrate --reset

As for the React app, the Webpack server should refresh the app automatically when a change is detected.

Building

Once you're ready to bundle the front-end app, use the build script to bundle everything together.

npm run build

Deploying

You're free to deploy the generated front-end bundle wherever you see fit. As for the smart contract, you can deploy it through Ganache/Truffle by adding a new network configuration. See this guide for more information.

Features

  • Add a product to the platform
  • Search for a particular product
  • Add certifications to products (e.g. "biological", "non-GMO", etc.)
  • Browse a product's version history
  • See the product's previous positions on a map
  • Combine products into one
  • Split a product into many (WIP)

Contributing

For bug fixes, documentation changes, and small features:

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

For larger new features: do everything as above, but first also make contact with the project maintainers to be sure your change fits with the project direction and you won't be wasting effort going in the wrong direction

Links

Licensing

The code in this project is licensed under MIT license. See the LICENSE.

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 98.5%
  • HTML 1.1%
  • CSS 0.4%