sol-mem-gen/README.md
adwait fa168e5c61 Add feature to share generated memes on twitter and verify tweet (#10)
Part of https://www.notion.so/Option-to-post-paid-for-memes-to-twitter-x-18ca6b22d4728051804ef4f55065d5ba

- Generate dynamic page with required img and meta tags
- Add button to share generated meme to twitter

Co-authored-by: Adw8 <adwaitgharpure@gmail.com>
Co-authored-by: IshaVenikar <ishavenikar7@gmail.com>
Co-authored-by: AdityaSalunkhe21 <adityasalunkhe2204@gmail.com>
Co-authored-by: Nabarun <nabarun@deepstacksoft.com>
Reviewed-on: #10
Co-authored-by: adwait <adwait@noreply.git.vdb.to>
Co-committed-by: adwait <adwait@noreply.git.vdb.to>
2025-02-06 05:45:02 +00:00

1.5 KiB

sol-mem-gen

This project is a Solana-based meme generator that allows users to connect their wallets, pay with MTM tokens, and generate memes using AI models.

Features

  • Connect to Solflare and Phantom wallets
  • Pay with MTM tokens
  • Generate memes using various AI models

Prerequisites

  • Node.js
  • npm
  • Solflare or Phantom wallet

Setup

  • Install dependencies:

    npm install
    
  • Copy the .env.example file to .env.local and add your API keys:

    cp .env.example .env.local
    
  • Add your FAL AI key to the .env.local file:

    # Get key from https://fal.ai/
    FAL_AI_KEY=your_fal_ai_key
    
  • Setup a project on https://app.pinata.cloud

    • Visit https://app.pinata.cloud/developers/api-keys and click the New Key button to create a new key

    • Choose the Admin scope and create the API key

    • Copy the JWT that is displayed

    • Add the following to .env:

      PINATA_JWT=
      
      # Get the gateway from https://app.pinata.cloud/gateway
      PINATA_GATEWAY=
      
      # Add the account handle to be set in the tweet
      NEXT_PUBLIC_ACCOUNT_HANDLE=
      
  • Run the development server:

    npm run dev
    
  • Open your browser and navigate to http://localhost:3000.

Usage

  • Connect your Solflare or Phantom wallet using the "Connect Wallet" button.
  • Select an AI model and enter a prompt to generate a meme.
  • Pay the required MTM tokens and wait for the meme to be generated.