Vigyata.AI
Is this your channel?

Day 9 of Blockchain | Adding User Interaction and a User Interface to a Decentralized Application

1.3K views· 38 likes· 19:02· Jan 9, 2022

🛍️ Products Mentioned (7)

So it turns out - blockchain is actually pretty cool. I’m super excited to be partnering with Reach and Algorand to create a YouTube series that tackles how to create decentralized applications with blockchain technology. In 10 Days of Blockchain, you’ll learn what a blockchain is, build a decentralized application, and deploy it to the Algorand blockchain. With Day 9 specifically, we’ll change Alice and Bob from computer players to human players! Their hands will no longer be chosen at random. Instead you will be able to play as Alice or Bob and choose your own hand using a user interface ✅ NOTE: Reach documentation at the time of your viewing may be slightly different than when I recorded. When in doubt, follow the documentation, and if you have questions, connect with the Reach community in Discord. ⛓ Discord Community! Reach HQ: https://discord.gg/reachsh Got a question? Ask it here: https://discord.com/channels/628402598663290882/912484855789518848 ⛓ More about Reach! Website: http://reach.sh Links: https://reach.crd.co/ Documentation: https://docs.reach.sh Questions & Support: help@reach.sh ⛓ More about Algorand! Website: https://www.algorand.com/ My courses on LinkedIn Learning! https://www.linkedin.com/learning/instructors/kathryn-hodge Support me on Patreon! https://www.patreon.com/blondiebytes

About This Video

In Day 9 of my 10 Days of Blockchain series, I take our dApp from “computer players” to actual humans. Up to this point, Alice and Bob were choosing hands at random, but in this lesson I update the front end so you can run the app as either Alice or Bob and pick your own hand through an interactive console UI. The big theme here is: we’re not changing the Reach backend—this is purely a front-end interaction upgrade. I walk through using Reach’s standard library, including the ask.mjs helper for simple console apps, plus input validation patterns (yes/no prompts, JSON parsing for contract info, and mapping user-entered hands like rock/paper/scissors into the numeric values the backend expects). I also show how to create or load an account on Devnet, deploy a contract (or join an existing one), and share contract info between players. Finally, we run the front end in two separate terminal windows—one for Alice and one for Bob—accept wagers, play hands, and see the outcome printed for both participants. The takeaway: this is what it looks like to make a dApp feel interactive and “real,” even before you build a full graphical UI.

Frequently Asked Questions

🎬 More from blondiebytes