Code Monkey home page Code Monkey logo

hosting-dapp's Introduction

Distributed application for server hosting providers

This application was developed during my master's thesis. It is a design science artifact to solve problems in the domain of SLAs of digital services.

Information (sequence diagrams, architecture, class diagrams) can be found in the diagrams folder for more information on this application.

Requirements:

  • make (gcc) (sudo apt-get install build-essential)
  • MetaMask browser extension
  • Windows: MS Visual C++ build tools
  • python 2.7

Installation:

  • ubuntu only: sudo apt-get install build-essential
  • windows only (as admin): npm install --global --production windows-build-tools
  • npm install
  • sudo npm install -g truffle
  • MetaMask mnemonic: candy maple cake sugar pudding cream honey rich smooth crumble sweet treat

Run the application (dev server):

In project root execute:

  1. truffle develop (Windows: truffle.cmd develop)
  2. npm run migrate
  3. node ./src/utils/SetMockData.js (optional, adds fake data, e.g., service offerings and contracts)
  4. npm run start (starts dev webserver which server's react app)
  5. Open http://localhost:3000 in browser
  6. Use MetaMask in Browser to interact with truffle Blockchain

Usage:

As a customer, you're able to buy services in the "Store" view of the web app. The public key input is only for decoration with no functionality.

The billing view shows active service contracts, their achieved service performance and payment information.

Provider Contract: 0x345ca3e014aaf5dca488057592ee47305d9b3e10
Provider Account: (0) 0x627306090abab3a6e1400e9345bc60c78a8bef57
Customer Account: (1) 0xf17f52151ebef6c7334fad080c5704d77216b732

Project structure:

├- contracts # Smart Contract files (.sol)
├- migrations # necessary for truffle
├- public # static content of website
├- src #

├- components # React components that are used in views
├- contracts # copy of ./contracts (for import in web app)
├- css # style sheets
├- heartbeatOracle # Node.js-based Oracle to send heartbeats to Blockchain
├- layout # contains views for react web app
└- utils # contains utilities for support (e.g., web3js, test data)

├- test # contains tests for distributed application
├- README.md # this file
├- package.json # required for npm
├- truffle-config.js # Truffle configuration file for Windows
└- truffle.js # Truffle configuration file

hosting-dapp's People

Contributors

stzu avatar

Forkers

chaimaekhaled

hosting-dapp's Issues

No reaction with this project

Hi,
I have run this project step by step, and after fixing all of errors I have another problem! The problem is in browser when I type " npm run start " command in cmd this local address will be open " http://localhost:3000/ " and the web page wants a " Contract address" I paste the Provider contract address that has written in the usage but nothing happen!

I will be appreciate for any help!

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.