Skip to content

Issue 13: Micro-Meter Provisioning Flow Interacting with Client QR Generators #13

Description

@elizabetheonoja-art

Scope

File: src/components/spatial/Provisioner.tsx

Problem

Field engineers currently have no guided UI for pairing new hardware meters with on-chain Soroban records. The manual process is error-prone and lacks QR-based device pairing that field teams expect from modern IoT deployments.

Requirements

  1. Build a 4-step wizard in Provisioner.tsx:
    • Step 0: Form — Hardware ID, Meter Type dropdown, Lat/Lng, Install Date
    • Step 1: Confirmation — Review entered details
    • Step 2: QR Generation — Display a scannable QR code encoding the provisioning payload
    • Step 3: Success — Show confirmation with on-chain transaction hash
  2. Each step must be independently testable (extract sub-components if needed).
  3. QR code should be generated client-side using a library like qrcode or @ngneat/qrcode.
  4. On step 2, call src/services/api.ts to submit the provisioning transaction.
  5. Handle loading, error, and success states per step.

Resolution Strategy

  • Use useState for step index and form payload.
  • QR data: JSON string of { hw, type, lat, lng, ts }.
  • On submit, POST to /api/provision then poll for confirmation.
  • Full keyboard navigation (Enter to advance, Escape to go back).

Tags

spatial, provisioning, qr, hardware

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions