Рет қаралды 15,347
Learn how to build a decentralized social media application using Lens Protocol, thirdweb Next.js, Tanstack Query, and GraphQL Codegen! Learn everything from what Lens Protocol is and how it works, to building a full-stack web3 application on top of Lens.
🍃 Resources 🍃
- How to create a testnet Lens profile: gateway.ipfscdn.io/ipfs/Qmdjb...
- Lens API Examples Repo: github.com/lens-protocol/api-...
🥫Source Code 🥫
GitHub: github.com/jarrodwatts/lens-c...
Replit: replit.com/@JarrodWatts/lens-...
📙Community Support 📙
My Discord: / discord
thirdweb Discord: / discord
🧰 Tools used in this video 🧰
- Lens Protocol: docs.lens.xyz/
- thirdweb: portal.thirdweb.com/
- Next.js: nextjs.org/
- Tanstack React Query: tanstack.com/query/v4/
- GraphQL Codegen: the-guild.dev/graphql/codegen
🍕 Follow Me 🍕
Twitter: / jarrodwattsdev
Lens: www.lensfrens.xyz/jarrodwatts...
⌚ Timestamps ⌚
0:00 - Introduction
01:52 - What is Lens?
15:08 - How Lens Works
24:22 - The Lens Indexer
30:32 - Frontend Tech Stack
35:26 - Creating a Next.js App
39:05 - Tanstack Query
51:07 - GraphQL Codegen
1:15:37 - Custom Fetcher Function
1:23:42 - Thirdweb
1:36:33 - Sign in with Lens
2:01:47 - Persisting Auth State
2:19:22 - Authenticated API Requests
2:29:41 - Lens User Profiles
2:45:10 - Debugging Auth Setup
2:54:28 - Tanstack Query Invalidation
2:59:25 - Feed Page
3:23:27 - Profile Page
3:55:30 - Header Component
4:02:45 - EIP712, Broadcaster & Dispatcher
4:16:09 - Following Users
4:45:09 - Creating Posts
5:23:15 - Deploying to Vercel
5:25:12 - Outro - Subscribe!
🏫 Video Summary 🏫
This video covers everything from what Lens is to how to deploy a full-stack robust web3 application to production. The Lens Protocol is a set of smart contracts deployed to the Polygon blockchain that provide a decentralized social graph.
With Lens, developers can quickly build decentralized applications (dApps) that leverage this social graph to create a variety of social media functionality, including user profiles, follow relationships, and content sharing.
By the end of this tutorial, you'll have a deep understanding of how to use the Lens Protocol to build decentralized social media applications, and be well-equipped to deploy your own application to production.