Skip to content
rhodeyPublic

About

IPFS apps with an update path.

Topics

Resources

Stars

15 stars

Watchers

0 watching

Forks

Repository files navigation

IPFS-boot

Publish IPFS webapps which require user consent to update.

Think about: crypto texting apps, crypto-wallets, crypto-exchanges see:

How this works

  1. Deploy a smaller version of React hot-code-reloading (bootloader (immutable))
  2. Point the bootloader to a .json URL which has a list of app versions
  3. Users visit your app using the bootloader CID/hash/address (immutable)
  4. Devs push new versions to the .json URL and users accept/reject (mutable)

It is intended that you share the sources of your fork of IPFS-boot and IPFS-boot-react or IPFS-boot-choo. The sources allow users to build and see the IPFS CID (a hash) you publish is the same as what they get from source. The CID of IPFS-boot will be the URL of your app, the CID of each update to your app (-react, -choo) goes in versions.json, and the bootloader polls this file.

The bootloader only gets published once but app updates (accepted) load JS/CSS which can restyle it.

Demos

Return to boot list anytime by add #boot to the url:

Dev

http://localhost:8080 will serve the bootloader. Style/change to your liking:

npm --prefix package/ ci
npm --prefix package/ run dev

Build

Build/package the bootloader for IPFS then print v0 and v1 CIDs:

docker buildx build --load -t ipfs-boot .
docker run --rm -i -v ./dist:/root/dist ipfs-boot

Pin

Read PIN.md to configure IPFS pinning then:

docker buildx build --load -f Dockerfile.pin -t ipfs-pin .
docker run --rm -i -v ./dist:/root/dist:ro --env-file .env ipfs-pin pin-dist --boot
> CIDv0 = QmakURKcgJp7RNjMcFsacKXn1ZjLchPce9hdiZxessqdaM
> CIDv1 = bafybeifym2gfx7vcf7mo725u7bakvcy4xumk6s4uwh3ew5gsjyghn7erhy
> Cloudflare: uploaded 9 blocks.
> Cloudflare: uploaded bootloader website files.
> Filebase: uploaded CAR.
> done: https://bafybeifym2gfx7vcf7mo725u7bakvcy4xumk6s4uwh3ew5gsjyghn7erhy.ipfs.dweb.link/

Your bootloader is now live and discoverable with v0 and v1 CIDs, see: gateways.

See: FAQ - What to do before prod?

License

MIT

About

IPFS apps with an update path.

Topics

Resources

Stars

15 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages