Easiest way to build Mini Apps on Base
Project Setup
Webhook Configuration
Account Association
Demo App Creation
MiniKitProvider
wraps your application and provides global access to the SDK’s context. It handles initialization, events, and automatically applies client safeAreaInsets to ensure your app doesn’t overlap parent application elements.
MiniKitProvider
accepts the following props:
/api/notification
proxyOnchainKitProvider
are also supportedsdk.context
is set, with a fallback to CoinbaseWallet. This allows the same application to run both in frames and as a standalone application.
/api/notification
, but you can override this in the MiniKitProvider
.sdk.actions.openUrl
and falls back to window.open
when outside a frame context.
sdk.actions.close
functionality.
useComposeCast
hook provides functionality to open the Farcaster compose interface with pre-filled content.
text: string
- The text content for the castembeds?: string[]
- Optional array of URLs to embed in the castcomposeCast: (params: ComposeCastParams) => void
- Function to open compose interfaceuseViewCast
hook provides functionality to view a specific Farcaster cast by its hash.
hash: string
- The hash of the cast to viewviewCast: (params: ViewCastParams) => void
- Function to view a specific castsdk.actions.viewProfile
, accepting an FID but falling back to the client’s FID.
Frontend and Backend Integration
Account Association Generation
.well-known/farcaster.json Configuration
Notification Proxy
/api/notification
used by the useNotification
hook when sending notifications.Webhooks
FRAME_ADDED
.<Transaction/>
component<Identity/>
components to resolve ENS namesExplore the Demo
Customize Your App
Deploy