Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pryority/farframe

My attempt at building a Farcaster Frame.
https://github.com/pryority/farframe

bun elysia farcaster farcaster-frames opengraph

Last synced: 21 days ago
JSON representation

My attempt at building a Farcaster Frame.

Awesome Lists containing this project

README

        

# FarFrame

My attempt at building a Farcaster Frame. Less than 100 LOC.

![Demo](./demo.png)

## Made using Elysia.js

```Typescript
const app = new Elysia()
.use(staticPlugin())
.use(html())
.get(
"/",
() => `





FarFrame








FarFrame



`
)
.post("/api/frame", async ({ request }) => {
try {
await request.json();
} catch (error) {
return new Response(
JSON.stringify({ error: "Invalid JSON in request body" }),
{
status: 400,
headers: { "Content-Type": "application/json" },
}
);
}

return new Response(
`






`,
{
status: 200,
headers: { "Content-Type": "text/html" },
}
);
})
.listen(PORT!);
```

### Inspirations

- [gskril](https://github.com/gskril)'s [farcast-frame](https://github.com/gskril/farcaster-frame)
- [Zizzamia](https://github.com/Zizzamia)'s [a-frame-in-100-lines](https://github.com/Zizzamia/a-frame-in-100-lines)