CyberConnect Protocol is a decentralized social graph protocol that helps Web3 applications bootstrap network effects. It empowers users to truly own their social identities, contents, and connections in a social network and provides developers with a rich set of tools to build applications with meaningful social experiences.
The repo contains the full code for the How to Build Content app guide from the CyberConnect Developer Center.
The project was built to help developer with the basic functionalities necessary to develop a content application by taking advantage of the full power of CyberConnect APIs.
This example contains all the steps described in the docs:
- Create a Profile
- Authentication
- Subscribe to Profile
- Create a Post
- Collect a Post
- Middleware for Subscribe
- Middleware for Post
Make sure that you have installed Node.js on your computer and MetaMask extension in your Chrome browser.
Clone the repo https://github.com/cyberconnecthq/cc-content-app.git and run the following command in your terminal to install all the packages that are necessary to start the development server: npm install
or yarn install
.
In order to pin content to IPFS and relay your transactions through a relayer, you're going to need to setup some environmental variables
To create a copy of the .env.example
file run the following command
cp .env.example .env
and populate the file with the following
NEXT_PUBLIC_API_KEY
andNEXT_PUBLIC_API_SECRET
are for uploading metadata using Pinata (register on Pinata).NEXT_PUBLIC_CYBERCONNECT_API_KEY
is for therelay
mutation.
We have a default API key setup in the repo, but the relayer may run out of tBNB. If so then please signup to get your own API key from our dashboard and deposit
tBNB
into the relayer address. (you can use BNB Faucet to get tBNB)
To start the local development server run the following command and open up the browser window http://localhost:3000. Most changes are reflected live without having to restart the server: npm run dev
or yarn dev
.
These are our communication channels, so feel free to contact us:
- Discord
#developers
channel - @CyberConnectHQ on Twitter
- Github for issues