A production-ready starter template for building Farcaster Mini Apps with multi-chain wallet support (Ethereum & Solana). Deploy in seconds with Arlink's one-click deployment.
- π― Farcaster SDK Integration - Native mini app support with proper metadata configuration
- π Multi-Chain Wallet Support - Connect to both Ethereum (Base) and Solana wallets
- π Modern UI/UX - Beautiful, responsive design with Tailwind CSS
- β‘ Lightning Fast - Built with Vite and React 18
- π¨ Type-Safe - Full TypeScript support
- π One-Click Deploy - Deploy to permanent decentralized storage with Arlink
miniapp/
βββ src/
β βββ components/
β β βββ Loader.tsx # Loading screen component
β β βββ WalletConnect.tsx # Multi-chain wallet connection UI
β βββ lib/
β β βββ utils.ts # Utility functions (clsx, cn helpers)
β βββ styles/
β β βββ globals.css # Global styles and Tailwind imports
β βββ App.tsx # Main application component
β βββ main.tsx # App entry point with providers
β βββ vite-env.d.ts # Vite type definitions
βββ public/ # Static assets
β βββ Arlink.svg # App logo
β βββ 404.html # SPA routing fallback
βββ index.html # HTML entry point with Farcaster meta tags
βββ package.json # Dependencies and scripts
βββ tailwind.config.js # Tailwind CSS configuration
βββ tsconfig.json # TypeScript configuration
βββ vite.config.ts # Vite build configuration
src/main.tsx- Sets up wallet providers (Wagmi for Ethereum, Solana Wallet Adapter)src/App.tsx- Main app logic with connection state managementsrc/components/WalletConnect.tsx- Handles multi-chain wallet connectionsindex.html- Contains Farcaster Mini App metadata and SDK initialization
The Farcaster Mini App SDK is integrated in two key places:
The mini app is configured using Farcaster-specific meta tags:
<!-- Farcaster Mini App Meta Tags -->
<meta name="fc:miniapp" content='{
"version":"1",
"imageUrl":"YOUR_IMAGE_URL",
"button":{
"title":"Launch App",
"action":{
"type":"launch_miniapp",
"name":"Your App Name",
"url":"YOUR_DEPLOYED_URL",
"splashImageUrl":"YOUR_SPLASH_IMAGE_URL",
"splashBackgroundColor":"#064e3b"
}
}
}' />The SDK is loaded dynamically from ESM CDN:
(async () => {
try {
const { sdk } = await import("https://esm.sh/@farcaster/miniapp-sdk");
await sdk.actions.ready();
console.log("β
Farcaster Mini App SDK initialized");
} catch (error) {
console.error("β Failed to initialize Farcaster Mini App SDK:", error);
}
})();This approach ensures the SDK initializes without blocking your app's bundle.
Technology Stack:
- Wagmi v2 - React hooks for Ethereum
- Viem - TypeScript Ethereum library
- @farcaster/miniapp-wagmi-connector - Farcaster-specific connector
Configuration (src/main.tsx):
import { WagmiProvider, createConfig, http } from 'wagmi';
import { base } from 'wagmi/chains';
import { farcasterMiniApp as miniAppConnector } from '@farcaster/miniapp-wagmi-connector';
const config = createConfig({
chains: [base],
transports: {
[base.id]: http(),
},
connectors: [miniAppConnector()],
});Usage (src/App.tsx):
import { useAccount } from 'wagmi';
const { isConnected, address } = useAccount();Technology Stack:
- @solana/wallet-adapter-react - React hooks for Solana
- @farcaster/mini-app-solana - Farcaster Solana integration
Configuration (src/main.tsx):
import { FarcasterSolanaProvider } from '@farcaster/mini-app-solana';
const solanaEndpoint = 'https://api.mainnet-beta.solana.com';
<FarcasterSolanaProvider endpoint={solanaEndpoint}>
<App />
</FarcasterSolanaProvider>Usage (src/components/WalletConnect.tsx):
import { useWallet } from '@solana/wallet-adapter-react';
const { publicKey, connect, disconnect, wallets, select } = useWallet();The Solana integration automatically detects the Farcaster wallet adapter and connects to it.
- Node.js 16+
- pnpm (or npm/yarn)
# Clone the repository
git clone <your-repo-url>
cd miniapp
# Install dependencies
pnpm install
# Start development server
pnpm devThe app will open at http://localhost:5173
pnpm buildThe production build will be in the dist/ directory.
Before deploying your mini app, complete these steps:
IMPORTANT: Edit these meta tags with your deployed URLs:
<!-- Line 14: Update fc:miniapp meta tag -->
<meta name="fc:miniapp" content='{
"version":"1",
"imageUrl":"YOUR_OG_IMAGE_URL", <!-- β οΈ Change this -->
"button":{
"title":"Launch App",
"action":{
"type":"launch_miniapp",
"name":"Your App Name", <!-- β οΈ Change this -->
"url":"YOUR_DEPLOYED_URL", <!-- β οΈ Change this -->
"splashImageUrl":"YOUR_SPLASH_IMAGE", <!-- β οΈ Change this -->
"splashBackgroundColor":"#064e3b" <!-- β οΈ Change this -->
}
}
}' />
<!-- Lines 20-29: Update Open Graph and Twitter meta tags -->
<meta property="og:title" content="Your App Name" />
<meta property="og:description" content="Your app description" />
<meta property="og:image" content="YOUR_OG_IMAGE_URL" /> <!-- β οΈ Change this -->
<meta name="twitter:image" content="YOUR_OG_IMAGE_URL" /> <!-- β οΈ Change this -->Image URLs: Use permanent URLs (like ARWeave links from Arlink deployment) for all images.
You have two options to publish your Farcaster Mini App:
edit the farcaster.json file in your repository root :
{
"accountAssociation": {
"header": "your-header-value",
"signature": "your-signature",
"payload": "your-payload"
},
"miniApp": {
"version": "1",
"name": "Your App Name",
"url": "https://your-deployed-url.com",
"imageUrl": "https://your-image-url.com/preview.png",
"splashImageUrl": "https://your-image-url.com/splash.png",
"splashBackgroundColor": "#064e3b"
}
}Host this file at https://your-domain.com/.well-known/farcaster.json
Register your mini app directly through the Farcaster developer portal:
π Register Mini App on Farcaster
You'll need to provide:
- App name
- Deployed URL
- Preview image URL
- Splash screen image URL
- Splash background color
Deploy your mini app to permanent, decentralized storage in one click with Arlink:
- β One-Click Deploy - Connect your GitHub repo and deploy
- β Permanent Storage - Stored on Arweave forever
- β Auto-Updates - Automatically redeploys when you push to main
- Push your code to a GitHub repository
- Visit arlink.ar.io/dashboard
- Connect your GitHub account
- Select your mini app repository
- Click "Deploy Now"
- Copy your Arlink URL and update the meta tags in
index.html
Pro Tip: Arlink automatically redeploys when you push to main, so your mini app stays updated!
- Farcaster Mini Apps Documentation
- Farcaster Mini App SDK
- Wagmi Documentation
- Solana Wallet Adapter
- Arlink Documentation
- Framework: React 18 + TypeScript
- Build Tool: Vite
- Styling: Tailwind CSS
- Ethereum: Wagmi v2 + Viem
- Solana: Wallet Adapter + Farcaster Integration
- State Management: TanStack Query (React Query)
- Farcaster SDK: @farcaster/miniapp-sdk
- Ensure you're testing within the Farcaster client (mini apps don't work in regular browsers)
- Check browser console for error messages
- Verify the Farcaster SDK initialized successfully
- Ensure JSON in meta tags is properly escaped (no line breaks)
- Use online JSON validators to check syntax
- Clear Farcaster cache and reload
# Clear cache and reinstall
rm -rf node_modules pnpm-lock.yaml
pnpm install
pnpm buildThis project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Feel free to open issues or submit pull requests.
**Built with β€οΈ by Arlink
Ready to launch your mini app? Deploy Now with Arlink β