← Back to home

frame.town

Single file val.town demo of creating a Farcaster frame in a single file

Screenshots

frame.town screenshot 1
frame.town screenshot 2
frame.town screenshot 3
frame.town screenshot 4

Problem Statement

This is a minimal example of a Farcaster frame hosted on val.town. Val Town is a social website to write and deploy TypeScript. This minimal self-contained example demonstrates using the Farcaster frame API, generating images using satori and resvg, and handling POST responses from Farcaster frame. It can serve as a great simple starting point for building frames, and many more things can be added such as a SQLite DB which is offered for free by val.town.

Solution

This example uses Hono, Satori, ReSVG and business logic to return the appropriate meta tags for the Farcaster frame API. I tested it using the https://warpcast.com/~/developers/frames site. It's all hosted in val.town, and you can look through all the versions of the code that I wrote before getting to the final version on the val.town link.

Hackathon

Frameworks

2024

Prizes

  • 🏆

    Open Frames Bounty

    XMTP

  • 🏆

    $100 and 3 months advanced plan

    Dynamic