Host a UI

Hosting a UI

An implementation of the Audaces protocol UI can be found on GitBooks.

Starting a local environment

1
yarn && yarn start
Copied!
To create a production build that can be served by a static file server:
1
yarn build
Copied!

Customization

The Audaces protocol UI uses React and Material UI. To learn how to customize it, refer to their official guide

Collecting fees

You can collect 10% of the fees via hosting a UI or sharing your referral link.
The Audaces protocol supports referral links via the Solana Naming Service. In order to allow referral links, the environment variable needs to be set to true
1
REACT_APP_ALLOW_REF_LINKS=true
Copied!
To disable referral links
1
REACT_APP_ALLOW_REF_LINKS=false
Copied!
In order to create a referral link:
  • Register your Twitter handle using the Solana Naming Service
  • Create a USDC account in the wallet linked to your Twitter handle
After completing these two steps, your referral link will be https://<ui_domain>/ref/<your_twitter_handle>

Hosting a UI

You can also collect fees by hosting a UI. In order to collect the fees, you need to modify the .env file that looks like this:
1
REACT_APP_REFERRAL_FEES_ADDRESS=
Copied!
To collect fees enter your USDC SPL address, for example if your USDC address is CQkAGKEAXWSMGgd8k7N6QqxBtyz7xfMb4MFHPzC9rVhA
1
REACT_APP_REFERRAL_FEES_ADDRESS=CQkAGKEAXWSMGgd8k7N6QqxBtyz7xfMb4MFHPzC9rVhA
Copied!
⚠️ It needs to be USDC address, it cannot be a SOL address.

Hosting

Hosting on Github Pages

The UI can be hosted on Github pages using gh-pages.
Installing gh-pages
1
yarn add -D gh-pages
Copied!
Add the following to the package.json file
1
"predeploy": "git pull --ff-only && yarn && yarn build",
2
"deploy": "gh-pages -d build"
Copied!
Deployment
1
yarn deploy
Copied!

Hosting on IPFS

The UI can be hosted on IPFS pages using ipfs-deploy.
Installing ipfs-deploy
1
yarn global add ipfs-deploy
Copied!
Add the following to the package.json file
1
"predeploy": "git pull --ff-only && yarn && yarn build",
2
"deploy": "ipfs-deploy build"
Copied!
Deployment
1
yarn deploy
Copied!
To deploy using Cloudflare refer to the official documentation of ipfs-deploy: https://github.com/ipfs-shipyard/ipfs-deploy
Last modified 1mo ago