This is a simple exercise for those considering joining our DApps team. Thanks for your time!
A weather based insurance prototype has to be created.
Attack the need of indemnifying for rain on a certain day and place.
As a user, I'd like to visit a web page, type in my name, city, email and day I'd like to register a rain insurance for. After paying the transaction for the insurance (parameterizable cost to be set upon smart contract deployment - default: 0.01 ETH), registration of the insured day and personal data should take place.
As the owner of the contract, I'd like to visit the same web page but see a different view that lets me send a transaction indicating if a given day was rainy or not. If the day was rainy, all users that registered an insurance should receive a payment.
- User view:
- Create a web page with the required inputs.
- Handle insurance registration transaction payment.
- Notify user confirming policy purchase, besides blockchain transaction link.
- Validations in both client and contract side.
- Admin view:
- Detect that the connected user is the owner and show the proper view.
- Create a web page with the required inputs.
Use javascript (transpiled ecma features are ok, but don't use typescript) and react. Any other choice of components or libraries is up to you.
- After reading and analyzing this, please provide an estimation of how many days you will think it will take you to do this.
- Create a Github repo, give Profotire team access and commit new code as usually, this is part of the evaluation process.
- Let Protofire know once work is completed.