System Components
This document provides detailed specifications for each component in the GRIPLOCK system.Dashboard Application
The web-based dashboard is built with React and serves as the primary user interface.Technology Stack
| Technology | Version | Purpose |
|---|---|---|
| React | 18.x | UI framework |
| TypeScript | 5.x | Type safety |
| Wouter | 3.x | Client-side routing |
| TanStack Query | 5.x | Server state management |
| Tailwind CSS | 4.x | Styling |
| Shadcn UI | Latest | Component library |
Key Modules
- Crypto Engine
- Solana Client
- WebRTC Hook
- Wallet Context
File: Dependencies:
client/src/lib/crypto.tsProvides all cryptographic operations:@noble/curves— Ed25519 and X25519 implementations@noble/hashes— SHA-256 and HKDF@noble/ciphers— AES-GCM encryption
Page Components
| Page | Route | Purpose |
|---|---|---|
| Login | / | QR code display and connection handling |
| Dashboard | /dashboard | Wallet information display |
| Not Found | * | 404 error page |
Signaling Server
The Express.js backend provides WebSocket signaling for WebRTC connection establishment.Architecture
Message Flow
Session Management
- Sessions stored in-memory
Map - Automatic cleanup on WebSocket disconnect
- No persistent storage of session data
Mobile Application
The mobile app (iOS/Android) handles NFC reading and secure credential transmission.Responsibilities
- QR Scanning — Parse compressed connection payload
- NFC Reading — Extract card UID via ISO 14443
- PIN Collection — Secure numeric input
- Encryption — Encrypt credentials with shared secret
- Transmission — Send via WebRTC DataChannel
Security Measures
Memory-Only Processing
Credentials never written to storage
Secure Enclave
Cryptographic operations in secure hardware when available
App Transport Security
TLS 1.3 for all network communication
Certificate Pinning
Prevents MITM attacks on signaling
Cryptographic Libraries
GRIPLOCK uses the Noble cryptography suite for all security-critical operations:| Library | Usage |
|---|---|
@noble/curves/ed25519 | Ed25519 signatures, X25519 key exchange |
@noble/hashes/sha2 | SHA-256 hashing |
@noble/hashes/hkdf | HKDF key derivation |
@noble/ciphers/aes | AES-256-GCM encryption |
Why Noble?
- Audited — Security-reviewed by third parties
- Pure JavaScript — No native dependencies, works everywhere
- Constant-time — Resistant to timing attacks
- Modern — Uses latest cryptographic best practices
Payment Integrations
Moonpay (On/Off-Ramp)
Handles fiat-to-crypto and crypto-to-fiat conversions:- 160+ countries supported
- Apple Pay, Google Pay, credit/debit cards
- Built-in KYC verification
- Direct bank transfers
x402 Protocol (Micropayments)
HTTP-native payment protocol for pay-per-use transactions:- API access payments
- AI agent transactions
- Content micropayments
- Pay-per-use services
Virtual Cards
Generate and manage virtual Visa cards:- Apple Pay integration
- Google Pay integration
- Online transactions worldwide
Blockchain Integration
Solana RPC Methods
| Method | Usage |
|---|---|
getBalance | Query SOL balance |
getTokenAccountsByOwner | List SPL token holdings |
getSignaturesForAddress | Fetch transaction history |
