System Overview
GRIPLOCK is architected as a distributed system that provides secure, ephemeral access to the decentralized finance ecosystem. The platform combines NFC-based authentication with integrated payment rails for a complete DeFi gateway.Architecture Diagram
Component Overview
Mobile App
Handles NFC card reading, PIN collection, and encrypted credential transmission
Signaling Server
Facilitates WebRTC connection establishment and message relay during handshake
Web Dashboard
Displays wallet information, manages sessions, and interacts with Solana blockchain
Technology Stack
| Layer | Technology | Purpose |
|---|---|---|
| Frontend | React 18 + TypeScript | Dashboard user interface |
| Styling | Tailwind CSS + Shadcn UI | Cyberpunk-themed design system |
| Routing | Wouter | Client-side navigation |
| State | TanStack Query + Context | Data fetching and state management |
| Backend | Express.js + TypeScript | WebSocket signaling server |
| Real-time | WebSocket + WebRTC | Bidirectional communication |
| Cryptography | Noble Curves + Noble Hashes | Ed25519, X25519, HKDF, AES-GCM |
| Blockchain | Solana JSON-RPC | Mainnet interaction |
| On/Off-Ramp | Moonpay SDK | Fiat-to-crypto and crypto-to-fiat |
| Micropayments | x402 Protocol | HTTP-native pay-per-use transactions |
| Privacy | Zero Knowledge Proofs | Privacy-preserving verification |
| Storage | Filecoin | Decentralized data persistence |
Design Principles
1. Zero-Knowledge Architecture
The server never has access to plaintext credentials. All sensitive data is encrypted end-to-end between the mobile app and dashboard using X25519 key exchange.2. Ephemeral Derivation
Private keys are never stored—they’re computed on-demand and immediately discarded after use:3. Defense in Depth
Multiple security layers protect user assets:1
Physical Layer
NFC card must be physically present—cannot be cloned or emulated
2
Knowledge Layer
PIN is required and never transmitted or stored
3
Transport Layer
All credentials encrypted with ephemeral X25519 keys
4
Session Layer
Time-limited access with activity-based expiration
5
Storage Layer
Browser storage encrypted with session-derived keys
Communication Model
GRIPLOCK uses a hybrid communication model:WebSocket (Signaling Phase)
- Used for initial connection establishment
- Relays WebRTC offers/answers and ICE candidates
- Minimal data exposure—only encrypted payloads transit
WebRTC (Data Phase)
- Peer-to-peer encrypted data channel
- Direct mobile-to-dashboard communication
- Server cannot observe data after connection established
Scalability Considerations
| Aspect | Approach |
|---|---|
| Session Management | In-memory Map with cleanup on disconnect |
| WebSocket Connections | Stateless relay, minimal server memory |
| Blockchain Queries | Direct RPC calls, no caching layer |
| Encryption | Client-side only, no server computation |
