forked from mito-systems/sol-mem-gen
Part of https://www.notion.so/Option-to-post-paid-for-memes-to-twitter-x-18ca6b22d4728051804ef4f55065d5ba Co-authored-by: AdityaSalunkhe21 <adityasalunkhe2204@gmail.com> Reviewed-on: #16 |
||
|---|---|---|
| deploy | ||
| src | ||
| target | ||
| .env.example | ||
| .gitignore | ||
| Anchor.toml | ||
| index.html | ||
| next-env.d.ts | ||
| next.config.mjs | ||
| package-lock.json | ||
| package.json | ||
| postcss.config.js | ||
| quotes-service.ts | ||
| README.md | ||
| server.ts | ||
| styles.css | ||
| tailwind.config.ts | ||
| tsconfig.json | ||
| tsconfig.server.json | ||
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.examplefile to.envand add your API keys:cp .env.example .env.local -
Add your FAL AI key to the
.envfile:# 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 Keybutton to create a new key -
Choose the
Adminscope 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= # Mark to market twitter handle: @mark_2_market0 NEXT_PUBLIC_TWITTER_HANDLE= # Add a secret random string that will be used to access the page to submit tweets for verification # This secret will be checked against the URL to either allow or deny access # The URL should look something like this: http://localhost:3000/submit-tweets/<your-verify-tweet-secret> VERIFY_TWEET_SECRET=
-
-
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.
Deploy
Follow instructions for deploying sol-mem-gen and sol-token-locker