Publish IPFS webapps which require user consent to update.
Think about: crypto texting apps, crypto-wallets, crypto-exchanges see:
- Deploy a smaller version of React hot-code-reloading (bootloader (immutable))
- Point the bootloader to a .json URL which has a list of app versions
- Users visit your app using the bootloader CID/hash/address (immutable)
- 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.
Return to boot list anytime by add #boot to the url:
- React https://bafybeidquva2qhtucrhvohmu5deggqxokqvdgbpv5voza5ghd3pjeyixsm.ipfs.dweb.link
- Choo https://bafybeifym2gfx7vcf7mo725u7bakvcy4xumk6s4uwh3ew5gsjyghn7erhy.ipfs.dweb.link
http://localhost:8080 will serve the bootloader. Style/change to your liking:
npm --prefix package/ ci
npm --prefix package/ run dev
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
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?
MIT