nshki / remix-directory

Find the Remix stack that works for you. Or add your own.
https://remix.directory
MIT License
41 stars 7 forks source link

Show GitHub Stars #19

Open joshmedeski opened 2 years ago

joshmedeski commented 2 years ago

It would be cool to display GitHub stars while browsing the page. To get a sense of which stacks are more popular than others.

This project is just storing the stacks as json right now, so there's no database to update remotely and store the star counts.

Also, the GitHub API has a rate limit and would need to be properly authenticated to allow this feature to work regularly. I'd also love to add a caching mechanism so we don't have to pull from GitHub more than once a day.

nshki commented 2 years ago

I like the idea of displaying GitHub stars, definitely! I wonder if there's some fun opportunity to try and take advantage of GitHub's Open Graph image tags for this.

e.g. Here's the one for Remix Directory:

You can find it by pulling the <meta property="og:image"> tag of a repository. That would avoid the need of having a database to try and maintain star counts with too.

Alternatively, I think using the GitHub API would probably be fine if we also pair it with old fashioned HTTP caching on a CDN, which the Remix folks tout!