Microservices architecture with separation of concerns (SOLID principles).
- Hardhat Network in standalone mode
- RPC exposed on port 8545
- Data persistence via Docker volume
- Express.js server
- Ethers.js for blockchain interaction
- REST API for IoT data submission
- IoT data registry
- Event-based logging
IoT Device -> API Service -> Blockchain Service -> Smart Contract
- IoT device sends data via HTTP POST to API
- API validates and formats data
- API submits transaction to blockchain via JSON-RPC
- Smart contract emits event with data
- API returns transaction hash to device
Prepared for Kubernetes deployment with:
- Separate deployments for each service
- ConfigMaps for configuration
- PersistentVolumes for blockchain data
- Horizontal Pod Autoscaling for API service
- Blockchain Service: ~100MB RAM, minimal CPU
- API Service: ~50MB RAM, minimal CPU
- Total: <200MB RAM for both services
- Private network (not exposed to public internet)
- No real cryptocurrency involved
- Data validation at API level
- Rate limiting on API endpoints (future implementation)