explaingit

anders94/blockchain-demo

5,654PugAudience · generalComplexity · 1/5Setup · easy

TLDR

Interactive browser-based demo for learning blockchain fundamentals hands-on: hashing, chaining blocks, mining, and tamper detection. Paired with a Blockchain 101 YouTube video.

Mindmap

mindmap
  root((blockchain-demo))
    Blocks
      Data and hash
      Chain of fingerprints
      Tamper detection
    Mining
      Nonce search
      Difficulty zeros
      Real time feedback
    Setup
      npm install
      Docker option
      Local server
    Learning
      YouTube walkthrough
      Editable block data
      Cryptography followup
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Learn how blockchains work by editing blocks and watching the chain break in real time

USE CASE 2

Understand mining difficulty by seeing how nonce search scales exponentially

USE CASE 3

Use as a classroom or self-study tool paired with the Blockchain 101 YouTube video

USE CASE 4

Explore hash chaining as a foundation before studying cryptography or Bitcoin

Tech stack

Node.jsPugJavaScriptnpmDocker

Getting it running

Difficulty · easy Time to first run · 5min

Clone repo, run npm install, then npm start. Docker also supported. Adjust mining difficulty by editing one line in the JS source.

License not mentioned in the explanation.

In plain English

Blockchain Demo is a simple web application for learning how blockchains work. It runs locally in a browser and lets you interact with the core concepts hands-on, rather than just reading about them. The project is paired with a YouTube video called Blockchain 101 that walks through the same ideas visually. The demo shows what a blockchain actually is: a chain of blocks where each block contains some data and a fingerprint (called a hash) that is computed from both the block's data and the fingerprint of the previous block. Because the fingerprints chain together, changing any earlier block immediately breaks every block that comes after it. This is what people mean when they describe a blockchain as an immutable ledger. The demo lets you edit block data directly so you can see the chain break in real time and understand why tampering is detectable. The demo also shows mining, the process that makes new blocks hard to add. To add a block, the software must find a number (called a nonce) that, when included in the block, produces a fingerprint starting with a specific number of zeros. Finding that number requires trying billions of guesses. The README includes a table showing how fast the difficulty grows: requiring four leading zeros takes about 15 minutes on the demo, while 21 zeros, which is roughly what the Bitcoin network requires, would take this software roughly 8 quadrillion years. Setup is straightforward: clone the repository, run npm install, and start the local server. A Docker option is also available. The difficulty level can be adjusted by editing one line in the JavaScript source. A companion repository covers public and private key cryptography as a follow-on topic.

Copy-paste prompts

Prompt 1
I have the blockchain-demo repo running locally. Walk me through what happens when I change data in block 2 and why blocks 3 and 4 turn red.
Prompt 2
Using the blockchain-demo codebase, explain the mining function: how does it search for a nonce and what does the difficulty setting control?
Prompt 3
I want to extend blockchain-demo to display the hash of each block in binary. Show me which file to edit and what code to add.
Prompt 4
Help me use blockchain-demo as a teaching aid for a 30-minute workshop. Give me a step-by-step lesson plan using the interactive features.
Prompt 5
Based on blockchain-demo, explain the difference between this simplified chain and how Bitcoin actually validates and adds blocks.
Open on GitHub → Explain another repo

← anders94 on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.