Complete step-by-step instructions to get your blockchain visualization platform running.
Before you begin, ensure you have:
- Node.js (v16 or higher) - Download here
- npm (comes with Node.js)
- A modern web browser (Chrome, Firefox, Edge, or Safari)
- A code editor (VS Code recommended)
Open your terminal in the blocksim directory and run:
npm installThis will install all required packages:
- React & React DOM
- Vite (build tool)
- Tailwind CSS (styling)
- Framer Motion (animations)
- crypto-js (SHA-256 hashing)
- elliptic (cryptographic signatures)
- D3.js (visualizations)
npm run devThe terminal will show:
VITE v5.0.0 ready in 500 ms
➜ Local: http://localhost:3000/
➜ Network: use --host to expose
Navigate to http://localhost:3000 in your web browser.
You should see the BlockSim landing page! 🎉
- Beautiful animated hero section
- Three feature cards: Hashing, Mining, Blockchain
- "Start Simulation" button
Three interactive tabs:
- 🔐 Hashing - SHA-256 hash visualizer with avalanche effect
- ⛏️ Mining - Proof-of-work mining simulator
- 🧱 Blockchain - Interactive blockchain explorer
Complete cryptocurrency system:
- Wallet creation and management
- Transaction signing with private keys
- Mempool (pending transactions)
- Mining rewards
- Transaction history
blocksim/
├── src/
│ ├── components/
│ │ ├── layout/
│ │ │ └── Navigation.jsx # App navigation
│ │ └── visualizers/
│ │ ├── BlockCard.jsx # Individual block display
│ │ ├── BlockchainVisualizer.jsx # Full blockchain view
│ │ ├── BlockDetailsPanel.jsx # Block information panel
│ │ ├── DifficultyExplainer.jsx # Mining difficulty chart
│ │ ├── HashVisualizer.jsx # SHA-256 hash demo
│ │ ├── MempoolVisualizer.jsx # Pending transactions
│ │ ├── MiningVisualizer.jsx # Mining simulator
│ │ ├── TransactionForm.jsx # Create transactions
│ │ ├── TransactionHistory.jsx # Transaction log
│ │ └── WalletManager.jsx # Wallet management
│ ├── pages/
│ │ ├── Home.jsx # Landing page
│ │ ├── SimulationPage.jsx # Main simulation
│ │ └── TransactionsPage.jsx # Cryptocurrency demo
│ ├── utils/
│ │ ├── blockchain/
│ │ │ ├── Block.js # Block class
│ │ │ ├── Blockchain.js # Blockchain class
│ │ │ ├── Transaction.js # Transaction class
│ │ │ ├── Wallet.js # Wallet class
│ │ │ ├── miningWorker.js # Async mining
│ │ │ └── test.js # Test functions
│ │ └── helpers/
│ │ ├── formatters.js # Utility functions
│ │ └── hashHelpers.js # Hash computations
│ ├── constants/
│ │ └── blockchain.js # Configuration
│ ├── App.jsx # Main app component
│ ├── main.jsx # React entry point
│ └── index.css # Global styles
├── public/ # Static assets
├── index.html # HTML template
├── package.json # Dependencies
├── vite.config.js # Vite configuration
├── tailwind.config.js # Tailwind configuration
└── README.md # Documentation
- Navigate to Simulation → Hashing
- Type any text to see its SHA-256 hash
- Try the avalanche effect to see how small changes create completely different hashes
- Use preset examples for quick demos
- Navigate to Simulation → Mining
- Adjust difficulty (1-6)
- Enter block data
- Click "Start Mining"
- Watch the proof-of-work algorithm in action
- See how difficulty affects mining time
- Navigate to Simulation → Blockchain
- Add new blocks with custom data
- Watch blocks connect with cryptographic hashes
- Try tampering with a block to see validation fail
- Export/import blockchain as JSON
- Navigate to Transactions page
- Create a new wallet (generates key pair)
- Save your private key securely!
- Create transactions between wallets
- Mine blocks to confirm transactions
- Earn mining rewards (50 ⚡)
# Start development server
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview
# Run linter
npm run lintIf port 3000 is busy, Vite will automatically use the next available port (3001, 3002, etc.)
# Clear npm cache
npm cache clean --force
# Delete node_modules and reinstall
rm -rf node_modules package-lock.json
npm installMake sure you're using Node.js v16 or higher:
node --versionBlockSim works best on modern browsers:
- Chrome/Edge 90+
- Firefox 88+
- Safari 14+
- Private keys are generated in your browser
- No data is sent to any server
- Private keys are NOT encrypted or stored
- Do NOT use for real cryptocurrency
- Treat this as a learning sandbox
Recommended order to explore features:
-
Hashing (10 mins)
- Understand cryptographic hashing
- See avalanche effect
- Learn why hashes are one-way
-
Mining (15 mins)
- Experience proof-of-work
- Understand difficulty adjustment
- See computational requirements
-
Blockchain (20 mins)
- Build a chain of blocks
- Understand immutability
- Try tampering and validation
-
Transactions (30 mins)
- Create wallets
- Sign transactions
- Mine blocks
- Track balances
- Real Cryptography: Uses actual SHA-256 and elliptic curve cryptography
- Interactive Visualizations: See concepts in action
- Step-by-Step: Learn at your own pace
- Hands-On: Modify and experiment
- Educational Tooltips: Explanations throughout
- Start with low mining difficulty (1-2) for faster demos
- Create multiple wallets to see transactions flow
- Export blockchain to save your work
- Use browser DevTools to see console logs
- Check the educational info boxes on each page
- Check the README.md for detailed documentation
- Each component has inline comments explaining the code
- Test functions are available in
src/utils/blockchain/test.js
Start exploring blockchain technology through interactive visualization. Have fun learning! 🚀
Built for blockchain education | Open source | MIT License