Coder Social home page Coder Social logo

vpoap's Introduction

POAP Feed demo

This is a simple demo for visualizing a live feed of POAP mints using a Goldsky Subgraphs as the data source. This demo is using the following tools:

  • @download/blockies to render the blocky avatars (when an ens avatar is not available)
  • napi-rs/canvas to render the blocky/ens avatars on a serverside canvas
  • @resvg/resvg-js to support transforming the satori content into PNG content
  • @urql/svelte to fetch the data from the subgraph GraphQL query endpoint
  • date-fns to format dates
  • frames.js to render farcaster frames in the head
  • satori to render dynamically generated opengraph images
  • viem to support fetching blockchain metadata (ens)

The demo

This demo will live feed all POAP mints, but we can also focus on a specific event (/event/ID), account (/account/ADDRESS), or token id (/token/ID). Events also support multi-select (comma separated) so that you can watch the live feed of all targeted events at once (e.g., /event/ID1,ID2,ID3). Each POAP token card has a number of links to internal routes and various external sources.

Opengraph support

When posting a link to social media (use the share icon in the header for cache busting urls), a generated opengraph image will be used to represent the link. This image is generated using the satori tooling and will be a visual representation of the the most recently minted token on that page.

Farcaster frames

When posting to farcaster, the opengraph image will be a farcaster frame. The initial image is a static image as per the spec, with actions to load dynamic content (e.g., Refresh latest). Each time an action is pressed a new image is generated which could represent a whole new POAP token that was minted.

Notes on the code

Svelte was chosen as the language to write this demo in as an opportunity to test out some tooling designed for Svelte. However frames.js and satori are really designed to be used with React. As such, I would recommend that anyone curious about building a similar web app, or using these same tools should strongly consider React instead of Svelte (and consider using @vercel/og instead of satori).

vpoap's People

Contributors

patsissons avatar

Stargazers

sagar jethi avatar  avatar

Watchers

Kevin Li avatar jling avatar

vpoap's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.