Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/pryority/farframe
- Owner: Pryority
- Created: 2024-01-29T17:17:07.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-01-29T18:34:46.000Z (11 months ago)
- Last Synced: 2024-10-26T11:10:40.360Z (2 months ago)
- Topics: bun, elysia, farcaster, farcaster-frames, opengraph
- Language: TypeScript
- Homepage: https://farframe.fly.dev
- Size: 493 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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)