WiFi Blockchain
A comprehensive network security and transparency system that combines WiFi access point functionality with blockchain technology. Every device connection, disconnection, chat message, and administrator action—including device blocking—is cryptographically hashed into an immutable chain using proof-of-work. Administrators gain real-time visibility into all network activity with a dashboard displaying connected devices, live event logs, and full blockchain inspection. Clients connect via a mobile-optimized chat interface where each message shows the block index it was permanently recorded in. The system operates in two modes: simulation (API-only, no hardware needed) for testing and development, and real mode with actual WiFi access point using hostapd, DHCP, and packet sniffing via Scapy.
User Features
- •Join WiFi network with custom device ID and hostname
- •Real-time chat with other connected devices on the network
- •Every message cryptographically recorded in blockchain with block index
- •View blocked status indicator when administrator restricts access
- •Automatic reconnection on socket disconnection
- •Mobile-optimized responsive UI for phones and tablets
Admin Features
- •Real-time admin dashboard showing live network status
- •Monitor all connected devices with connection timestamps
- •Block and unblock devices instantly with blockchain record
- •View complete blockchain with expandable block details
- •Live event feed of all network activity (color-coded by type)
- •Verify chain integrity to detect tampering
- •Device statistics and uptime monitoring
Technical Stack
- •Custom blockchain with SHA-256 proof-of-work (2 leading zeros)
- •Python 3.10+, Flask 2.3+, Flask-SocketIO 5.3+ backend
- •Real-time WebSocket updates via Socket.IO
- •JSON-based blockchain persistence (auto-saved after each block)
- •Dual-mode operation: simulation (API-only) or real (with hostapd WiFi AP)
- •Scapy packet sniffer for real-mode WiFi device detection
- •Bootstrap 5.3 frontend with vanilla JavaScript
- •Docker containerization with docker-compose orchestration