Skip to content

A Flight Delay Insurance for Passangers Decentralized Application, using Solidity and Oracles for fetching Data

License

Notifications You must be signed in to change notification settings

seaona/FlightSurety

Repository files navigation

FlightSurety

FlightSurety is a sample application project for Udacity's Blockchain course. The workflow is as follows:

  1. Register an Airline, with a name and an ETH Address
  2. Pay 10 ETH Fee for getting full membership
  3. Register a Flight (only full-members), with Flight code, origin and destiny
  4. Buy an Insurance for that Flight
  5. Claim Repayment, if the conditions are met (flight delayed due to Airline fault) - this is checked via the Oracle server

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 run truffle tests:

truffle test ./test/flightSurety.js truffle test ./test/oracles.js

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

Resources

About

A Flight Delay Insurance for Passangers Decentralized Application, using Solidity and Oracles for fetching Data

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published