The archive · Product Ideas · Product decision · 2017
Blockchain Demo: Sean Han's toy chain lets you mine blocks and watch tampering break it
Sean Han builds an open-source CLI and a browser demo where readers mine hashed blocks and watch tampering cascade, then walks through it on freeCodeCamp.
Sean Han
How it works
Sean Han's freeCodeCamp tutorial opens with Wikipedia's definition of a blockchain — 'a distributed database that is used to maintain a continuously growing list of records, called blocks' — and asks the obvious question: that sounds nice, but how does it work? His answer was not more diagrams but a working toy: an open-source command-line tool plus a browser app that lets readers run a real miniature blockchain themselves.
The mechanics are the lesson. Readers install Blockchain CLI and type a command like 'mine freeCodeCamp♥', then watch the app take the latest block's details and try nonce after nonce until a SHA-256 hash with the required leading zeros appears, linking the new block onto the chain. The article walks through each block's anatomy — index, timestamp, data, previous hash, nonce — then shows what happens if someone edits block A in a chain A→B→C: every later hash changes, every block becomes invalid, and only re-mining the whole chain could repair it.
The tutorial was published by freeCodeCamp in September 2017 and reached Hacker News, where it drew 156 points and 31 comments. The discussion shows the app working as intended: readers who had just been through the Bitcoin white paper asked for a part two on transactions, debated whether aliasing the Unix bc command was wise, and worked through orphaned blocks and 51% attacks — the toy had made the abstract concrete enough to argue about.
The demo did not disappear with the blog post. The browser version stayed online and kept evolving: in 2026 blockchaindemo.io is still live as an interactive visual demonstration of the blockchain data structure, and the tutorial's copy remains available through freeCodeCamp.
Why it lands
- A toy you can operate converts 'distributed database' from jargon into felt experience — mining your own block makes hashing, difficulty and the nonce tangible.
- The demo turns immutability into something you cause: edit one block and watch every downstream hash change, so the security property is demonstrated instead of asserted.
- Shipping both a CLI and a browser version lowered every barrier: no setup for the web demo, full source access for readers who wanted to inspect or extend it.
- Publishing the walkthrough on freeCodeCamp gave the toy a large teaching audience, and the HN thread shows readers moving from 'how does it work' to precise technical follow-ups.
What you can take
To explain a mechanism, give the learner a working toy of it: interacting with hashes, difficulty and broken links transfers understanding better than any diagram.
Since then
The tutorial remained available through freeCodeCamp, and the demo outlived the post: blockchaindemo.io is still live in 2026 as an interactive visual demo of the blockchain data structure. Sean Han carried the approach forward in a companion piece, 'How does bitcoin work? I built an app to show you', which applied the same playable-demo method to transactions.
Sources
- How does blockchain really work? I built an app to show you
- How does blockchain really work? I built an app to show you (Hacker News discussion)
spotted an error? The archive wants to know.
Your turn
You just read one. Describe the brief you are staring at, and see who has been given the same problem.
Free account · 3 free questions · no card