Quick Setup
This guide will teach you how to create your own content application from scratch using Next.js.
Installation
Make sure that you have installed Node.js on your computer and MetaMask extension in your Chrome browser. Once they are installed you can open the terminal and run the command:
npx create-next-app@latest --ts
or
yarn create next-app --typescript
Apollo client
Since you will be using the Apollo client library to query the CyberConnect API, now it's a good time to open the in the terminal in the main directory of your app and install the following packages:
- npm
- Yarn
npm install @apollo/client graphql
yarn add @apollo/client graphql
Full code
info
The app you're going to build by following this guide is using the Link3 Profile smart contract for the Goerli Testnet Network. Please refer to the Cheat sheet to find the full list of contract addresses on top of the CyberConnect Protocol.
You can find the full code on GitHub https://github.com/cyberconnecthq/cc-content-app.git or test the live demo https://cc-content-app.vercel.app/.
Quick jumps
How to Build Content app will be covering the following:
- Create a Profile
- Authentication
- Subscribe to Profile
- Create a Post
- Collect a Post
- Middleware for Subscribe
- Middleware for Post
Let's dive into it and start building a content app!