This is an template example of a basic build for a front-end application on top of Lens Protocol.
This template hosted with fleek.co at https://jolly-snow-9071.on.fleek.co/
getProfiles - get profiles by passing in a user's handle in the url /users/handle
explorePublications - returns a list of publications based on your request query
createProfile - Create a profile (only available on Amoy testnet)
createPost - Create a post (text content only, yours to extend)
follow - Follow a user
unfolow - Unfollows a user
You can view all of the APIs here and contract methods here
This project is built with the following open source libraries, frameworks and languages. | Tech | Description | | --------------------------------------------- | ------------------------------------------------------------------ | | ReactJS | JS Framework | | Vite | Frontend Tooling | | Typescript | Syntax for types | | React Router | Client Side Routing | | TailwindCss3 | CCS Framework | | WAGMI | A set of React Hooks for Web3 | | RainbowKit | RainbowKit is a React library that makes it easy to add wallet connection to your dapp. | | @apollo/client | a comprehensive state management library for JavaScript that enables you to manage both local and remote data with GraphQL |
Create a .env file, by copying the .env-example file and include your infura keys
Default set up for working with the Lens Protocol on Mumbai Testnet for dev and prod environments.
To switch prod environment to Polygon Mainnet, go into the src/constants.ts
file and change
export const IS_PRODUCTION = false;
to
export const IS_PRODUCTION = true;
To start the dev server on your machine:
yarn dev
To start the dev server on your network:
yarn dev --host
To make the production build:
yarn build
To preview the production build locally:
yarn serve