GithubHelp home page GithubHelp logo

alexpanasucla / flightsurety-mdp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from piehlm/flightsurety-mdp

0.0 1.0 0.0 375 KB

Udacity FlightSurety DApp

License: MIT License

JavaScript 94.04% CSS 1.36% HTML 4.60%

flightsurety-mdp's Introduction

FlightSurety

FlightSurety-MDP is a working version of a flight insurance application. The DApp currently excepts only a manually entered in addresses and flights. Sample data is provided below to simplify the entry process. The smart contracts contain the full framework to expand the DApp into a far more usable application. This application is a still a minimum viable product. This application is easily expandable for a more robust user experience.

Given the challenges of developing this application on a windows platform, we include additional instructions to get you up and running in windows. If your are not using windows, you can use the standand commands and package.json files originally provided for the project.

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.

This DApp was designed on a windows platform, so I'll include additional instructions if using windows. Windows Only npm install --global --production windows-build-tools (be sure to run as admin) npm config set msvs_version 2017 --global If you are using windows, please copy the contents of the package-windows.json into package.json.
'npm i --save ethereum/web3.js' npm install truffle compile

For the purposes of testing, ensure you use the following ganache mnemonic in order to use the test data provided below: ganache-cli -a 50 -l 9999999 -m "candy maple cake sugar pudding cream honey rich smooth crumble sweet treat"

Develop Client

To run truffle tests: truffle test ./test/flightSurety.js truffle test ./test/oracles.js

To use the dapp: truffle migrate for windows: npm uninstall webpack webpack-cli webpack-dev-server npm install --save-dev webpack@latest webpack-cli@latest webpack-dev-server@latest npm run dapp

To view dapp: http://localhost:8000

Develop Server

For windows, be sure to run this command in a Git bash window. 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

test Data, using above Ganache

Owner: 0x627306090abaB3A6e1400e9345bC60c78a8BEf57

Passenger: 0x69e1CB5cFcA8A311586e3406ed0301C06fb839a2

this.config.appAddress: 0x38cF23C52Bb4B13F051Aec09580a2dE845a7FA35

Airlines: 0x627306090abaB3A6e1400e9345bC60c78a8BEf57 Flights + Date '123' - "2019-06-12" '231' - "2019-06-13" '334' - "2019-06-15" 0xf17f52151EbEF6C7334FAD080c5704D77216b732 Flights + Date '111' - "2019-06-12" '222' - "2019-06-13" '333' - "2019-06-15" 0xC5fdf4076b8F3A5357c5E395ab970B5B54098Fef Flights + Date '321' - "2019-06-12" '223' - "2019-06-13" '012' - "2019-06-15" 0x821aEa9a577a9b44299B9c15c88cf3087F3b5544 Flights + Date '577' - "2019-06-12" '632' - "2019-06-13" '010' - "2019-06-15"

Resources

flightsurety-mdp's People

Contributors

piehlm 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.