This is simplified version of Flight insurence solution using Blockchain technologies. This project is part of Udacity Nanodegree program.
Using this solution, Passengers can directly buy insurance for flight and can be paid into their account in case flight is delayed, without involvement of any third party insurance companies, banks etc. This solution will result in removal of middleman like insurance companies and results in faster insurance processing, less transaction fee and more trust between Airline companies and passengers.
A step by step series of examples that tell you have to get a development env running
Clone this repository:
git clone https://github.com/Tarunshrma/FlightSurety.git
Change directory to FlightSurety folder and install all requisite npm packages (as listed in package.json):
cd FlightSurety
npm install
Compile the smart contracts
truffle compile
Open the terminal and launch the local instance of blockchain to test your smart contracts.
ganache-cli -a 20
This command will launch the local blockchain at http://127.0.0.1:8545/ with 20 test accounts and private keys. You can use those accounts to test and execute the smart contracts locally without deploying it to TestNet or MainNet.
Run Unit Test Cases
truffle test
Deploy Smart Contracts To Local Blockchain Instance
truffle migrate --network development
Deploy front end using below command
npm run dapp
Deploy nodejs server to register oracles.
npm run server