Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Latest commit

Β 

History

History
36 lines (26 loc) Β· 1.5 KB

ARCHITECTURE.md

File metadata and controls

36 lines (26 loc) Β· 1.5 KB

IPFS Architecture

Table of Contents

Annotated version

What does this image explain?

  • IPFS uses ipfs-repo which picks fs or indexeddb as its storage drivers, depending if it is running in Node.js or in the Browser.
  • The exchange protocol, bitswap, uses the Block Service which in turn uses the Repo, offering a get and put of blocks to the IPFS implementation.
  • The DAG API (previously Object) comes from the IPLD Resolver, it can support several IPLD Formats (i.e: dag-pb, dag-cbor, etc).
  • The Files API uses ipfs-unixfs-engine to import and export files to and from IPFS.
  • libp2p, the network stack of IPFS, uses libp2p to dial and listen for connections, to use the DHT, for discovery mechanisms, and more.

Code Architecture and folder Structure

Source code

> tree src -L 2
src                 # Main source code folder
β”œβ”€β”€ cli             # Implementation of the IPFS CLI
β”‚   └── ...
β”œβ”€β”€ http            # The HTTP-API implementation of IPFS as defined by HTTP API spec
β”œβ”€β”€ core            # IPFS implementation, the core (what gets loaded in browser)
β”‚   β”œβ”€β”€ components  # Each of IPFS subcomponent
β”‚   └── ...
└── ...