ipfs-examples / helia-examples

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

Helia logo

A collection of Helia examples


Explore the docs · View Demo · Report Bug · Request Feature/Example

Table of Contents

About The Project

Getting Started

Examples

Feel free to jump directly into the examples, however going through the following sections will help build context and background knowledge.

Basics

Frameworks

Bundlers

Testing

Other tooling

Prerequisites

Make sure you have installed all of the following prerequisites on your development machine:

IPFS Tutorials at ProtoSchool

Explore ProtoSchool's IPFS tutorials for interactive Helia coding challenges, deep dives into DWeb concepts like content addressing, and more.

Documentation

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the IPFS Examples Project (https://github.com/ipfs-examples/helia-examples)
  2. Create your Feature Branch (git checkout -b feature/amazing-feature)
  3. Commit your Changes (git commit -a -m 'feat: add some amazing feature')
  4. Push to the Branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

How to add a new example

  1. Decide on a pithy folder name for your example, it should start with helia- and ideally be one or two words that describe what it's about - e.g. helia-transfer-files
  2. Create a folder in this repo under examples, eg. ./examples/helia-transfer-files
  3. Add the files and tests that make up the example
  4. Add the folder name to the project-list lists in the examples and push-changes jobs in this repositories ./github/ci.yml
  5. Open a PR with your changes
  6. :warning: Maintainer required: Use the helia-example-fork-go-template to create a new repo in the ipfs-examples org for the new example to live in.
    • Give it the same name as the example folder, e.g. https://github.com/ipfs-examples/helia-transfer-files
    • Disable wikis, projects, and issues
  7. :warning: Maintainer required: Review the example
    1. Does it show the example clearly and concisely?
    2. Does it have tests?
    3. Does it contain the .github folder?
    4. Has it been added to the project-list lists in the examples and push-changes jobs in the ./github/ci.yml file of this repo?
  8. :warning: Maintainer required: Merge the example, after a successful build all files should be copied into the newly created repo.

Examples must

Update helia to run tests against the repo

Open a PR to the ipfs/helia project that edits the .github/workflows/examples.yml in order to make sure a Helia release does not break your new example.

Search .github/workflows/test.yml for the test-examples section and add a block at the end of the example matrix key similar to:

- name: my super fun new example
  repo: https://github.com/ipfs-examples/helia-my-super-fun-new-example.git
  deps: helia@$PWD/packages/helia/dist

The value of the deps key will vary depending on which modules from Helia your example uses. Above we override the helia module, but your example may different deps.

Please see the existing setup in .github/workflows/test.yml for how to ensure you are overriding the correct modules.

Want to hack on IPFS?

The IPFS implementation in JavaScript needs your help! There are a few things you can do right now to help out:

Read the Code of Conduct and JavaScript Contributing Guidelines.