Description

This dapp allows a user to create their own link aggregator website on Web3. It is an MVP version of Linktr.ee but entirely decentralized. With the app being decentralized, we are able to give the user complete ownership of their data (they are set as the registrant of the subdomain) and the ability to have a site without worrying about hosting.

LinkENS showcase

How it's made

The project is split into four main pieces and runs on the Ropsten testnet: the dapp, the smart contract ENS registrar, user sites, and a Netlify Function to deploy user sites. The dapp is a Svelte SPA that lives on IPFS. It is automatically deployed by Fleek on every push to `main`. The smart contract is a controller of the main ENS node (ethonline2021char.eth) and is used to register subnodes. After the subnode is registered, the PublicResolver is updated with any text records that were passed to the function. This process works exactly like `multicall` (a function on PublicResolver). Once all of the records are updated, ownership is transferred from the smart contract to the `msg.sender`. Prior to the registrar being called, an HTML file is deployed to IPFS (via web3.storage). This HTML file has the users chosen subdomain hardcoded into the file. When loaded in a browser, the embedded javascript will use the subdomain to pull ENS text records off the blockchain (via Alchemy API). This HTML file is deployed by Netlify Functions as a way to hide the web3.storage API token.