TLDR: make a wish, throw some ETH away and you’ll have a permanent URL and wish on the Ethereum Blockchain (Rinkeby testnet for now).

Wishereum

Recently I’ve been looking for a project to complete an Ethereum Decentralized Application (DApp) from start to finish. The project needed to have a few qualities: statically hosted, simplistic and scoped, so that I could pull it off on my own.

I followed a straightforward process that I believe is a good way to start any DApp, but perhaps best for small projects:

Write the minimal contract(s) and tests you will need for the DApp using the Truffle Framework and testrpc before doing anything. Write these tests as if you’re a user who is interacting with the DApp for the first time, or a repeat visitor. Build your front-end. I chose a vuejs SPA with vue-router and vue-material. Have a watch, livereload and your favorite bundler running, while still running testrpc and deploying your contract(s) using truffle migrate --reset if you are editing them. As you develop the front-end, revise your contract(s) and tests to match any issues or inconsistencies you come across. When you feel confident in your contract(s), deploy them to a test network, there are several to choose from. Load up on some test ETH and hit your localhost with MetaMask / Parity or your favorite DApp browser. Hopefully, you can focus on and finalize the user experience and not have to redeploy your contract(s) too much.

Some Lessons:

Despite using Truffle Contract and Web3.js it still feels like a lot of boilerplate code has to be written in order to deal with common scenarios related to smart contracts, specifically reading public variables from the blockchain. It’s better to deploy on a testnet as early as possible but you’ll suffer the speed of submitting transactions while testing. Try to anticipate the scenarios ahead of time: user rejects, ran out of gas, hit a revert(), etc… and provide the response on the front-end, otherwise you’ll spend a lot of time submitting. For testing reads of public variables / getters the testnet is better than localhost because of the permanence factor, and kind of cool to not have to run testrpc with MetaMask injecting web3 for you.

I’ll be writing a more detailed series of blog posts about my development process and hopefully this can be an opportunity for others to provide feedback on some of their design choices and best practices.

Wishereum

Thanks for checking it out.