Giter VIP home page Giter VIP logo

fetterchain's Introduction

Fetterchain

Table of Contents

Introduction

The main purpose of this application is to provide the ability to hash an image/images, and thereafter add them to a blockchain if they don't already exist there. Should the image already exist on the blockchain, the user is to be alerted and informed.

The blockchain is to be a decentralised network of nodes who each contribute without their identity being compromised. This is to afford uncorrupted cooperation between users.

Technologies

At present, the project ultimately utilises JavaScript. It primarily uses VueJS/Vuetify (for frontend development) and CryptoJS (as its hashing algorithm). Express.js is used as a server for each instance, with the blockchain data being stored there (no data persistance i.e. DB been implemented). Axios is used as the HTTP client for get/post requests.

Tasks:

  • Initialise VueJS Project.
  • Add Vuetify.
  • Add Crypto-JS dependency.
  • Add Express.js.
  • Add Axios.
  • Implement image upload ability.
  • Implement image hasing ability.
  • Add new hash comparision with existing hashes.
  • Implement block addition by user.
  • Allow user to obtain most up to date version of ledger.
  • Distribute additions to ledger appropriately.

To mock the distrubtion/communication of the ledger, a makeshift p2p style network has been implemented using Express servers. These work in a circle, with the server 1 going to server 2, which goes to server 3, who returns to server 1 and so on.

Run the project

Client - move to this directory and use the following command:

npm run serve

Server, Server1, Server2 - move in to each Express server directory (all must be running) and launch using each the following command:

node index.js

Project Images

Basic output after hashing image and adding block containing them:

alt text

Sources

Used the article below for understanding on how to build blockchain using JavaScript: https://medium.com/@spenserhuang/learn-build-a-javascript-blockchain-part-1-ca61c285821e

Used the following StackOverflow answer to assist with file upload and hashing function: https://stackoverflow.com/questions/67159318/file-in-selected-file-array-md5-encryption-with-cryptojs-always-gives-the-same-m

For hashing, using the following project: https://github.com/brix/crypto-js

Issues

One current issue with the project is, by not using a class constructor, the hash of each block will likely result different each time, depending on the order upon which the data is entered in to same. To potentially rebuild block construction with better OOP principles.

fetterchain's People

Contributors

samuelscotts avatar

Watchers

 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.