Farcaster Frames and free HUB Endpoints



Intro to Farcaster's Frames
In the field of decentralised social networks and protocols, Web3 is leading the way towards a more decentralised Internet. Farcaster is a social networking platform that has recently surged in popularity, gaining significant traction within the decentralised social landscape. Farcaster's key strength lies in its strategic balance of onchain and offchain elements within its protocol. By storing user identity onchain, specifically on the Optimism blockchain, Farcaster ensures full ownership and security guarantees inherited from Ethereum. Meanwhile, the bulk of the system, including user messages and casts (akin to tweets), is handled offchain through hubs. Hubs are distributed P2P servers that efficiently store and validate Farcaster data based on user identification stored in the blockchain. Processing casts and messages off-chain enables scalability and maintains a smooth user experience even during periods of high load.
Farcaster's recent rise in popularity can be directly linked to its array of innovative features. In this blog post, we'll zoom in on Frames, a dynamic tool that empowers users to transform their casts into interactive applications. From engaging polls to live feeds and interactive galleries, Frames revolutionizes the user experience on Farcaster, adding depth and interactivity to every cast. They also open up a world of possibilities for creative Web3 developers, providing a platform to showcase their existing applications in new and interactive ways, attracting a wider audience and users to their projects. Frames are also a valuable tool for testing new product ideas, allowing developers to launch simple MVPs (minimal viable products) within the Farcaster ecosystem. To see some cool real world examples, visit a Warpcast Frames channel.
Building Frames
As mentioned above, frames are essentially micro-applications that live within a Farcaster ecosystem. Each frame consists of a frame 'frontend' defined in OpenGraph metatags, which is parsed and displayed by a Farcaster client (such as Warpcast), and a frame backend - any standard web2 server that can handle HTTP POST requests in a json format - which is called by the Farcaster client when the user interacts with the frame app.
There are already several frameworks that encapsulate this process. In order not to be tied to a specific vendor, we will mention the free open source ones like frames.js or simplest-frame. Furthermore, for more sophisticated actions, like validating frame data, direct communication with Farcaster HUBs is essential and requires access to the Farcaster HUB Hubble APIs.
Farcaster's HUB endpoints
For every Frame app developer on Farcaster, besides software development skills, hosting infrastructure is crucial. This includes:
- Hosting a web2 server to communicate with the Farcaster client.
- Hosting a Farcaster HUB node to interact with the Farcaster protocol.
- Hosting Ethereum and Optimism blockchain nodes, necessary for running a Farcaster HUB.
While hosting a web2 server is a common task for Web3 developers, managing a Farcaster HUB and blockchain nodes can introduce unnecessary costs and complexity, particularly for certain Frame use cases. For instance, if Frames are intended as MVP mini-apps to validate market fit within Farcaster's user base or as gateways to larger existing products, the overhead of hosting such infrastructure may not be desirable. Similarly, for experimentation and learning purposes, the cost of setting up and maintaining these components may outweigh the benefits.
Free HUB endpoints
For these scenarios, the ideal solution would be to simply use existing free Farcaster endpoints to avoid infrastructure-related pain. As a public good, a free, fully synchronised Farcaster HUB endpoint is hosted by NodeRPC at https://api.noderpc.xyz/farcaster-mainnet-hub. Another list of free public endpoints can be found in this list.
Conclusion
We hope that with the availability of free Farcaster HUB endpoints, developers can now unleash their creativity and push the boundaries of decentralised social networking on Farcaster even further. And we look forward to seeing all the innovations and new applications that Frames will bring to the Farcaster world.