Quick Start

Basic concepts

Base Protocol allows developers to build web3 social applications quickly and easily. As a developer, you can use the Base implementation on BNB Chain, Polygon, or implement the protocol yourself on any EVM-compatible blockchain network. In this tutorial, you'll use the Lens API to get and render social media feeds, navigate to view profiles, and get and view a user's publications.

You can always test the Lens API here using any GraphQL query in the API documentation.

Prerequisite

To successfully complete this tutorial, you must have Node.js installed on your computer.

Install Node.js using NVM Install Node.js using FNM

Get started

We will create and configure the Next.js application.

To generate a new next-.js application, run the following command from your terminal:

Create API

Creating the basic GraphQL API is as simple as a few lines of code. We will also define the first GraphQL query that we will use in our application.

Create a new file named api.js in the root directory of the new project and add the following code:

Last updated