Web NFC (NDEFReader) is only available in Chrome on Android (as of 2026). Desktop browsers and iOS are not supported. Design the terminal flow to degrade gracefully on unsupported browsers by showing a clear capability error.
Web Crypto (crypto.subtle) is widely supported. Use importKey + deriveKey with HKDF for key derivation and encrypt/decrypt with AES-GCM for payload operations.
NFC reads and writes are asynchronous; always await them and handle AbortError (e.g., card removed mid-operation) explicitly.
Browser storage for offline events should use IndexedDB for reliability; localStorage has size limits and is synchronous.
Frontend: use TanStack Start for routing, query caching, and UI state management. Use TanStack Query for API calls and optimistic updates.
Backend: use Nitro APIs for lightweight session grants, policy endpoints, and reconciliation. Nitro's adapter model allows deployment to Cloudflare Workers, Vercel, or Node without code changes.
Share interface contracts between frontend and backend through common Zod schemas or generated TypeScript types to prevent drift.
Avoid duplicating card parsing logic; keep a single canonical implementation that both the terminal flow and the member view import.