Skip to main content

What are Farcaster Mini Apps?

Farcaster Mini Apps are web applications that render inside Farcaster clients, providing interactive experiences beyond traditional social media posts. Think of them as mini websites that users can interact with directly within their Farcaster feed.

What does it mean to host Mini Apps?

As a Farcaster client developer, hosting Mini Apps means:
  • Embedding Mini Apps in your client interface (typically as webviews)
  • Managing the app lifecycle (launch, navigation, close)
  • Providing wallet integration so Mini Apps can access user’s crypto wallets
  • Implementing authentication to verify user identity to Mini Apps
  • Handling notifications when Mini Apps want to alert users

Essential implementation areas

Review and plan to implement each of these core host capabilities from the Farcaster Mini Apps specification, particularly the SDK section:

🔐 Authentication & Identity

💰 Wallet Integration

🎨 Host UI & UX

  • App surface rendering - Webview management with proper sizing (424x695px web, device dimensions mobile)
  • Header display - Show Mini App name and author
  • Splash screens - Loading states with custom branding
  • Navigation controls - Launch, close, and navigation between Mini Apps
  • Official libraries: React Native | Web

🔔 Notification System

  • Token management - Generate and manage notification tokens per user (Neynar implementation guide)
  • Event handling - Process Mini App lifecycle events (added, removed, notifications enabled/disabled) using the Mini App Notifications API
  • Push delivery - Display notifications to users in your client

📱 Mini App Discovery

  • App catalog - Browse available Mini Apps (Mini App Catalog API)
  • Search functionality - Help users find relevant Mini Apps (Search Mini Apps API)
  • Installation flow - Let users add Mini Apps to their client

Using the Mini App Host Packages

The Farcaster team provides official host packages that handle the communication layer between your app and Mini Apps. These packages implement the SDK specification which defines how hosts and Mini Apps communicate via a postMessage channel.

Available packages

PackagePlatformDescription
@farcaster/miniapp-hostWebHost Mini Apps in browser-based applications
@farcaster/miniapp-host-react-nativeReact NativeHost Mini Apps in mobile applications

SDK communication

Mini Apps communicate with their host using the JavaScript SDK. The SDK facilitates communication over a postMessage channel available in iframes and mobile WebViews. Your host implementation must respond to the following SDK actions: Core actions:
  • addMiniApp - Prompts the user to add the Mini App
  • close - Closes the Mini App
  • composeCast - Prompt the user to cast
  • ready - Hides the splash screen (Mini App signals it’s loaded)
  • signin - Prompts the user to Sign In with Farcaster
  • openUrl - Open an external URL
  • viewProfile - View a Farcaster profile
  • viewCast - View a specific cast
Wallet actions:
  • swapToken - Prompt the user to swap tokens
  • sendToken - Prompt the user to send tokens
  • viewToken - View a token
Provider access:
  • getEthereumProvider - EIP-1193 Ethereum Provider
  • getSolanaProvider - Experimental Solana provider

App surface requirements

When rendering a Mini App, your host must:
  1. Display a header above the Mini App showing the name and author from the manifest
  2. Show a splash screen during loading using the icon and background from the manifest or embed meta tags
  3. Set proper dimensions - 424x695px for web, device dimensions for mobile
  4. Render in a vertical modal - Mini Apps should appear as overlays

Next steps

  1. Start with authentication - Implement SIWF or use SIWN for quick setup
  2. Build the UI surface - Create webview container with proper sizing and navigation
  3. Add wallet integration - Inject Ethereum provider for transaction support
  4. Add discovery - Integrate catalog and search APIs for Mini App browsing
  5. Enable notifications - Implement token management and event handling

Additional resources