feat(web): copy the site's IPFS hash + custom-domain guide at /domain - #117
Merged
Conversation
Two halves of the same feature: letting people put a generated FxFiles website on their own domain. App (web only). `_stableLinkSection` gains a "Use your own domain" block showing the live site's CID with three actions: copy the raw hash, copy the ready-to-paste `/ipfs/<cid>` DNSLink value, and open the guide. It reads `pointer.currentCid`, so it stays consistent with the shareable link above it and renders a "publishing..." line instead of a stale hash. The screen already rebuilds on WebWebsiteService notify, and `_notify()` fires after `publishLatest()` resolves, so the row refreshes itself once a regenerate publishes. Guide. `site/domain/` -> https://files.fx.land/domain. Two entry paths (buy at Cloudflare / already own a domain elsewhere), then a shared walkthrough of Cloudflare's Web3 IPFS DNSLink gateway, how to update the hash after regenerating, and a troubleshooting section. Screenshots are real captures of the live dashboard, cropped to the relevant region and redacted (account email, zone/account IDs). Notes on the technical choice: - Cloudflare shut down its public IPFS gateway on 2024-08-14, so the old cloudflare-ipfs.com CNAME advice is dead. The Web3 DNSLink gateway is the current path and is on the free plan (15 gateways, 50 GB included). - DNSLink points at /ipfs/<cid>, not /ipns/<k51...>: w3name records are not DHT-published, so the IPNS name does not resolve on public gateways (see cloudflare/README.md). Hence the "re-paste after each regenerate" step, plus a redirect-rule alternative for people who would rather not. - Gateway creation 409s with code 1013 when an A/AAAA record already holds the hostname; documented in troubleshooting since the dashboard fails silently. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3971DnvQ8oVL3GAha4BRv
…r on mobile Dashboard captures are desktop-width only, so say so up front and tell phone users where the side menu went (tap the hamburger) at the one step that depends on it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3971DnvQ8oVL3GAha4BRv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lets someone put a website they generated in FxFiles onto their own domain.
1. App — copy the IPFS hash (web only)
_stableLinkSectiongains a Use your own domain block under the shareable link: the live site's CID in monospace, plus Copy IPFS hash, Copy DNSLink value (copies/ipfs/<cid>— the exact string Cloudflare's field wants) and a link to the guide.It reads
pointer.currentCid, so it always agrees with the shareable link above it, and shows a "publishing…" line rather than a stale hash. Refresh path verified rather than assumed:_pointerholds the liveWebsiteGroupPointerthe service mutates, the screen listens toWebWebsiteService, and_notify()fires afterpublishLatest()resolves — so the row updates itself once a regenerate publishes.flutter analyze: no issues.Native tree untouched.
2. Guide —
site/domain/→ files.fx.land/domainTwo entry paths behind tabs (buy at Cloudflare / already own a domain), then one shared walkthrough: Web3 → Create Gateway → IPFS DNSLink → paste
/ipfs/…→ Deploy. Then how to update after a regenerate, and troubleshooting.Screenshots are real captures of the live dashboard, cropped to the relevant region and redacted (account email, zone/account IDs).
Why this approach
cloudflare-ipfs.comCNAME is dead. The Web3 IPFS DNSLink gateway is the current path and is on the free plan — verified live in the dashboard: "You have used 0 of 15 IPFS DNSlink Gateways."/ipfs/<cid>, not/ipns/<k51…>. w3name records aren't DHT-published, so the IPNS name doesn't resolve on public gateways (documented incloudflare/README.md). Hence the "re-paste the hash after each regenerate" step — with a redirect-rule alternative for anyone who'd rather not.Things found by actually doing it
example.comand other domains you aren't associated with, so a sample zone can't be staged.(http.host eq "yourdomain.com")).Not included
No YouTube link: everything findable predates the Aug-2024 gateway shutdown and would actively mislead.
Dashboard screenshots are desktop-width only — the browser tooling reports resize success but keeps capturing at 1506×816, so phone-width captures weren't possible. Easy follow-up if wanted.
Also worth a follow-up: Step 1 is the one step with no screenshot, because the new app UI isn't deployed yet. Once this is live it can be captured and added.
Heads-up
A gateway
site.example.com(1 of 15) now exists on theexample.comzone in the Cloudflare account. It's inert — that zone is pending and never resolves — and is worth keeping for future re-screenshots, but delete it any time.🤖 Generated with Claude Code
https://claude.ai/code/session_01G3971DnvQ8oVL3GAha4BRv