Project Story

Inspiration

The modern internet promised connection but delivered surveillance. Every message I send, every call I make, passes through corporate servers that harvest my data, track my behaviour, and monetise my relationships. Discord owns my communities. Zoom records my meetings. Teams controls my workspace. I’ve normalised trading privacy for convenience.

Web3 promised an alternative—but most "decentralised" chat apps just recreate Web2 with blockchain credentials slapped on top. They still require email signups, phone verification, and usernames tied to centralised databases. They fragment ecosystems, forcing me to choose between Ethereum tools or Polkadot tools, never both.

Relay emerged from a simple question: What if my wallet was enough?

No email. No phone number. No corporate intermediary. Just my cryptographic identity and peer-to-peer connections. A communication platform that respects sovereignty, bridges ecosystems, and proves Web3 can deliver better user experiences than Web2—not just better ideology.


What It Does

Wallet-Based Authentication

  • Connect with Polkadot.js extension—my Substrate address becomes my identity
  • No passwords, no email verification, no KYC
  • My keys, my account

Real-Time Messaging

  • Instant peer-to-peer chat via WebSocket connections
  • Message history stored locally, not on corporate servers
  • I can add contacts by wallet address and build my decentralised social graph

Video & Audio Calls

  • WebRTC-powered peer-to-peer video calling
  • Audio-only mode for voice conversations
  • STUN/TURN servers for NAT traversal when direct connections aren't possible
  • Works like Teams or Zoom—except I don't need a Teams or Zoom account

Cross-Chain Identity

  • Polkadot users authenticate with Polkadot.js
  • Ethereum users can register on-chain usernames via MetaMask
  • Both ecosystems communicate seamlessly on one platform
  • No network switching, no dual logins, no friction

On-Chain Usernames

  • I can register human-readable usernames on Passet Hub via PolkaVM
  • Smart contract stores username → address mappings permanently
  • Optional feature—I can use my wallet address if I prefer pseudonymity

What Makes This Unique

Traditional platforms like Teams, Zoom, or Discord require:

  • Email addresses
  • Centralised authentication servers
  • Corporate control over your data
  • Separate accounts for each service

Relay requires:

  • Just my wallet
  • My identity lives on-chain, verifiable and sovereign
  • All communication encrypted via HTTPS
  • Peer-to-peer connections—no corporate middleman

How I Built It

Architecture

Frontend (Next.js + React)

  • Built with Next.js 15.5.6 and React 19
  • PAPI (Polkadot API) for Substrate wallet integration
  • Ethers.js for EVM smart contract interaction
  • Tailwind CSS for modern, responsive UI
  • Deployed on Vercel with custom domain

Backend (Node.js + Express)

  • Socket.IO server for real-time WebSocket messaging
  • HTTPS-only for secure WebRTC connections
  • Deployed on Fly.io for global edge distribution

Web3 Layer

  • Polkadot.js for Substrate wallet connection and authentication
  • Smart contract written in Solidity, deployed to Passet Hub PolkaVM
  • PolkaVM's EVM compatibility layer bridges Polkadot and Ethereum ecosystems
  • Contract address: 0x0E4716Dc8b9c6a6DC32867b50042d71C181B87C2

Communication Stack

  • Socket.io for real-time messaging over WebSockets
  • WebRTC via PeerJS for peer-to-peer video/audio
  • Google STUN servers for NAT traversal
  • Metered.ca TURN servers as fallback relay

Development Process

Phase 1: Identity Foundation

I started with the hardest problem—making wallets work as login credentials. Traditional apps use OAuth or session tokens; I needed cryptographic signatures. Polkadot.js extension integration came first, establishing Substrate addresses as the primary identity layer.

Phase 2: Cross-Chain Bridge

Adding MetaMask support wasn't just "connect another wallet"—it required bridging two fundamentally different addressing systems. Substrate uses SS58 encoding; Ethereum uses checksummed hex. I built a dual-wallet architecture where users authenticate with Polkadot.js but can optionally enhance their identity via MetaMask on Passet Hub.

Phase 3: Smart Contract Deployment

I deployed a Solidity username registry to Passet Hub's PolkaVM—Polkadot's EVM compatibility layer. This let Ethereum users interact with on-chain state while keeping Substrate users as the platform's native audience.

Phase 4: Real-Time Communication

I implemented Socket.IO for instant messaging with WebSocket connections. Messages route through my backend server but are never stored—think of it as a relay (hence the name) rather than a database.

Phase 5: WebRTC Integration

I added peer-to-peer video calling using WebRTC and PeerJS. This was critical—browsers require HTTPS for camera/microphone access, so I configured local SSL certificates via mkcert for development and deployed production to HTTPS-only infrastructure.

Phase 6: Production Deployment

  • Frontend: Vercel
  • Backend: Fly.io
  • Custom domain: relay.techangelx.com
  • Docker setup for local SSL testing

Challenges I Faced

1. PolkaVM Storage Bug

Problem: Storage reads failing on testnet. Solution: Temporary fallback to localStorage. Lesson: Testnets break—apps must not.

2. WebRTC Requires HTTPS

Problem: Browsers block devices on HTTP. Solution: mkcert + HTTPS dev server + Docker HTTPS. Lesson: WebRTC demands strict security.

3. Dual-Wallet Architecture

Problem: Why two wallets? Solution: Make MetaMask optional. Lesson: Optional complexity > forced complexity.

4. Cross-Chain Address Conversion

Problem: SS58 vs hex. Solution: addressToEvm conversion utilities. Lesson: Interoperability requires translation layers.

5. STUN/TURN Configuration

Problem: NAT/firewall restrictions break P2P. Solution: STUN for most, TURN as fallback. Lesson: Pure P2P is unreliable without relays.

6. Docker Networking

Problem: localhost doesn’t work inside Docker. Solution: Use host IP with SSL certs. Lesson: Test containers early.


What I Learned

Technical

  • PolkaVM enables real cross-chain composability
  • WebRTC requires HTTPS everywhere
  • Socket.IO more reliable than raw WebSockets
  • Fallback systems (TURN, localStorage) matter
  • Never trust an LLM to do a Man's dirty work.

Product

  • Cross-chain should reduce friction, not add it
  • Optional features keep UX clean
  • Web3 UX can beat Web2

Ecosystem

  • Polkadot tooling is strong
  • PolkaVM bridges Ethereum ↔ Polkadot
  • Testnets are unpredictable

What's Next

Immediate

  • End-to-end encrypted messaging
  • IPFS file sharing
  • Multi-participant video rooms
  • Token-gated rooms

Long-Term

  • Mobile app
  • Cross-chain messaging
  • Multi-wallet identity
  • DAO governance

Conclusion

Relay proves Web3 communication doesn't have to compromise on user experience. No emails, no corporate servers, no surveillance—just wallets, cryptography, and peer-to-peer connections.

I’ve built the foundation for sovereign communication on Polkadot. The rest is up to the community.

Try it: https://relay.techangelx.com Built on Polkadot | Powered by Web3 | Owned by Users


If you want zero wording changes except replacing “we” with “I”, “your” with “my”, etc. I can produce that too — just say the word.

Built With

Share this project:

Updates

Submission history