A Next.js application that combines AI (Anthropic/OpenAI APIs) with blockchain trading capabilities for meme coins on Solana and BNB chains.
✨ AI-Powered Trading
- Anthropic Claude & OpenAI GPT integration
- Voice commands via OpenAI Whisper & TTS
- Natural language order creation
🔗 Multi-Chain Support
- Solana trading via strategy pattern
- BNB Chain trading via viem
- Unified trading interface
📊 Smart Conditional Orders
- Price-based conditions
- Market cap triggers
- Volume thresholds
- Time-delayed execution
🎨 Modern UI
- Built with Next.js 14 App Router
- Tailwind CSS + shadcn/ui components
- Responsive design
- Real-time updates
npm installCopy .env.example to .env.local:
cp .env.example .env.localEdit .env.local and add your API keys:
ANTHROPIC_API_KEY=your_anthropic_key_here
OPENAI_API_KEY=your_openai_key_herenpm run devOpen http://localhost:3000 to see the app.
- Navigate to Settings page
- Enter your Anthropic and OpenAI API keys
- Keys are stored locally in your browser
ai-meme-trader/
├── app/ # Next.js App Router
│ ├── api/ # API routes
│ ├── dashboard/ # Main dashboard
│ └── settings/ # Settings page
├── components/ # React components
│ ├── ui/ # shadcn components
│ ├── trading/ # Trading components
│ └── layout/ # Layout components
├── lib/ # Core logic
│ ├── trading/ # Trading strategies
│ ├── ai/ # AI integration
│ └── data/ # Mock data
├── types/ # TypeScript types
└── config/ # Configuration files
// Abstract interface
interface TradingStrategy {
buyToken(params): Promise<TransactionResult>;
getBalance(address): Promise<Balance>;
}
// Implementations
- SolanaStrategy
- BNBStrategy- 60+ generated meme tokens
- Real-time price simulation
- Easy switch to production APIs
- Monitors orders every 5 seconds
- Supports 4 condition types
- Automatic execution when triggered
- Framework: Next.js 14 with App Router
- Language: TypeScript
- Blockchain: viem (BNB) + @solana/web3.js
- AI: Anthropic SDK + OpenAI SDK
- UI: Tailwind CSS + shadcn/ui
- State: React Context + Zustand
✅ Completed
- Project setup and configuration
- Trading strategy pattern implementation
- Mock meme data generation (60+ tokens)
- AI integration (Anthropic + OpenAI)
- Voice processing (Whisper + TTS)
- Conditional order system
- Basic UI components
- Dashboard and settings pages
🚧 In Progress
- Full UI component library
- AI chat interface
- Order management page
📋 Planned
- Wallet connection
- Real API integration (DexScreener, Jupiter)
- Production trading execution
- Advanced analytics
Currently running in Mock Mode:
- All trades are simulated
- Token data is generated
- No real blockchain transactions
To switch to production:
- Implement real API calls in
lib/data/ - Enable actual swap transactions in strategies
- Connect wallet adapter
- Update environment variables
Thanks to the strategy pattern, adding new chains is easy:
- Create new strategy:
lib/trading/strategies/NewChainStrategy.ts - Implement
TradingStrategyinterface - Register in
TradingContext.tsx - Update types in
types/trading.ts
MIT
This is an educational project. Trading cryptocurrencies involves significant risk. Always do your own research and never invest more than you can afford to lose.