← Back to home

eTherapy Mini App

eTherapy: Mental Health Therapy for Humans by Humans on the WorldCoin App

Problem Statement

eTherapy - Connect with Licensed Therapists via World AppeTherapy 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 humansMultiple storage options for maximum privacy and reliabilityGas-free blockchain messaging on World ChainDirect peer-to-peer paymentsClean, mobile-first interface designed for the World AppThe app prioritizes privacy, security, and ease of use, making mental health support accessible to anyone (Humans) with a World App wallet.

Solution

Building eTherapy: Technical Deep DiveI 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 featuresWorld ID - Verifies both clients and therapists are real humans (not bots), using device-level verificationNextAuth v5 - Handles wallet-based authentication with SIWE (Sign In With Ethereum)Supabase - Real-time database for instant message delivery with PostgreSQL backendWorld Chain - Blockchain messaging option with gas-free transactions for verified humansArchitecture: 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 seamlesslyGas-Free Blockchain - Leveraged World Chain's unique feature where verified humans get free gas, making blockchain messaging actually practicalMiniKit Installation Race Condition - Added retry logic for MiniKit initialization since it needs time to inject into the window objectCrypto Operations - Moved all Node.js crypto operations to server-side API routes to avoid client-side errorsPartner Benefits:World ID eliminates fake accounts and ensures real human therapistsWorld Chain provides censorship-resistant messaging without gas feesSupabase enables real-time messaging without managing WebSocket infrastructureThe 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.

Hackathon

ETHGlobal Cannes

2025

Prizes

  • 🏆

    World Pool Prize

    World

Contributors