Code Monkey home page Code Monkey logo

antiforge's Introduction

AntiForge

AntiForge is a DApp Supply chain system which uses blockchain technology to validate product authenticity and prevent forgery.

Steps To install:

Pre-required Setups XAMPP, Ganache, MetaMask and Truffle(Truffle can be installed using NPM).

Clone the reporsitory; git clone https://github.com/die-dimitry/AntiForge/

Ganache: Open Ganache and Create new Workspace. You'll get multiple wallets, copy the private key which you'll get by Clicking on Key icon on right of wallet.

Setup Metamask: In a browser installed with metamask plugin, create a new network and use the details from Ganache to fill it: Name, RPC Server (http://localhost:7545), Client ID (1337) & Symbol. Then in Metamask under Accounts click on Import Account & Paste the Private Key you copied from Ganache. Once your wallet is loaded open Remix IDE on your Browser.

Remix IDE Open a solidity file name 'smartcontract.sol' , paste it in IDE and Compile it. Make sure you're using '0.6.12 + commit.27d51765' comipler. If you see any Errors in compilation ask ChatGPT. To Deploy the code Click on 'Deploy & run Transactions' -> Choose Environment as 'Inject Provider - Metamask'. Now, you'll get Metmask pop up where you'll have to choose account which has credits and cross verify in RemixIDE too if same wallet account was added. Then click on Deploy and Click on Cofirm on Metmask Popup window.

Copy the Contract Address which you can get under 'Deployed Contract' by clicking on copy Symbol and paste it in app.js. You'll see a comment box for where to paste contract address. Copy the Contract ABI from 'Solidity Compiler' tab. You should see tiny 'ABI' at the bottom below Compilation Details. Paste ABI in app.js file. Follow comments in app.js file to know where to paste it. Its basically code inside square bracket.

Open XAMPP and run Apache and MySql. Move Entire Folder at xampp/htdocs/AntiForge if you haven't done it yet. You can find Xampp folder in C drive if using Windows, while its different for other OS. Before starting the web dashboard, open 'localhost/phpmyadmin' on browser and add a Database with name as 'supplychain' then click on Import and Import the Database file from '/AntiForge/sql/supplychain.sql' If you get all things done you should be able to access the dashboard from 'localhost/AntiForge'.

At login page you can use '[email protected]' & 'password' to login and genrate QR Codes for products, similarly you can signup. Also, passwords in database are MD5 hashed.

ThankYou; Feel free to raise issues if you're having problem else ask chatGPT.

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.