How ihyonoo/locuvera works
Locuvera tracks hospital equipment through BLE-based indoor positioning, records NFC-authenticated checkout and return events, and anchors completed usage records to Besu for integrity checks. Staff and administrators use a web application for live equipment views, usage history, NFC management, and verification. The README documents the principal flows; sampled source confirms selected backend, frontend, and simulator connections. Some routes and integrations are represented from README statements rather than inspected implementation excerpts.
Main entry points: server.py API and workflows · routes.tsx Web routes · usage_history_service.py Usage history service · rtls_utils.py RTLS state and cache
Components 31
Devices and simulation
- BLE equipment tags
rtls/rtls_tag/ibeacon_broadcast.py - BLE reader
rtls/rtls_reader/send_to_server.py - Hospital simulator
simulation/simulator.py - Simulated world
simulation/world.py - Hospital topology
simulation/topology/zones.py - Simulation API client
simulation/api_client.py - Tag personalisation
tools/ntag/personalise.py - NTAG session crypto
tools/ntag/crypto.py
Backend services
- API and workflows
backend/server.py - Location decisions
backend/location_decision.py - RTLS state and cache
backend/rtls_utils.py - NFC tap validation
backend/nfc_tap.py - NTAG cryptography
backend/ntag424.py - Usage history service
backend/usage_history_service.py - PostgreSQL
- Redis location cache
Web application
- Web routes
frontend/src/app/routes.tsx - Live equipment view
frontend/src/app/pages/EquipmentSearch.tsx - Device status
frontend/src/app/pages/DeviceStatus.tsx - NFC equipment actions
frontend/src/app/pages/NfcEquipment.tsx - NFC tag mapping
frontend/src/app/pages/NfcMapping.tsx - Integrity verification
frontend/src/app/pages/IntegrityVerification.tsx - Account and history
frontend/src/app/pages/MyPage.tsx - Session and auth
frontend/src/app/lib/auth.ts
Usage integrity
- Besu record scripts
blockchain/besu/scripts/record-usage-record.mjs - Chain verification script
blockchain/besu/scripts/verify-usage-records.mjs - Besu network
Evaluation tools
- Evaluation RPC proxy
eval/rpc_proxy.py - Evaluation workflows
eval/integrity.py
Other components
- Clinical staff
- Administrators
Connections 37
- BLE equipment tags → BLE reader: broadcasts
- BLE reader → API and workflows: posts RSSI
- API and workflows → Location decisions: decides location
backend/server.py - API and workflows → RTLS state and cache: updates location
backend/server.py - RTLS state and cache → PostgreSQL: stores source
- RTLS state and cache → Redis location cache: updates cache
- Live equipment view → API and workflows: polls live data
- Device status → API and workflows: requests status
- Clinical staff → NFC equipment actions: tags equipment
- NFC equipment actions → API and workflows: requests NFC action
- API and workflows → NFC tap validation: validates tap
backend/server.py - NFC tap validation → NTAG cryptography: checks CMAC
- API and workflows → Usage history service: records checkout/return
backend/server.py - Usage history service → PostgreSQL: reads and writes
- Usage history service → Besu record scripts: invokes record script
backend/usage_history_service.py - Besu record scripts → Besu network: anchors records
- Usage history service → Chain verification script: invokes verification
backend/usage_history_service.py - Chain verification script → Besu network: reads chain records
- Administrators → Integrity verification: reviews integrity
- Integrity verification → API and workflows: requests verification
- Clinical staff → Live equipment view: finds equipment
- Administrators → NFC tag mapping: manages mappings
- NFC tag mapping → API and workflows: manages NFC bindings
- Clinical staff → Account and history: views history
- Web routes → Live equipment view: routes to
frontend/src/app/routes.tsx - Web routes → Integrity verification: routes to
frontend/src/app/routes.tsx - Web routes → NFC tag mapping: routes to
frontend/src/app/routes.tsx - Web routes → NFC equipment actions: routes to
frontend/src/app/routes.tsx - Web routes → Account and history: routes to
frontend/src/app/routes.tsx - Session and auth → Web routes: guards sessions
- Hospital simulator → Simulated world: advances state
simulation/world.py - Simulated world → Hospital topology: uses zone model
simulation/world.py - Hospital simulator → Simulation API client: sends actions
- Simulation API client → API and workflows: calls backend
- Tag personalisation → NTAG session crypto: uses crypto
tools/ntag/personalise.py - Tag personalisation → API and workflows: registers tag UID
- Evaluation workflows → Evaluation RPC proxy: uses RPC proxy
eval/integrity.py