faisal-hameed / FlightSuretyDApp

Blockchain based flight insurance app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FlightSurety

FlightSurety is a sample application for flight insurance developed in Ethereum.

Environment

$ truffle version
Truffle v5.0.12 (core: 5.0.12)
Solidity - ^0.4.25 (solc-js)
Node v10.15.1
Web3.js v1.0.0-beta.37

Install

This repository contains Smart Contract code in Solidity (using Truffle), tests (also using Truffle), dApp scaffolding (using HTML, CSS and JS) and server app scaffolding.

To install, download or clone the repo, then:

npm install truffle compile

Develop Client

To use the dapp:

truffle migrate npm run dapp

To view dapp:

http://localhost:8000

Develop Server

npm run server truffle test ./test/oracles.js

Deploy

To build dapp for prod: npm run dapp:prod

Deploy the contents of the ./dapp folder

DApp UI

  1. Airline registration and funding

Drawing

  1. Flights registration

Drawing

  1. Oracles and flight status

Drawing

  1. Insurance Refund

Drawing

Testing Smart Contracts

  1. Testing : Airlines registration and multipartt consensus
    Run below command to test airlines registration and multiparty consensus
    truffle test test/flightSurety.js

Drawing

  1. Testing : Flights registration and multipartt consensus
    Run below command to test flights registration and multiparty consensus
    truffle test test/flights.js

Drawing

  1. Testing : Oracles registrations and responses
    Run below command to test oracles registration
    truffle test test/oracles.js

Drawing

About

Blockchain based flight insurance app

License:MIT License


Languages

Language:JavaScript 93.6%Language:HTML 5.3%Language:CSS 1.1%