Coder Social home page Coder Social logo

sumarniportofolio / trace Goto Github PK

View Code? Open in Web Editor NEW

This project forked from maximevaillancourt/trace

0.0 0.0 0.0 1.92 MB

Supply chain transparency platform proof-of-concept based on the Ethereum blockchain ✍️

License: MIT License

JavaScript 98.43% HTML 1.14% CSS 0.42%

trace's Introduction

⚠️ This project is not supported anymore. Here be dragons! ⚠️


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 [email protected] && 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). If you see the Trace home page, you're ready to go. Otherwise, if the page is stuck on "Waiting for Web3...", proceed to steps 5 and 6.

  6. Install the MetaMask browser extension. Once installed, click on the MetaMask icon, then use the "Import Account" feature to create an account from a private key. Copy the first private key from the first few lines of output of truffle develop and paste it into the "Private Key" field in Metamask.

  7. Connect to your private network. Click the network chooser (it will likely say "Main Ethereum Network" at the top), and choose "Custom RPC". In there, enter the URL that matches the configuration in the truffle.js file (which should be http://localhost:9545 by default), then click "Save".

  8. Refresh the page in your browser, and you should be good to go!

Developing

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

migrate --reset

As for the React front-end, the Webpack server should refresh the page in your browser 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') using GPG signing
  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.

trace's People

Contributors

raphcayou avatar maximevaillancourt avatar gabrielsimoneau avatar dawntestcode avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.