DEV Community

Cover image for My first Web3 page with IPFS

My first Web3 page with IPFS

YAO ZELIANG on March 26, 2022

About As my first post in the community, I just want to record how I built and deployed my resume page on IPFS with Contentful and a cla...
Collapse
 
briancodes profile image
Brian

The eth link isn't working for me, other link does - site look good, nice animated page transitions

ipfs resolve -r /ipns/yaozeliang.eth/: could not resolve name: "yaozeliang.eth" is missing a DNSLink record (https://docs.ipfs.io/concepts/dnslink/)

Collapse
 
yaozeliang profile image
YAO ZELIANG

the link with ens domain: yaozeliang.eth.link/ (slow...)

Collapse
 
iravshan profile image
Sadikov Dev

Yeah

Collapse
 
thorstenhirsch profile image
Thorsten Hirsch

Can you give us some details how ENS and DNS differ in accessing IPFS? For example I've seen that the ENS version uses the CID with the path

/ipns/yaozeliang.eth/images/bg-01.jpg
Enter fullscreen mode Exit fullscreen mode

to access the bg image (which takes very long to load) while the DNS version uses

/ipfs/bafybeic6nofd74yeq6ksmejqewx3higowjzx2gouqqe4u3cb6yeku7ajzi/images/bg-01.jpg
Enter fullscreen mode Exit fullscreen mode

which seems to be the base32 representation of the CID. So when accessing IPFS content over DNS we need to use base32 for URL compliance...? Btw: I wonder why cloudflare has a cache miss in both cases.

Collapse
 
yaozeliang profile image
YAO ZELIANG

Sorry, I didn't go deeper about it. Maybe I can response to you later haha

Collapse
 
yaozeliang profile image
YAO ZELIANG

No, it's just a decentrenlized p2p file system, you don't need eth domain at all, here I used a third-party service Fleek, once deployed, we have a normal dns domain and a ContentID for IPFS, with that CID every node in the IPFS network can visit your site

Collapse
 
benjaminallanrahill profile image
Benjamin Allan-Rahill

If you go to a modern JS framework, I'd vouch for NextJS over Gatsby.

Collapse
 
yaozeliang profile image
YAO ZELIANG

Thanks for advice, I will compare them haha

Collapse
 
qm3ster profile image
Mihail Malo

So a bunch of paid centralized services? :/

 
yaozeliang profile image
YAO ZELIANG

content storage for now

Collapse
 
spaquet profile image
Stephane Paquet

what are the costs? (upload, ops, etc.)

Collapse
 
yaozeliang profile image
YAO ZELIANG

Deploy to IPFS doesn't cost anything, it's just node/peers as backend. but it will cost some "gas fee" when make a change to ENS domain, fleek will pay for this part. that means when there's a change in github, it will trigger deployment on Fleek automatically then fleek pays gas fee to synchronize the content attached to ENS domain.

For IPFS storage, I think the main benefit is high "download" speed since you request content from many peers/nodes in the network but not one central server. but for data privacy, ops...etc, I didn't find more advantages

Collapse
 
spaquet profile image
Stephane Paquet

Not that sure about the speed. Free IPFS comes with a major restriction from what I recall: the data will be cached in a node when the person operating the node access your data. Otherwise there is a pin fee (as you operate from a pinning service) to deploy and control a CDN like service on IPFS.
Another disadvantage is the fact that the cache can be cleared faster than expected removing the data from your users...
So as of today I'm not convinced by web 3 for this type of application, unless you want to circumvent some sort of censorship.

Thread Thread
 
yaozeliang profile image
YAO ZELIANG

totally agree !

Collapse
 
samifouad profile image
Sami Fouad

that's not what's happening with Fleek. They use IPNS hash to add to your ENS .eth name, not the IPFS hash.

So when the site is updated, it's getting a new IPFS hash but the static IPNS hash never changes, and this IPNS hash is always pointing towards the newest version of the site's IPFS hash, so there isn't a need to update ENS & spend gas every time you publish a change, that would be unsustainable for gas fees for fleek. It's a one-time update.

Thread Thread
 
samifouad profile image
Sami Fouad

I stand corrected. They don't pay for gas fees at all. You have to do the initial ENS update yourself, so you're paying the gas fees to add the IPNS hash to ENS. Then whenever you update your site, the IPFS hash will change of course, but IPNS hash won't, so there won't ever be a need to update it in the future.

please see this guide for more, also I think once you properly configure your ENS domain, loading will be faster. Right now, it's not configured correctly: docs.fleek.co/domain-management/en...