{"id":18584416,"url":"https://github.com/ipfs-examples/helia-examples","last_synced_at":"2025-04-10T12:30:42.363Z","repository":{"id":104999224,"uuid":"596906716","full_name":"ipfs-examples/helia-examples","owner":"ipfs-examples","description":"Ready-to-run Helia examples for Node.js and the browser","archived":false,"fork":false,"pushed_at":"2024-10-18T10:10:58.000Z","size":4249,"stargazers_count":78,"open_issues_count":29,"forks_count":62,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-19T11:21:11.966Z","etag":null,"topics":["helia","ipfs","ipfs-helia","js-libp2p"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ipfs-examples.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-03T07:29:04.000Z","updated_at":"2024-10-16T23:24:55.000Z","dependencies_parsed_at":"2023-10-13T00:01:45.205Z","dependency_job_id":"8b4d7dae-d091-404c-9e94-d76364ca3988","html_url":"https://github.com/ipfs-examples/helia-examples","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipfs-examples%2Fhelia-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipfs-examples%2Fhelia-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipfs-examples%2Fhelia-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipfs-examples%2Fhelia-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ipfs-examples","download_url":"https://codeload.github.com/ipfs-examples/helia-examples/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223436325,"owners_count":17144752,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["helia","ipfs","ipfs-helia","js-libp2p"],"created_at":"2024-11-07T00:27:27.698Z","updated_at":"2024-11-07T00:27:28.212Z","avatar_url":"https://github.com/ipfs-examples.png","language":null,"funding_links":[],"categories":["Others"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/ipfs/helia\" title=\"Helia\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/ipfs/helia/main/assets/helia.png\" alt=\"Helia logo\" width=\"300\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch3 align=\"center\"\u003eA collection of Helia examples\u003c/h3\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/jlord/forkngo/gh-pages/badges/cobalt.png\" width=\"200\"\u003e\n  \u003cbr\u003e\n  \u003ca href=\"https://ipfs.github.io/helia/modules/helia.html\"\u003eExplore the docs\u003c/a\u003e\n  ·\n  \u003ca href=\"https://codesandbox.io/\"\u003eView Demo\u003c/a\u003e\n  ·\n  \u003ca href=\"https://github.com/ipfs-examples/helia-examples/issues\"\u003eReport Bug\u003c/a\u003e\n  ·\n  \u003ca href=\"https://github.com/ipfs-examples/helia-examples/issues\"\u003eRequest Feature/Example\u003c/a\u003e\n\u003c/p\u003e\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [About The Project](#about-the-project)\n- [Getting Started](#getting-started)\n  - [Examples](#examples)\n    - [Basics](#basics)\n    - [Frameworks](#frameworks)\n    - [Bundlers](#bundlers)\n    - [Testing](#testing)\n    - [Other tooling](#other-tooling)\n  - [Prerequisites](#prerequisites)\n- [IPFS Tutorials at ProtoSchool](#ipfs-tutorials-at-protoschool)\n- [Documentation](#documentation)\n- [Contributing](#contributing)\n  - [How to add a new example](#how-to-add-a-new-example)\n    - [Examples must](#examples-must)\n    - [Update `helia` to run tests against the repo](#update-helia-to-run-tests-against-the-repo)\n- [Want to hack on IPFS?](#want-to-hack-on-ipfs)\n\n## About The Project\n\n- Read the [docs](https://ipfs.github.io/helia/modules/helia.html)\n- Look into other [examples](https://github.com/ipfs-examples/helia-examples) to learn how to spawn a Helia node in Node.js and in the Browser\n- Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n- Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n- Check out https://docs.ipfs.io for tips, how-tos and more\n- See https://blog.ipfs.io for news and more\n- Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Getting Started\n\n### Examples\n\nFeel free to jump directly into the examples, however going through the following sections will help build context and background knowledge.\n\n#### Basics\n\n- [Helia-101](/examples/helia-101/): Spawn a Helia node, add a file and cat the file\n- [Helia CommonJS](/examples/helia-cjs/): Just like Helia-101, but with [CommonJS](https://en.wikipedia.org/wiki/CommonJS) instead of [ESM](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules)\n- [Helia via CDNs](/examples/helia-script-tag/): A simple proof-of-concept to distributing and using Helia using `\u003cscript\u003e` tags\n- [Creating a CAR file with Helia](/examples/helia-create-car/): An example showing how to create a car file with Helia. CAR files are useful for making Filecoin deals.\n\n#### Frameworks\n\n- [Helia with Electron](/examples/helia-electron/): Create an Electron app with Helia\n- [Helia with Next.js](/examples/helia-nextjs/): Create a Next.js app with Helia\n- [Helia with NestJS](/examples/helia-nestjs/): Create a NestJS app with Helia\n- [Helia with Vue](/examples/helia-vue/): Create a vue app with Helia\n- [Helia with Vite](/examples/helia-vite/): Create a react+vite app with Helia\n\n#### Bundlers\n\n- [Helia with esbuild](/examples/helia-esbuild/): Bundle Helia with esbuild\n- [Helia with Webpack](/examples/helia-webpack/): Bundle Helia with webpack\n\n#### Testing\n\n- [Helia with Jest](/examples/helia-jest/): Test Helia with Jest\n- [Helia with Jest and TypeScript](/examples/helia-jest-typescript/): Test Helia with Jest and TypeScript\n\n#### Other tooling\n\n- [Helia with TypeScript](/examples/helia-typescript/): Building Helia with TypeScript\n- [Helia with ts-node](/examples/helia-ts-node/): Run Helia using ts-node\n\n### Prerequisites\n\nMake sure you have installed all of the following prerequisites on your development machine:\n\n- Git - [Download \u0026 Install Git](https://git-scm.com/downloads). OSX and Linux machines typically have this already installed.\n- Node.js - [Download \u0026 Install Node.js](https://nodejs.org/en/download/) and the npm package manager.\n\n## IPFS Tutorials at ProtoSchool\n\nExplore [ProtoSchool's IPFS tutorials](https://proto.school/#/tutorials?course=ipfs) for interactive Helia coding challenges, deep dives into DWeb concepts like content addressing, and more.\n\n## Documentation\n\n- [IPFS Primer](https://dweb-primer.ipfs.io/)\n- [IPFS Docs](https://docs.ipfs.io/)\n- [Tutorials](https://proto.school)\n- [More examples](https://github.com/ipfs-examples/helia-examples)\n- [API - Helia](https://ipfs.github.io/helia/modules/helia.html)\n- [API - @helia/unixfs](https://ipfs.github.io/helia-unixfs/modules/helia.html)\n\n## Contributing\n\nContributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\n1. Fork the IPFS Examples Project (`https://github.com/ipfs-examples/helia-examples`)\n2. Create your Feature Branch (`git checkout -b feature/amazing-feature`)\n3. Commit your Changes (`git commit -a -m 'feat: add some amazing feature'`)\n4. Push to the Branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n### How to add a new example\n\n1. 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`\n1. Create a folder in this repo under `examples`, eg. `./examples/helia-transfer-files`\n1. Add the files and tests that make up the example\n1. Add the folder name to the `project-list` lists in the `examples` and `push-changes` jobs in this repositories `./github/ci.yml`\n1. Open a PR with your changes\n1. :warning: Maintainer required: Use the [helia-example-fork-go-template](https://github.com/ipfs-examples/example-fork-go-template) to create a new repo in the `ipfs-examples` org for the new example to live in.\n   - Give it the same name as the example folder, e.g. `https://github.com/ipfs-examples/helia-transfer-files`\n   - Disable wikis, projects, and issues\n1. :warning: Maintainer required: Review the example\n   1. Does it show the example clearly and concisely?\n   1. Does it have tests?\n   1. Does it contain the `.github` folder?\n   1. 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?\n1. :warning: Maintainer required: Merge the example, after a successful build all files should be copied into the newly created repo.\n\n#### Examples must\n\n- Live inside the `/examples/` folder\n- Have tests and should make use of `test-util-ipfs-example` library\n- Implement the following scripts:\n - `clean`: used to clean all the unnecessary code (e.g.: files generated by bundlers and package managers)\n - `build`: used to build the example\n - `start`: used to start the example\n - `test`: used to test the example\n- The `README.md` must have (see example inside `example-template`):\n  - Link to `Codesandbox.com` for one-click running demonstration\n  - References for documentation/tutorials used to build the example\n  - _Optional:_ Screenshots, gifs, etc... under `img/` folder\n- Update the CI to run the tests of the new example as standalone\n  - Edit `github/workflows/ci.yml`\n  - Add the test name to `project` under `matrix`\n\n#### Update `helia` to run tests against the repo\n\nOpen a PR to the [ipfs/helia](https://github.com/ipfs/helia) project that edits the `.github/workflows/examples.yml` in order to make sure a Helia release does not break your new example.\n\nSearch `.github/workflows/test.yml` for the `test-examples` section and add a block at the end of the `example` matrix key similar to:\n\n```yml\n- name: my super fun new example\n  repo: https://github.com/ipfs-examples/helia-my-super-fun-new-example.git\n  deps: helia@$PWD/packages/helia/dist\n```\n\nThe 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.\n\nPlease see the existing setup in `.github/workflows/test.yml` for how to ensure you are overriding the correct modules.\n\n## Want to hack on IPFS?\n\n[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/CONTRIBUTING.md)\n\nThe IPFS implementation in JavaScript needs your help! There are a few things you can do right now to help out:\n\nRead the [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md) and [JavaScript Contributing Guidelines](https://github.com/ipfs/community/blob/master/CONTRIBUTING_JS.md).\n\n- **Check out existing issues** The [issue list](https://github.com/ipfs/helia/issues) has many that are marked as ['help wanted'](https://github.com/ipfs/helia/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22help+wanted%22) or ['difficulty:easy'](https://github.com/ipfs/helia/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Adifficulty%3Aeasy) which make great starting points for development, many of which can be tackled with no prior IPFS knowledge\n- **Look at the [Helia Roadmap](https://github.com/ipfs/helia/blob/main/ROADMAP.md)** This are the high priority items being worked on right now\n- **Perform code reviews** More eyes will help\n  a. speed the project along\n  b. ensure quality, and\n  c. reduce possible future bugs\n- **Add tests**. There can never be enough tests\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fipfs-examples%2Fhelia-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fipfs-examples%2Fhelia-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fipfs-examples%2Fhelia-examples/lists"}