yarn dev:ipfs:preview
)Note: Access to https://ethquad.crypto is in progress pending resolution to an IPFS Hash to direct it Note: Pending resolution of this issue https://github.com/ltfschoen/ethquad/issues/15
nvm use;
yarn global add concurrently;
cd powergate/docker
make localnet
cd powergate/docker
make up
yarn dev
yarn dev:ipfs:preview
yarn dev
instead, since it may be caused by React.js that aren't being shown.node ./scripts/unstoppableDomainsRedirect.js
Generate an IPFS Hash (for redirecting the ethquad.crypto domain name to a traditional domain). Repeat this in future if the traditional domain name (i.e. ethquad.herokuapp.com) changes.
Verify that the IPFS Hash has been created with name 'EthQuad-prod-traditional' at https://pinata.cloud/pinexplorer
Go to https://unstoppabledomains.com/manage and change the IPFS Hash value the new IPFS Hash that is output to the terminal. Check for when the .crypto domain name resolves to the new IPFS Hash by running node ./scripts/unstoppableDomainsRedirect.js
(without any flags). It will redirect when a value is output for Read record of IPFS redirection hash:
.
Alternatively try setting the IPFS Hash programmatically by running node ./scripts/unstoppableDomainsRedirect.js --setRedirectIpfs
. However, this approach would require you to add the following to your .env file:
ETHEREUM_ADDRESS
that owns the .crypto domain nameMNEMONIC
phrase associate with the above Ethereum addressINFURA_PROJECT_ID
and INFURA_PROJECT_SECRET
to connect to Ethereum Mainnet using Infuranode ./scripts/unstoppableDomainsRedirect.js --setRedirectTraditionalDomain
to redirect the .crypto address to a Traditional Domain like https://ethquad.herokuapp.com directly is not currently supported by Unstoppable Domains.yarn run build:release:ipfs-traditional-domain
Push changes to IPFS & Heroku
git push heroku master
Note: Heroku will build dependencies, then run the "heroku-postbuild" script in package.json. The "build:release:ipfs" script will deploy the front-end to an IPFS hash.
Configure Heroku
heroku git:remote -a ethquad
Set Heroku Environment Variables to match the contents of the .env file. Replace missing values below:
heroku config:set \
KEY1=VALUE \
KEY2=VALUE
heroku config --app ethquad
If you get a nodemon
issue due to server already running on a port just run ps -ef | grep node
and kill all associated processes kill -9 <PID>
https://gitcoin.co/hackathon/own-the-internet
Goal:
Skynet
Handshake
Examples
Docs:
EthQuad is an open-source application that has now been extended to integrate both the Sia Skynet and Handshake ecosystems, as a step toward building a platform to help developers build on Skynet and Handshake.
It incorporates tooling to allow users to generate and upload a "redirection" page file to a Sia Skynet hash (Skylink) using the Skynet Node.js SDK to improve the developer experience. The "redirection" page may be configured to redirect to a given Handshake Domain Name (e.g. epiphysitis/) at a Skynet Portal (e.g. https://siasky.net/hns/epiphysitis/).
The tooling allows users to generate and upload a "website" from a given website folder to a different Skylink using the Skynet Node.js SDK. The "website" at EthQuad includes a React.js front-end with TypeScript support.
The tooling authenticates with the Namebase API to allow users to configure their Handshake Domain Name's Blockchain DNS records to resolve to the Skylink of that "website".
In future this tooling could be extracted into a separate application on the Skynet App Store, a CLI application, or an NPM library with configuration options to automatically generate a website using a chosen technical stack for customisation, then upload it to a Sia Skylink, and then automatically choose an freemium Handshake Domain Name and have it resolve to that Skylink.
In the process of extending EthQuad, Namebase website user experience issues were raised by ltfschoen at feedback.namebase.io, Skynet Node.js SDK issues were raised at https://github.com/NebulousLabs/nodejs-skynet/issues/47 and https://github.com/NebulousLabs/nodejs-skynet/issues/48.
The tooling for Sia Skynet and Handshake that was created in this project was applied to my other open-source decentralized game FlappyTips, which is built with React.js and p5.js, to deploy it to a Skylink hash (e.g. https://siasky.net/AADhTfgZns00r6rYpyThLQwLDxAea57EegdNN-leYGf07w/) and associated with a Handshake domain (e.g. https://siasky.net/hns/flappy) in this Pull Request https://github.com/ltfschoen/flappytips/pull/15.
Additional functionality is currently being investigated.
Connect to Lotus (Filecoin) and IPFS (see section "Connect to Lotus (Filecoin) and IPFS")
Add your Handshake (HNS) Domain HNS_DOMAIN
to the .env file (e.g. HNS_DOMAIN=epiphysitis
)
Build the website for Development or Production. If Development is chosen the backend API is expected to be running on localhost:5000/api instead of at https://ethquad.herokuapp.com/api.
IMPORTANT: If using PowerGate, wait until it is fully running before running the following.
Development (without Skylink deployment)
yarn dev
Development (using Skynet)
yarn dev:build:sia-handlebars
Production (using Skynet)
yarn build:release:sia-handlebars
When using Skynet will run the following:
Run the server
yarn dev:server:sia-handlebars
Go to https://siasky.net/<SKYLINK_WEBSITE>
Run the following to:
NAMEBASE_ACCESS_KEY
and NAMEBASE_SECRET_KEY
in .env according to https://learn.namebase.io/advanced-topics/setting-dns-records#get-namebase-api-key so that it resolves to index.html file in the website folder at the Skylink that was recorded in ./skylink-website.txtPUT=true node ./scripts/handshakeDomainSetSkynetPortalRecord.js
Alternatvely, manually update the Handshake domain's DNS records by going to https://www.namebase.io/domain-manager/<HANDSHAKE_DOMAIN_NAME> and adding a TXT record that points the domain to the Skylink of the Website <SKYLINK_WEBSITE>/index.html, and then waiting ~10 minutes for domain changes to propagate through Handshake nodes syncing the changes. If you change the NS record too it may take more than a day for changes to propagate.
Verify the Handshake domain's resolve configuration has been updated by either:
node ./scripts/handshakeDomainSetSkynetPortalRecord.js
.
upToDate
value has changef to true