ipfs-examples / helia-examples

How to do most anything with your Helia node
https://verified-fetch.vercel.app
64 stars 58 forks source link

feat: create single example to host mini-code-snippets #70

Open SgtPooki opened 1 year ago

SgtPooki commented 1 year ago

While helping out with HackFS, several questions came up that I think would make great tiny examples.

tiny examples that I think would be useful for the community

based on some recent ETHGlobal HackFS questions in the #partner-ipfs channel.

Some thoughts about how we should add tiny examples in this repo:

catch-all with links to Codepen/stackblitz

I don't think it would make sense to use codepen/stackblitz for these because they would quickly become out of date or forgotten.

Single repo for each tiny example

A lot of overhead and a lot of duplicated code.

Single repo for all tiny examples

I think this option is best.

We could create a single repo, similar to helia-101, where we share the main helia instance, and only render different UI components via SPA, where each path is its own codepen-esque view for a particular use-case.


Questions for @helia-dev (@achingbrain & @whizzzkid) and @discordian folks:

  1. Does this seem valuable to you?
  2. Would you rather have a single example for these smaller scenarios, or should we have each as its own separate example repo?
  3. Is there a better option I didn't consider?
  4. Are there other tiny examples that may make sense?
whizzzkid commented 1 year ago

I can get behind this:

We could create a single repo, similar to helia-101, where we share the main helia instance, and only render different UI components via SPA, where each path is its own codepen-esque view for a particular use-case.

However, I'd like interactive demos, since helia runs in the browser, it would be nice to have batteries included. Maybe a SPA to demo examples like a design system.

SgtPooki commented 1 year ago

I'd like interactive demos, since helia runs in the browser, it would be nice to have batteries included.

I think this would be much harder to maintain in the long term. I think exposing the helia instance and letting people run commands in the terminal if they want is fine, but we likely won't be able to keep an example that has interactivity up-to-date easily.

Maybe a SPA to demo examples like a design system.

i'm not sure what you mean by "like a design system." can you clarify?

achingbrain commented 1 year ago

I like it, sort of like a cookbook for code snippets. As long as they all have tests!