Your Mini App’s Manifest proves ownership of your app and powers search, discovery, and rich embeds in the Base App.
Below we’ll create a Next.js route at app/.well-known/farcaster.json/route.ts
that returns your accountAssociation and frame metadata.
Visit https://yourdomain.com/.well-known/farcaster.json
to verify JSON output.
app/.well-known/farcaster.json/route.ts
function withValidProperties(properties: Record<string, undefined | string | string[]>) {
return Object.fromEntries(
Object.entries(properties).filter(([_, value]) => (Array.isArray(value) ? value.length > 0 : !!value))
);
}
export async function GET() {
const URL = process.env.NEXT_PUBLIC_URL as string;
return Response.json({
accountAssociation: {
header: process.env.FARCASTER_HEADER,
payload: process.env.FARCASTER_PAYLOAD,
signature: process.env.FARCASTER_SIGNATURE,
},
frame: withValidProperties({
version: '1',
name: process.env.NEXT_PUBLIC_ONCHAINKIT_PROJECT_NAME,
subtitle: process.env.NEXT_PUBLIC_APP_SUBTITLE,
description: process.env.NEXT_PUBLIC_APP_DESCRIPTION,
screenshotUrls: [],
iconUrl: process.env.NEXT_PUBLIC_APP_ICON,
splashImageUrl: process.env.NEXT_PUBLIC_APP_SPLASH_IMAGE,
splashBackgroundColor: process.env.NEXT_PUBLIC_SPLASH_BACKGROUND_COLOR,
homeUrl: URL,
webhookUrl: `${URL}/api/webhook`,
primaryCategory: process.env.NEXT_PUBLIC_APP_PRIMARY_CATEGORY,
tags: [],
heroImageUrl: process.env.NEXT_PUBLIC_APP_HERO_IMAGE,
tagline: process.env.NEXT_PUBLIC_APP_TAGLINE,
ogTitle: process.env.NEXT_PUBLIC_APP_OG_TITLE,
ogDescription: process.env.NEXT_PUBLIC_APP_OG_DESCRIPTION,
ogImageUrl: process.env.NEXT_PUBLIC_APP_OG_IMAGE,
// use only while testing
noindex: true,
}),
});
}
Review the full Manifest guide and update all fields. Be sure to update your deployment environment with these values.