Inspiration

All my life I have been into fitness and it has provided me with so many benefits that I hope to share this with other people. For that reason, I am always encouraging people to come to the gym with me and workout. I was doing an internship at Bosch Sensortec where I worked on smart watches. At the time I had heard about Chainlink and the things it will accomplish. I thought it would be awesome to be a node operator and provide real world data to be used on the blockchain. Since I had experience working with smart watches during this internship, I thought it would be a great idea to use my skills and build something like Vaze Fitness where it integrates smart watches and uploads the data to the blockchain with Chainlink. This data can really be anything, but I decided to focus on the heart rate specifically.

What it does

Vaze Fitness connects to smart watches’ servers to access users heart rate data. This data is then stored in databases and used to feed it into Chainlink oracles to be used on the blockchain. Vaze Fitness aims to help the average person build and personalize their own smart contracts without them needing to know solidity or blockchain technology. By doing this, Vaze Fitness intends to bring mass adoption of the fitness industry into the blockchain space.

How I built it

I built it using nodejs. A nodejs server runs in the background and is connected to a postgresql database. The Chainlink oracle uses GET requests to this server to retrieve the heart rate data. Since Fitbit runs on OAuth2.0 it is important that the access token is constantly refreshed every eight hours. It is also important for the data to also be updated regularly since if the Fitbit servers fail, the Chainlink oracle can still access this data as it is hosted in backup databases. This is all presented using an easy-to-use GUI that anyone will be able to use.

Challenges I ran into

I ran into issues regarding my Chainlink oracle not updating smart contract values. This was fixed by setting permission fulfillment on the oracle contract address which I had forgot to do earlier. Another issue was needing to use the httpwithunrestrictedaccess endpoint for Chainlink oracles. I was able to get around this issue by just using regular http get which I thought was only used for https. I also needed to enable this in the startup parameters for my Chainlink oracle. The biggest challenge was being able to compile, deploy, fund, and execute contracts using just Javascript so it can be scripted without any human needing to manually deploy the contract. This was solved using truffle and just scripting the console commands. Ideally a better way will need to be implemented before mainnet. The final issue was just time. There was a lot of features that I wished to implement but I did not have enough time to do them properly within the hackathon time limit.

Accomplishments that I'm proud of

I am most proud of building this idea I had and successfully building a working proof of concept. I did not think I would have it done by the end of the hackathon but long nights till 2am coding away has gotten me to where I am now. I am able to look at what I have made and see that it was as a result of hard work. Nothing is more enjoyable than seeing the fruits of your labour and that perseverance can pay off.

What I learned

I have earned so much as to how smart contracts are made and used. I have learned how to code in solidity, and while not the best at it, I look forward to the skills I will be able to develop in the coming years. Blockchain technology is the future and with Chainlink, we will be able to see some really amazing new applications. I have also learned how to become a node operator. I will be using this information going forward to build a more robust system of oracles that can provide millions of people with their own personal heart rate information.

What's next for Vaze Fitness

First I will be implementing forgot password and email verification. I will then implement more oracles and databases in case one fails and to better decentralize the system. Next comes the improved GUI which will be standardized across pages. The website will be then properly hosted so people can use their own data on the kovan testnet and begin building their own dapps. The next thing will be to provide more options to customize the smart contracts and better background functionality. Right now, there is limited functionality that I hope to continually expand. The biggest task will then be to launch on the Ethereum mainnet. Finally, if things go well, include more support for things such as the Apple Watch and Tezos and expanding the Chainlink oracles to different blockchains.

Built With

Share this project:

Updates