Skip to content

reygasta/pow-visualizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Proof of Work Mining Visualizer

An educational visualization tool that demonstrates how Proof of Work (PoW) mining works in blockchain technology. Watch in real-time as the mining algorithm searches for valid hashes!

React Python License

✨ Features

Feature Description
🌓 Theme Toggle Switch between dark and light mode
🌐 Bilingual Indonesian 🇮🇩 and English 🇺🇸 support
📊 Live Mining Real-time nonce and hash updates
🎨 Animations Pulse, glow, and bounce effects during mining
📈 Statistics Attempts, time, and hash rate display
🧱 Block History View all successfully mined blocks
📚 Education Learn why PoW is slow and energy-intensive

🎥 Demo

PoW Mining Visualizer Demo

▶️ Full video: #1

🚀 Quick Start

Prerequisites

  • Python 3.8+ with pip
  • Node.js 18+ with npm

Installation

1. Clone the repository

git clone https://github.com/reygasta/pow-visualizer.git
cd pow-visualizer

2. Start the Backend (Terminal 1)

cd backend
pip install -r requirements.txt
python app.py

The API server will run at http://localhost:5000

3. Start the Frontend (Terminal 2)

cd frontend
npm install
npm run dev

The web app will be available at http://localhost:3000

📁 Project Structure

pow-visualizer/
├── backend/
│   ├── app.py              # Flask REST API
│   ├── blockchain.py       # Block & hash logic
│   ├── mining.py           # Mining session manager
│   └── requirements.txt    # Python dependencies
├── frontend/
│   ├── src/
│   │   ├── components/     # React UI components
│   │   ├── contexts/       # Theme & Language contexts
│   │   ├── App.jsx         # Main application
│   │   └── index.css       # Tailwind styles
│   ├── package.json
│   ├── tailwind.config.js
│   └── vite.config.js
├── LICENSE
└── README.md

🛠️ Tech Stack

Frontend:

  • React 18 with Vite
  • Tailwind CSS
  • Context API for state management

Backend:

  • Python Flask
  • SHA-256 hashing
  • Threading for background mining

🎓 What You'll Learn

  • Why mining is slow — brute force hash computation
  • Why difficulty matters — exponential growth in attempts
  • Why mining uses energy — continuous CPU computation
  • Why mining is probabilistic — no shortcuts, just luck

⚠️ Disclaimer

This is a simulation for educational purposes only.

  • ❌ Does NOT mine real cryptocurrency
  • ❌ Does NOT connect to any blockchain network
  • ✅ DOES demonstrate how mining algorithms work

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🤝 Contributing

Contributions are welcome! Feel free to:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Made with ❤️ for blockchain education

About

An educational visualization tool that demonstrates how Proof of Work (PoW) mining works in blockchain technology. Watch in real-time as the mining algorithm searches for valid hashes!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors