A vibe-coded Discord bot for buying and selling NFTs on Magic Eden with Wallet Connect integration. Built with TypeScript, Prisma, and all the latest APIs.
GRAND PRIZE:
- Junior/Trainee Developer Position with Bytes3 ๐ผ
- $300 USDC Cash Prize ๐ฐ
How to Enter:
- โ Solo or team entries accepted
- โ Follow @bytez3_ on X/Twitter
- โ Contact @bytez3_ on X to submit
- โฐ Deadline: November 30th, 2025 @ 11:59 PM UTC
Check out HACKATHON_GUIDE.md and COMPETITION_INFO.md for full details!
- ๐ Wallet Connect Integration - Connect your Solana wallet securely
- ๐ NFT Trading - Buy and sell NFTs directly from Discord
- ๐ Collection Analytics - Get floor prices, volume, and collection data
- ๐ NFT Search - Search for specific NFTs across collections
- ๐ค User Profiles - Track your trading history and preferences
- โ๏ธ Customizable Settings - Auto-buy features and notification preferences
- ๐ Bot Statistics - See overall trading activity and user engagement
git clone <your-repo-url>
cd magic-eden-discord-bot
npm installCopy the environment template and configure your settings:
cp env.example .env
# Edit .env with your API keys and configurationRequired Environment Variables:
# Discord Bot
DISCORD_BOT_TOKEN=your_bot_token_here
DISCORD_CLIENT_ID=your_application_id_here
# Magic Eden API
MAGIC_EDEN_API_KEY=your_api_key_here
MAGIC_EDEN_BASE_URL=https://api-mainnet.magiceden.dev/v2
# Wallet Connect
WALLETCONNECT_PROJECT_ID=your_project_id_here
# Database
DATABASE_URL="postgresql://username:password@localhost:5432/magic_eden_bot"
# Magic SDK (for enhanced wallet features)
MAGIC_API_KEY=your_magic_api_key_here# Generate Prisma client
npm run db:generate
# Push database schema
npm run db:push
# Optional: Open Prisma Studio to view data
npm run db:studio# Development mode (with auto-restart)
npm run dev
# Production build
npm run build
npm start!search <term>- Search for NFTs!collection <name>- Get collection info!floor <symbol>- Get floor price!buy <mint_address> <price>- Buy NFT!sell <mint_address> <price>- List NFT for sale!list <collection>- Show active listings
!connect- Connect your wallet!disconnect- Disconnect wallet!wallet- Show wallet info!balance- Check SOL balance
!profile [user]- Show user profile!settings [option] [value]- Manage settings!stats- Show bot statistics!help- Show all commands
src/
โโโ index.ts # Bot entry point & initialization
โโโ handlers/
โ โโโ CommandHandler.ts # Routes commands to handlers
โ โโโ commands/
โ โโโ NFTCommands.ts # NFT trading commands
โ โโโ WalletCommands.ts # Wallet management
โ โโโ UserCommands.ts # User profile & settings
โโโ services/
โ โโโ MagicEdenAPI.ts # Magic Eden API integration
โ โโโ WalletManager.ts # Wallet Connect & Solana ops
โ โโโ DatabaseManager.ts # Database operations
โโโ types/
โโโ index.ts # TypeScript type definitions
This project was built using vibe coding principles - focusing on rapid iteration, clean architecture, and developer experience over perfection.
- ๐ฏ Start with the Happy Path - Built core functionality first, then enhanced
- ๐ง Make it Work, Then Make it Pretty - Functional bot before fancy features
- ๐ Clear Architecture - Well-organized code structure for easy extension
- ๐ฎ Developer Experience - Hot reload, good error messages, helpful commands
- ๐ Rapid Iteration - Built incrementally with working features at each step
- Create a new command handler in
src/handlers/commands/ - Add routes in
CommandHandler.ts - Update the help command
// Example: Add a new "market" command
case 'market':
await this.marketCommands.handle(command, args, message);
break;- Create service in
src/services/ - Import and initialize in
index.ts - Use dependency injection pattern
// In index.ts
export const newService = new NewService();
// In your handler
import { newService } from '../../index';- Update Prisma schema in
prisma/schema.prisma - Run
npm run db:generateto update client - Run
npm run db:pushto apply changes
Configure in .env:
RATE_LIMIT_WINDOW_MS=60000
RATE_LIMIT_MAX_REQUESTS=100AUTO_BUY_ENABLED=false
MAX_AUTO_BUY_SOL=10.0- Store API keys securely (use environment variables)
- Implement proper signature validation for wallet operations
- Rate limiting on all external API calls
- Input validation and sanitization
- Database connection pooling
- Caching for frequently accessed data
- Background job processing for heavy operations
- Monitoring and alerting
- Error handling and recovery
- Database backups
- Graceful shutdown handling
- Health check endpoints
Building something cool? Here's how to stand out:
- Read HACKATHON_GUIDE.md - Everything you need to know
- Build unique features - Show your creativity
- Write clean code - This is your portfolio piece
- Document well - Help others understand your work
- Present professionally - The winner joins Bytes3!
- ๐ Innovation - Unique, creative solutions
- ๐ Technical Excellence - Clean, scalable code
- ๐ User Experience - Intuitive, polished interface
- โ Completeness - Working demo with documentation
- ๐ผ Professionalism - Production-ready mindset
This is a vibe coding project! Contributions welcome:
- Fork the repo
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes (keep the vibe going!)
- Test thoroughly
- Submit a pull request
- โจ Keep it fun and functional
- ๐ฏ Focus on user experience
- ๐ง Make it easy to extend
- ๐ Document what you build
- ๐ Ship working features
MIT License - feel free to vibe code with this!
- Magic Eden for the amazing NFT marketplace
- Discord.js for the bot framework
- Prisma for the database toolkit
- Wallet Connect for wallet integration
- Solana for the blockchain magic
Built with โค๏ธ and lots of โ by the Vibe Coding Community
Remember: The best code is the code that ships! ๐