A decentralized IoT + Blockchain platform for neonatal environmental monitoring that ensures data traceability and privacy. Combines real-time sensor data, AES-256-GCM encryption, and Polkadot blockchain to protect babies' health information while enabling ethical research for medical institutions.
In Latin America and the Caribbean, the PAHO estimates that 255 babies die every day before reaching one month of age. This figure reflects a silent crisis during the neonatal period, when mortality risk is highest.
- 57% of all infant deaths in Latin America occur in the first 28 days of life
- Lack of accessible and reliable preventive monitoring solutions
- Absence of traceability in neonatal health data
- Limited options for vulnerable families
"More than 57% of infant deaths in Latin America occur in the first 28 days of life. This evidences the urgency for a preventive, accessible, and reliable solution to reduce risk." β PAHO
BAE integrates Polkadot blockchain technology to ensure traceability and privacy of baby data. Every time the IoT sensor measures temperature or humidity, that information is transformed into an encrypted transaction recorded on the network in a decentralized way, guaranteeing it cannot be altered or manipulated.
- Real-Time Monitoring: Temperature and humidity readings every 30 seconds with instant alerts
- End-to-End Encryption: Sensor data encrypted with AES-256-GCM before transmission
- Device Authentication: Each device linked to a unique NFT certifying authenticity
- Data Ownership: Parents have total ownership and control of their data
- Ethical Research: Anonymous data can be shared ethically with universities/institutions
- Blockchain Traceability: Every reading is verifiable and immutable on Polkadot
- Privacy-Preserving: Encrypted data on-chain, only decrypted by authorized backend
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β BAE SYSTEM ARCHITECTURE β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββ
β ESP32 Sensor β Temperature: 15-31Β°C
β (Simulator) β Humidity: 40-80%
β β Frequency: Every 30s
ββββββββββ¬ββββββββββ
β
β MQTT Protocol
β Topic: bae/sensors/+/data
β Broker: broker.hivemq.com
β
βΌ
ββββββββββββββββββββ
β Rust Gateway β βββββββββββββββββββββββββββββββββββ
β β β Security Processing: β
β - Validates β β 1. Validate sensor data β
β - Encrypts β β 2. AES-256-GCM Encryption β
β - Signs β β 3. SHA-256 Signature β
β - Submits β β 4. Submit to blockchain β
ββββββββββ¬ββββββββββ βββββββββββββββββββββββββββββββββββ
β
β JSON-RPC
β Transaction to Polkadot
β
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β POLKADOT PASEO HUB TESTNET β
β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Smart Contract: BaeSensorRegistry β β
β β Address: 0xfD0b...f217 β β
β β β β
β β Storage: β β
β β β’ Device ID β β
β β β’ Ciphertext (encrypted data) β β
β β β’ Nonce (12 bytes) β β
β β β’ Signature (32 bytes) β β
β β β’ Timestamp β β
β β β’ Block Number β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
β Features: Immutable β’ Transparent β’ Verifiable β
ββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββ΄ββββββββββββ
β β
βΌ βΌ
ββββββββββββββββββββ ββββββββββββββββββββ
β Backend API β β Frontend β
β (Node.js) β β (Next.js 15) β
β β β β
β β’ Reads chain β β β’ Web3 wallet β
β β’ Decrypts AES ββββββ€ β’ Dashboard β
β β’ REST API β β β’ Alerts β
β β’ Stats calc. β β β’ Charts β
ββββββββββββββββββββ ββββββββββββββββββββ
β β
β β
βΌ βΌ
ββββββββββββββββββββββββββββββββββββββββ
β END USERS β
β β
β π¨βπ©βπ§ Parents π¨ββοΈ Doctors π¬ Researchers β
ββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β DATA FLOW PROCESS β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
STEP 1: DATA GENERATION
βββββββββββββββββββββββββββ
β Sensor Reading β
β β
β Plain JSON: β
β { β
β "device_id": "...", β
β "temp": 23.5, β
β "humidity": 55.2 β
β } β
β β
β Status: β
READABLE β
βββββββββββββ¬ββββββββββββββ
β
βΌ
STEP 2: ENCRYPTION
βββββββββββββββββββββββββββ
β Gateway Processing β
β β
β AES-256-GCM: β
β Plain β Ciphertext β
β β
β SHA-256: β
β Generate Signature β
β β
β Status: π ENCRYPTED β
βββββββββββββ¬ββββββββββββββ
β
βΌ
STEP 3: BLOCKCHAIN STORAGE
βββββββββββββββββββββββββββ
β Smart Contract β
β β
β Stored Data: β
β β’ Ciphertext β
β β’ Nonce β
β β’ Signature β
β β’ Metadata β
β β
β Status: βοΈ IMMUTABLE β
βββββββββββββ¬ββββββββββββββ
β
βΌ
STEP 4: AUTHORIZED ACCESS
βββββββββββββββββββββββββββ
β Backend Decryption β
β β
β Process: β
β 1. Read from chain β
β 2. Verify signature β
β 3. Decrypt with key β
β 4. Return JSON β
β β
β Status: β
READABLE β
βββββββββββββ¬ββββββββββββββ
β
βΌ
STEP 5: VISUALIZATION
βββββββββββββββββββββββββββ
β User Dashboard β
β β
β Display: β
β π‘οΈ Temperature: 23.5Β°C β
β π§ Humidity: 55.2% β
β π Charts & Stats β
β β οΈ Alerts β
βββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β SECURITY LAYERS β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Layer 1: SENSOR LEVEL
ββ Plain data generation
ββ Device authentication via NFT
ββ Secure MQTT transmission
Layer 2: GATEWAY LEVEL (Encryption)
ββ AES-256-GCM Encryption
β ββ Algorithm: Advanced Encryption Standard
β ββ Key Size: 256 bits (32 bytes)
β ββ Mode: Galois/Counter Mode
β ββ Nonce: 12 random bytes per message
β
ββ SHA-256 Signature
β ββ Hash of encrypted data
β ββ Integrity verification
β ββ 32 bytes output
β
ββ Retry logic (up to 3 attempts)
Layer 3: BLOCKCHAIN LEVEL (Storage)
ββ Immutable storage on Polkadot
ββ Transparent transaction history
ββ No decryption capability on-chain
ββ Public verification of signatures
ββ Event emission for real-time tracking
Layer 4: BACKEND LEVEL (Decryption)
ββ Authorized decryption only
ββ Encryption key stored server-side
ββ REST API access control
ββ Rate limiting
ββ Audit logging
Layer 5: FRONTEND LEVEL (Display)
ββ No sensitive keys exposed
ββ Web3 wallet authentication
ββ HTTPS/TLS encryption
ββ Client-side validation
ββ User permission management
ββββββββββββββββββββββββββββββββββββββββββ
β ENCRYPTION KEY DISTRIBUTION β
ββββββββββββββββββββββββββββββββββββββββββ€
β β
β Gateway (Rust) β
HAS KEY β
β ββ Encrypts data β
β ββ Stored in env variables β
β β
β Smart Contract β NO KEY β
β ββ Only stores encrypted data β
β ββ Cannot decrypt β
β β
β Backend API β
HAS KEY β
β ββ Decrypts data β
β ββ Stored in env variables β
β β
β Frontend β NO KEY β
β ββ Only displays decrypted data β
β ββ Cannot decrypt β
β β
ββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β COMPONENT INTERACTIONS β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββ ββββββββββββββββ
β Sensor βββββ MQTT Pub βββββΆ β Gateway β
β ESP32 β β (Rust) β
ββββββββββββββββ ββββββββ¬ββββββββ
β
β JSON-RPC
β submitSensorData()
β
βΌ
ββββββββββββββββββββββββββ
β Smart Contract β
β (Solidity) β
β β
β Functions: β
β β’ submitSensorData() β
β β’ getLatestReading() β
β β’ getReading(index) β
β β’ totalReadings() β
βββββββββ¬βββββββββββββββββ
β
βββββββββββββββ΄ββββββββββββββ
β β
βΌ β
ββββββββββββββββββββ β
β Backend API β β
β (Node.js) β β
β β β
β Endpoints: β β
β GET /health β β
β GET /latest βββββ Reads ββββββββ
β GET /history β Chain
β GET /stats β
βββββββββββ¬βββββββββ
β
β REST API
β JSON Response
β
βΌ
ββββββββββββββββββββ
β Frontend β
β (Next.js) β
β β
β Components: β
β β’ Dashboard β
β β’ Charts β
β β’ Alerts β
β β’ History β
ββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β ALERT SYSTEM β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Temperature Reading
β
βΌ
βββββββββββ
β Analyze β
ββββββ¬βββββ
β
ββββββββββββββββ¬βββββββββββββββ¬βββββββββββββββ
β β β β
βΌ βΌ βΌ βΌ
< 17Β°C 17-21Β°C 21-25Β°C > 29Β°C
β β β β
β β β β
βΌ βΌ βΌ βΌ
ββββββββββββββββ ββββββββββββ ββββββββββββ ββββββββββββββββ
β π₯Ά COLD ALERTβ β COOL β β β
NORMALβ β π₯ HOT ALERT β
β β β β β β β β
β Hypothermia β β Safe β β Optimal β β Hyperthermia β
β Risk β β Range β β Range β β Risk β
β β β β β β β β
β Action: β β Action: β β Action: β β Action: β
β β’ Alert β β β’ Monitorβ β β’ Monitorβ β β’ Alert β
β β’ Notify β β β β β β β’ Notify β
β β’ Log β β β β β β β’ Log β
ββββββββββββββββ ββββββββββββ ββββββββββββ ββββββββββββββββ
Alert Distribution:
ββ 85% Normal Range (21-25Β°C)
ββ 10% Cold Alerts (<17Β°C)
ββ 5% Hot Alerts (>29Β°C)
Components:
- Frontend: Next.js 15 with Web3 wallet connection (RainbowKit + Wagmi)
- Backend: Node.js/Express with REST API for data decryption
- Smart Contracts: Solidity 0.8.28 on Polkadot Paseo Hub Testnet
- Gateway: Rust-based IoT gateway with AES-256-GCM encryption and SHA-256 signing
- Sensor: ESP32 simulator generating realistic neonatal environment data
- Storage: On-chain encrypted data with off-chain decryption capabilities
- Data sovereignty and complete control over baby's information
- Real-time alerts for abnormal temperature/humidity conditions
- Peace of mind with 24/7 monitoring
- Transparent and verifiable data history
- Access to anonymized aggregate data for research
- Evidence-based insights for neonatal care protocols
- Compliance with privacy regulations
- Immutable audit trails
- Ethical access to large-scale anonymous datasets
- Privacy-preserving analytics on encrypted data
- Contribution to reducing neonatal mortality
- Built-in data integrity verification
- Environmental Monitoring: Secure, encrypted temperature and humidity tracking
- Real-Time Alerts: Instant notifications for critical conditions (<17Β°C or >29Β°C)
- Statistical Research: Privacy-preserving analytics on encrypted datasets
- Access Control: Smart contract-based permission management
- Data Ownership: NFT-based device authentication and data ownership
- Dashboard: Real-time visualization with historical data and trends
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β BAE ROADMAP β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Q1 2025: MVP LAUNCH
ββ Target Date: January 31, 2025
ββ Deliverables:
β ββ β
Encrypted sensor data upload
β ββ β
Smart contract deployment (Paseo Testnet)
β ββ β
Backend decryption API
β ββ β
Real-time dashboard with alerts
β ββ β
Basic documentation
ββ Status: COMPLETED
ββ Metrics: 1 device, 10,000+ readings
Q2 2025: VALIDATION PHASE
ββ Target Date: March 31, 2025
ββ Deliverables:
β ββ End-to-end demo: sensor β blockchain β dashboard
β ββ Pilot program with 10 families
β ββ Basic audit logging
β ββ Compliance features (GDPR/HIPAA considerations)
β ββ Mobile app prototype
ββ Status: IN PROGRESS
ββ Metrics: 10 devices, 3 partner families
Q3 2025: SCALE & PARTNERSHIPS
ββ Target Date: August 31, 2025
ββ Deliverables:
β ββ Expand to 100 devices
β ββ Role-based access control (RBAC)
β ββ Partnership with 5 hospitals
β ββ Research data platform for institutions
β ββ Advanced analytics dashboard
β ββ Multi-language support (ES/EN/PT)
ββ Status: PLANNED
ββ Metrics: 100 devices, 5 hospital partners
Q4 2025+: PRODUCTION & MAINNET
ββ Target Date: December 31, 2025
ββ Deliverables:
β ββ Mainnet deployment (Polkadot)
β ββ Multi-device support per household
β ββ ML-based predictive analytics
β ββ Integration with healthcare systems (HL7/FHIR)
β ββ Hardware production & distribution
β ββ Grant funding secured
ββ Status: PLANNED
ββ Metrics: 1,000+ devices, 50+ institutions
2026: REGIONAL EXPANSION
ββ Target: Full Latin America coverage
ββ Goals:
β ββ 10,000 devices deployed
β ββ 100 partner institutions
β ββ 5% reduction in neonatal deaths (pilot areas)
β ββ 100+ research papers using BAE data
ββ Status: VISION
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β REVENUE STREAMS β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
1. DEVICE SALES
ββ Hardware: ESP32 sensor units
ββ Target Price: $50-80 USD per device
ββ Launch: February 2025
ββ Focus: Low-cost for vulnerable communities
ββ Revenue Share: 40%
2. SUBSCRIPTION SERVICE
ββ Monthly monitoring & data storage
ββ Tiers:
β ββ Basic: $5/month (1 device, 30 days history)
β ββ Family: $10/month (3 devices, 90 days history)
β ββ Premium: $20/month (5 devices, unlimited history + alerts)
ββ Beta: March 2025
ββ General Availability: May 2025
ββ Revenue Share: 35%
3. RESEARCH LICENSING
ββ Anonymous data access for institutions
ββ Pricing:
β ββ University: $500/month (10k records/month)
β ββ Hospital: $1,500/month (50k records/month)
β ββ Pharmaceutical: $5,000/month (unlimited)
ββ Launch: June 2025
ββ Compliance: Full ethical research standards
ββ Revenue Share: 20%
4. GRANT FUNDING
ββ Public health organizations
ββ Applications: Q1 2025
ββ Focus: Latin American initiatives
ββ Target: $500k-1M in grants (2025)
ββ Revenue Share: 5%
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β PRICING STRATEGY β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β Hardware (One-time): $50-80 USD β
β Subscription (Monthly): $5-20 USD β
β Research License (Monthly): $500-5,000 USD β
β β
β Total Addressable Market: β
β ββ Latin America: 10M+ births/year β
β ββ High-risk neonates: ~1.5M/year β
β ββ Target penetration (2026): 10,000 devices (0.7%) β
β β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
The BaeSensorRegistry contract for the current MVP has been deployed to Polkadot Paseo Hub Testnet. You can inspect transactions and contract state on BlockScout:
- Deployed contract address:
0xfD0b399898efC0186E32eb81B630d7Cf7Bb6f217 - BlockScout (Paseo): https://blockscout-passet-hub.parity-testnet.parity.io/address/0xfD0b399898efC0186E32eb81B630d7Cf7Bb6f217
- Chain ID: 420420422
- Network: Paseo Hub Testnet
- RPC URL: https://testnet-passet-hub-eth-rpc.polkadot.io
- Frontend Application: https://bae-frontend-plum.vercel.app/
- Backend API: https://bae-backend-api.onrender.com
- Test Dashboard: https://bae-frontend-plum.vercel.app/test
- Next.js 15 (App Router)
- Tailwind CSS v4
- Viem + Wagmi (Web3)
- RainbowKit (Wallet connection)
- TanStack Query (Data fetching)
- Recharts (Data visualization)
- Node.js + Express
- Ethers.js (Blockchain interaction)
- Crypto (AES-256-GCM decryption)
- CORS (Cross-origin support)
- Solidity 0.8.28
- Hardhat (Development framework)
- Polkadot Paseo Testnet
- Rust (High-performance, memory-safe)
- MQTT protocol (HiveMQ broker)
- AES-256-GCM encryption
- SHA-256 signatures
- Deployed on Render.com
- Polkadot Paseo Hub Testnet
- EVM-compatible (Ethereum compatibility layer)
- JSON-RPC interface
Base URL: https://bae-backend-api.onrender.com
| Endpoint | Method | Description |
|---|---|---|
/health |
GET | Health check and service status |
/api/readings/latest/decrypt |
GET | Latest decrypted sensor reading |
/api/readings/:index/decrypt |
GET | Specific reading by index |
/api/readings/history |
GET | Paginated reading history (limit 1-100) |
/api/readings/count |
GET | Total number of readings |
/api/readings/stats |
GET | Aggregated statistics (avg, min, max, alerts) |
{
"deviceId": "ESP32-001",
"temperature": 23.5,
"humidity": 55.2,
"timestamp": 1728421234,
"timestampDate": "2024-10-08T15:20:34.000Z",
"blockNumber": 12345
}# Health check
curl https://bae-backend-api.onrender.com/health
# Get latest reading
curl https://bae-backend-api.onrender.com/api/readings/latest/decrypt
# Get total readings
curl https://bae-backend-api.onrender.com/api/readings/count
# Get history (last 20 readings)
curl https://bae-backend-api.onrender.com/api/readings/history?limit=20
# Get statistics
curl https://bae-backend-api.onrender.com/api/readings/stats?limit=50Key functions available in the BaeSensorRegistry contract:
// Submit encrypted sensor data
function submitSensorData(
string deviceId,
bytes ciphertext,
bytes nonce,
bytes signature,
uint256 timestamp
) external
// Get latest reading
function getLatestReading() external view returns (SensorData)
// Get total number of readings
function totalReadings() external view returns (uint256)
// Get specific reading by index
function getReading(uint256 index) external view returns (SensorData)
// Data structure
struct SensorData {
string deviceId;
bytes ciphertext;
bytes nonce;
bytes signature;
uint256 timestamp;
uint256 blockNumber;
}
// Event emitted on new data
event SensorDataSubmitted(
string indexed deviceId,
uint256 timestamp,
uint256 blockNumber,
uint256 index
)NEXT_PUBLIC_API_URL=https://bae-backend-api.onrender.com
NEXT_PUBLIC_RPC_URL=https://testnet-passet-hub-eth-rpc.polkadot.io
NEXT_PUBLIC_CONTRACT_ADDRESS=0xfD0b399898efC0186E32eb81B630d7Cf7Bb6f217
NEXT_PUBLIC_CHAIN_ID=420420422
NEXT_PUBLIC_NETWORK_NAME="Paseo Testnet"
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID=your_project_idPORT=3001
FRONTEND_URL=https://bae-frontend-plum.vercel.app
RPC_URL=https://testnet-passet-hub-eth-rpc.polkadot.io
CONTRACT_ADDRESS=0xfD0b399898efC0186E32eb81B630d7Cf7Bb6f217
ENCRYPTION_KEY=your_32_byte_hex_key
NODE_ENV=productionRUST_LOG=info
MQTT_BROKER=broker.hivemq.com
MQTT_PORT=1883
RPC_URL=https://testnet-passet-hub-eth-rpc.polkadot.io
CONTRACT_ADDRESS=0xfD0b399898efC0186E32eb81B630d7Cf7Bb6f217
PRIVATE_KEY=your_private_key
ENCRYPTION_KEY=your_32_byte_hex_key- Technical Docs: Complete architecture and integration guides available in repository
- API Reference: Full endpoint documentation with examples
- Smart Contract Docs: ABI and function reference
- Security Whitepaper: Encryption and privacy model details
We welcome contributions that help save babies' lives! Please follow these guidelines:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'feat: add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
All contributions require:
- Code review and approval
- Security assessment for sensitive components
- Documentation updates
- Test coverage
Report security issues: security@bae-project.io
BAE is committed to reducing neonatal mortality in Latin America through:
- Accessible Technology: Low-cost IoT devices for vulnerable communities
- Open Data: Anonymous research datasets for medical advancement
- Community Partnerships: Collaboration with hospitals and NGOs
- Education: Training programs for parents and healthcare workers
- Transparency: Open-source approach with verifiable blockchain data
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β IMPACT METRICS β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β 2025 Goals: β
β ββ 1,000 devices deployed β
β ββ 10 partner institutions β
β ββ 10,000+ babies monitored β
β ββ 5 research publications β
β β
β 2026 Goals: β
β ββ 10,000 devices deployed β
β ββ 50 partner institutions β
β ββ 100,000+ babies monitored β
β ββ 5% reduction in preventable deaths (pilot communities) β
β ββ 100+ research papers using BAE data β
β β
β 2027 Vision: β
β ββ 50,000 devices across Latin America β
β ββ 200 partner institutions β
β ββ 500,000+ babies monitored β
β ββ 10% reduction in neonatal mortality (covered areas) β
β ββ International expansion β
β β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Apache 2.0 License
Important: Ensure regulatory compliance with local healthcare data protection laws before deployment. BAE is designed with privacy-first principles but must be configured according to jurisdictional requirements.
BAE Team - Decentralized IoT for Neonatal Care
- Website: [bae-project.io] (coming soon)
- Email: contact@bae-project.io
- Security: security@bae-project.io
- Twitter: [@BAE_Project] (coming soon)
- Discord: [Community Server] (coming soon)
- Built with support from the Polkadot ecosystem
- Inspired by the need to reduce neonatal mortality in Latin America
- Dedicated to all parents who have lost children during the neonatal period
- Special thanks to healthcare professionals providing guidance on clinical requirements
BAE - Because every baby deserves a safe environment πΌ