This is a Next.js application that demonstrates key features of the Tapestry Protocol. Use this as a starting point for integrating social features into your Solana dApp.
🔑 Get API Key: app.usetapestry.dev
📚 API Reference: docs.usetapestry.dev/api
- Create new profiles with username and wallet address
- View profile information including follower/following counts
- List all profiles in the system
- Get suggested profiles based on wallet address
API Endpoints Used:
POST /profiles/findOrCreate
- Create new profileGET /profiles/{username}
- Get profile detailsGET /profiles
- List all profilesGET /profiles/suggested/{walletAddress}
- Get suggested profiles
- Follow/unfollow other users
- View followers list
- View following list
API Endpoints Used:
POST /followers/add
- Follow a userPOST /followers/remove
- Unfollow a userGET /profiles/{username}/followers
- Get user's followersGET /profiles/{username}/following
- Get user's following list
- Create comments on content
- Support for nested comments (replies)
API Endpoints Used:
POST /comments
- Create new comment
- Node.js 16+
- Yarn package manager
- Solana wallet (Phantom, Solflare, etc.)
Before you begin, you'll need to get a Tapestry API key:
- Visit app.usetapestry.dev
- Create an account or sign in
- Create a new API key
- Copy your API key - you'll need it for the next step
Create a .env.local
file in the root directory:
TAPESTRY_API_KEY=xxx
TAPESTRY_URL=https://protocol-server.fly.dev/v1
Install the dependencies
yarn install
yarn dev
Open http://localhost:3000 with your browser to see the result.
Tapestry endpoints are defined in the file tapestry.ts