eTherapy - Connect with Licensed Therapists via World App
eTherapy is a mini app that enables secure, private messaging between clients and licensed therapists within the WorldCoin Mini App ecosystem.
How it works:
- Login - Users authenticate using their World App wallet with the message "Sometimes we all just need to talk to a Human."
- Find a Therapist - Choose from verified therapists or enter a therapist's wallet address manually. All therapists are verified humans through World ID and licensed
professional counselors.
- Secure Messaging - Chat with your therapist through encrypted messages stored either on Supabase (real-time database) or on the World Chain blockchain (gas-free for
verified humans).
- Payments - Pay your therapist directly in USDC through the integrated payment system. Simply select the amount and confirm the transaction.
Key Features:
- World ID verification ensures you're talking to real, verified humans
- Multiple storage options for maximum privacy and reliability
- Gas-free blockchain messaging on World Chain
- Direct peer-to-peer payments
- Clean, mobile-first interface designed for the World App
The app prioritizes privacy, security, and ease of use, making mental health support accessible to anyone (Humans) with a World App wallet.
Building eTherapy: Technical Deep Dive
I built eTherapy as a World Mini App using Next.js 15 with the App Router, TypeScript, and Tailwind CSS. The app runs natively inside World App using the MiniKit SDK.
Core Technologies:
- MiniKit SDK - Enables the app to run inside World App with native-like performance and access to wallet features
- World ID - Verifies both clients and therapists are real humans (not bots), using device-level verification
- NextAuth v5 - Handles wallet-based authentication with SIWE (Sign In With Ethereum)
- Supabase - Real-time database for instant message delivery with PostgreSQL backend
- World Chain - Blockchain messaging option with gas-free transactions for verified humans
Architecture:
The app uses a hybrid storage approach - messages can be stored in Supabase for real-time updates OR on World Chain for complete decentralization. The app automatically falls
back to local storage if neither is configured. Local storage is the equivalent of "message failed to send".
Notable Hacks:
- Dual Message Format Support - Created a unified Message interface that handles both Supabase (created_at) and local storage (timestamp) formats seamlessly
- Gas-Free Blockchain - Leveraged World Chain's unique feature where verified humans get free gas, making blockchain messaging actually practical
- MiniKit Installation Race Condition - Added retry logic for MiniKit initialization since it needs time to inject into the window object
- Crypto Operations - Moved all Node.js crypto operations to server-side API routes to avoid client-side errors
Partner Benefits:
- World ID eliminates fake accounts and ensures real human therapists
- World Chain provides censorship-resistant messaging without gas fees
- Supabase enables real-time messaging without managing WebSocket infrastructure
The trickiest part was handling the MiniKit environment - it behaves differently than a regular web app, requiring special handling for authentication flows and ensuring the
SDK is properly initialized before use.