A full-stack dApp that verifies Solana transactions on-chain, scrapes web content, and uses Gemini AI to generate social media posts (tweets/threads).
- Backend: Rust (Axum, Solana SDK, Reqwest, Gemini API)
- Frontend: Next.js 16, React 19, Tailwind CSS 4, Solana Wallet Adapter
- Rust 1.75+
- Node.js 18+
- A Solana wallet (Phantom recommended)
- Gemini API key
Create backend/.env:
GEMINI_API_KEY=your_gemini_api_key
SOLANA_RPC=https://api.devnet.solana.com
PORT=3001Backend:
cd backend
cargo runFrontend:
cd frontend
npm install
npm run devThe frontend runs on http://localhost:3000 and communicates with the backend at http://localhost:3001.
| Method | Path | Description |
|---|---|---|
| POST | /generate |
Generate content from transaction + URL |
| GET | /health |
Health check |
Request:
{
"tx_signature": "...",
"url": "https://example.com/article",
"content_type": "thread"
}Response:
{
"success": true,
"content": "Generated tweet/thread text..."
}content_type can be "thread" (default) or "tweet".
solana/
├── backend/
│ └── src/
│ ├── main.rs # API routes
│ └── services/
│ ├── mod.rs # Service exports
│ ├── scraper.rs # URL scraping
│ └── gemini.rs # AI content generation
└── frontend/
├── src/
│ ├── app/ # Next.js pages
│ ├── providers/ # Wallet context
│ └── hooks/ # Custom hooks
└── package.json
- Fork the repository
- Create a feature branch (
git checkout -b feature/xxx) - Commit your changes
- Push to the branch
- Open a pull request