Case study 03
KYC / Identity Verification SDK for Web3 Enterprises
Think & Dev / CompilotAI · Prior engagement · SDK engineer
An embeddable identity-verification widget with a wallet-aware session model and on-chain test coverage for Web3 enterprise hosts.
- Form
- Embeddable widget
- Session
- Wallet-aware
- Coverage
- On-chain + HTTP
Problem
Enterprise hosts needed identity verification inside their own surfaces, not as a redirect to a standalone KYC product. The session had to understand a wallet without making the wallet the only identity. Coverage had to include the on-chain path, not only the HTTP path, or the widget would ship as a UI with an untested contract edge.
Constraints
The widget had to embed in a host application without owning that application's routing or design system. Session state had to remain wallet-aware and host-safe. Smart-contract tests had to run against a public test network so coverage was repeatable. No part of this write-up describes the host products or the verification vendor UI.
Architecture
An embeddable widget built as a Next.js surface, with tRPC as the typed boundary between the widget and its session services. RainbowKit supplied the wallet connection. The host mounted the widget; the widget owned the verification flow and the wallet-aware session. Hardhat tests exercised the contract path on Polygon Mumbai so the on-chain edge had the same kind of coverage as the HTTP edge.
Role
I built the embeddable widget, the typed session boundary, and the wallet-aware session model. I added the Hardhat suite on the Mumbai test network so the contract path was not an untested footnote.
Outcomes
- Hosts could embed verification without sending users through a separate product surface.
- Session state remained wallet-aware without collapsing identity to a single address.
- On-chain test coverage sat next to the application tests instead of living in a separate, optional repo.
Stack
- Next.js
- tRPC
- RainbowKit
- Hardhat
- Polygon Mumbai
- TypeScript