js-ipfs
IPFS implementation in JavaScript
A deprecated JavaScript implementation of IPFS for storing and sharing files on a distributed network using content addresses instead of central server locations.
js-ipfs was a JavaScript implementation of IPFS, a protocol for storing and sharing files across a distributed network of computers rather than on a central server. With IPFS, when you add a file it gets a unique content address based on what the file contains, not where it is stored. Anyone with that address can retrieve the file from the network, and the file cannot be silently changed because its address would change too.
Important note from the README: this project is deprecated. It has been superseded by a newer project called Helia. The README states that security fixes will no longer be provided here, and links to migration instructions for anyone still using js-ipfs.
When it was active, js-ipfs could be used in two ways. The first was as a command-line tool: after installing it globally with npm, running jsipfs daemon started a background process that connected your machine to the IPFS network. You could then add files and receive a content address back. The second way was as a library inside a JavaScript application, where you would import it and create a node programmatically, adding content and reading back its address directly in code. It also worked inside web browsers, not just server-side Node.js environments.
The repository is organized as a collection of related packages within one repository, each handling a distinct part of the system: a core implementation, a command-line interface, an HTTP server, an HTTP gateway for serving content over standard web requests, a client library for connecting to a running node, and several protocol and communication layers. This structure allowed developers to use only the parts they needed.
For anyone encountering this project today, the README directs users to the replacement project Helia for current development, documentation, and community support.
Where it fits
- Add files to a distributed IPFS network from a Node.js script and get back a content address to share with others.
- Run a local IPFS daemon from the command line to connect your machine to the decentralized network.
- Build a browser app that reads and writes files to IPFS without needing a central server.