Giter VIP home page Giter VIP logo

karthiknmenon / coldblocks Goto Github PK

View Code? Open in Web Editor NEW
20.0 1.0 6.0 13.4 MB

:truck: :snowflake: Quality Assurance for Cold Chain Networks using Blockchain and IoT with Optimal Routing

Home Page: https://colddash.netlify.app

License: MIT License

Gherkin 1.13% JavaScript 45.31% Dockerfile 0.17% TypeScript 14.34% CSS 28.79% HTML 8.34% C++ 0.34% Python 1.58%
blockchain hyperledger-composer hyperledger-fabric react cold-chain route-optimization supply-chain iot supply-chain-management college-project

coldblocks's Introduction

ColdBlocks

Netlify Status

Run in Postman
🚚 ❄️ 🌡️

Problem Statement

Cold Chain Logistics company lack the an organised system for Quality Assurance and Tracking which provides real time data availability and end-to-end data transparency. End Consumers have no means of determining the quality of the product during transportation and have to rely on expiry date mentioned on the product.

Solution

ColdBlocks is a product that enables secure transactions in a cold chain network using blockchain. It provides real time data availability and end to end transparency using IoT, the goal of the product is to allow the cold chain network to carefully check the status of the product during transportation and to maintain a secure log of transactions. It also allows the end consumers of the product to check if the product was transported in optimal temperature during transportation or not.

Specification

ColdBlocks is a decentralized record management system to store electronic transaction records giving priority to the Quality Assurance (QA), security and real time data availability. It aims to enhance the working of the current cold chain network.
ColdBlocks is based on the following technologies -

  • IoT Using temperature sensors and GPS sensors along with node MCU ESP8266 module to provide WiFi connectivity. The data from these sensors is sent directly to a remote server.
  • Blockchain Blockchain is used for Quality Assurance of the product being transported in cold storage. Every package is associated with a threshold temperature, if the temperature in which the consignment is being transported overshoots the threshold temperature, then the status of the product is updated to "0" which means it's tampered.
  • coldAR Status Check for customers by just scanning a qr-code.
  • Route Optimization Route Optimization is based on VRP is implemented using Python and Google or-tools, Gooogle Maps API and Google Directions API.
  • Progressive Web App using angularJS and reactJS for admin and other actors of the use case.
  • Android App for QR-Code scanning. ColdBlocks was developed as part of our final year project during B.tech.
Say Hi to our contributors -
     Karthik Menon 💻 🐛 🚀
     Denil John Titus 📖 📂
     Jim Thomas 💻 📊
     Kevin Thomas 🔌 📖

Hardware Requirements

  • nodeMCU ESP8266 Module for Wifi Connectivity
  • DHT22 Temperature Sensor for gathering Temperature Data
  • U-Blox Neo 6M for gathering GPS Data
  • Breadboard, basic connection wires

Software Requirements

    1. Blockchain

  • Version Specifications
    • Hyperledger Composer v0.20.9
    • Hyperledger fabric v1.2
    • Docker version 19.03.1, build 74b1e89
    • npm version - 6.11.3
    • node version - 8.16.1
  • CardName - admin@coldblocks
  • BusinessNetwork - coldblocks
  • Network Version - 1.1.1
  • BNA file - [email protected]
  • Netword Card - networkadmin.card

    2. Back-End

  • nodeJS backend
  • twilio for WhatsApp integration
  • open-cage API for reverse geo encoding of coordinates into location
  • ngrok for public url

    3. Front-End Application

  • PWA using angularJS for admin-UI and reactJS for both admin and authorised users
  • react-google-maps for live mapping of package location on to maps
  • Downloadable and Dynamic QR-Code generator for HolderChange event on admin's login
  • Link : https://colddash.netlify.com

    4. Route Optimization

  • is implemented using Python and Google or-tools, Gooogle Maps API and Google Directions API.
  • The data is then hosted on a port in the machine using Flask
  • Version Requirements
    • Python Version - v3.5.6
    • pip3 Version - v20.0.2
    • Flask Version - v1.1.1
    • Google ortools

    5. AR for Status Check

  • AR.js
  • three.js

Setup and Installation

     To download and setup -
     git clone https://github.com/mojojojo20/ColdBlocks.git
     cd ColdBlocks

    1. composer-rest-server

  • cd coldblocks
    • Use Hyperledger documentation for installation and setup of Hyperledger Composer and Fabric
    • Start the network and install the BNA.
    • Start the composer REST server using, composer-rest-server -c admin@coldblocks -n never -u true -w true
    • To clear test data in development environment, run composer network reset -c admin@coldblocks

    2. node Backend

  • cd coldblocks-nodejs
    • npm install (to install all packages)
    • npm run dev
  • Use ngrok to generate a remote server link
  • Use the generated ngrok URL as nodeURL in reactJS front-end and as the HostURL in hardware code.

    3. angular front-end (UI for admin)

  • cd coldblocks-angular
    • npm install (to install all packages)
    • npm start

    4. react front-end (UI for Suppliers, Manufacturers, Distributors & Consumers)

  • cd coldblocks-react
    • npm install (to install all packages)
    • Change nodeURL in variables.jsx with the new server URL.
    • npm start
    • Basic Auth Credentials -
      • username : admin
      • password : admin
    • Credentials for all other users can be set through the admin login. All passwords are SHA256 encrypted.

    5. coldblocks-AR

  • git clone https://github.com/mojojojo20/ColdBlocks-AR.git
  • cd coldblocks-AR
  • update ngrok link in coldAR index.html file
    • use app to scan QR-code
    • Ok means the product is of optimal quality and Tampered means that the product is not of optimal quality.

    6. Hardware Code -

  • cd coldblocks-hardware
    • Update server link in Hardware Code with latest generated ngrok link for node back-end on port 4000
    • Compile and Upload sketch to nodeMCU ESP8266 module using Arduino IDE

    7. Route Optimization -

  • cd coldblocks-route
    • Requires Google Maps API, Directions API, Google or-tools, python3.7
    • python3 vrp.py
    • curl 127.0.0.1:5000\
    • Path /sendLocation to POST Addresses and path / to GET Optimal Path

Disclaimer Please Note that this is a research project.

coldblocks's People

Contributors

allcontributors[bot] avatar iamkt23 avatar jimthomas1997 avatar josephv7 avatar karthiknmenon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

coldblocks's Issues

Routing Front-End

  • Number of Vehicles

  • Capacity of each vehicle

  • Depot point

  • Allow user to input coordinates (preferably markers on map or location names)

Routing Back-End

  • ortools

  • flask

  • fetch distance between cities using directions API

  • Calculate distance matrix

  • solve VRP and send solution as json obj to react.js using flask

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.