Skip to content

๐Ÿ† Hackathon: Build a Solana NFT Discord bot. Win Junior Dev position at Bytes3 + $300 USDC. TypeScript boilerplate with Magic Eden API, Prisma, Wallet Connect. Solo/team. Deadline: Nov 30. Follow @bytez3_ to submit.

Notifications You must be signed in to change notification settings

Bytez3/MEDiscordBuySell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ Magic Eden Discord Bot - Vibe Coding Edition

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.

๐Ÿ† Hackathon Special

GRAND PRIZE:

  1. Junior/Trainee Developer Position with Bytes3 ๐Ÿ’ผ
  2. $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!

๐ŸŒŸ Features

  • ๐Ÿ”— 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

๐ŸŽฏ Quick Start

1. Clone & Setup

git clone <your-repo-url>
cd magic-eden-discord-bot
npm install

2. Environment Setup

Copy the environment template and configure your settings:

cp env.example .env
# Edit .env with your API keys and configuration

Required 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

3. Database Setup

# 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

4. Run the Bot

# Development mode (with auto-restart)
npm run dev

# Production build
npm run build
npm start

๐ŸŽฎ Commands

NFT Commands

  • !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

Wallet Commands

  • !connect - Connect your wallet
  • !disconnect - Disconnect wallet
  • !wallet - Show wallet info
  • !balance - Check SOL balance

User Commands

  • !profile [user] - Show user profile
  • !settings [option] [value] - Manage settings
  • !stats - Show bot statistics
  • !help - Show all commands

๐Ÿ—๏ธ Architecture

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

๐ŸŽจ Vibe Coding Guide

This project was built using vibe coding principles - focusing on rapid iteration, clean architecture, and developer experience over perfection.

Vibe Coding Principles Used:

  1. ๐ŸŽฏ Start with the Happy Path - Built core functionality first, then enhanced
  2. ๐Ÿ”ง Make it Work, Then Make it Pretty - Functional bot before fancy features
  3. ๐Ÿ“š Clear Architecture - Well-organized code structure for easy extension
  4. ๐ŸŽฎ Developer Experience - Hot reload, good error messages, helpful commands
  5. ๐Ÿš€ Rapid Iteration - Built incrementally with working features at each step

Extending the Bot:

Adding New Commands

  1. Create a new command handler in src/handlers/commands/
  2. Add routes in CommandHandler.ts
  3. Update the help command
// Example: Add a new "market" command
case 'market':
  await this.marketCommands.handle(command, args, message);
  break;

Adding New Services

  1. Create service in src/services/
  2. Import and initialize in index.ts
  3. Use dependency injection pattern
// In index.ts
export const newService = new NewService();

// In your handler
import { newService } from '../../index';

Database Changes

  1. Update Prisma schema in prisma/schema.prisma
  2. Run npm run db:generate to update client
  3. Run npm run db:push to apply changes

๐Ÿ”ง Configuration

Rate Limiting

Configure in .env:

RATE_LIMIT_WINDOW_MS=60000
RATE_LIMIT_MAX_REQUESTS=100

Auto-Buy Settings

AUTO_BUY_ENABLED=false
MAX_AUTO_BUY_SOL=10.0

๐Ÿšจ Production Considerations

Security

  • 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

Performance

  • Database connection pooling
  • Caching for frequently accessed data
  • Background job processing for heavy operations
  • Monitoring and alerting

Reliability

  • Error handling and recovery
  • Database backups
  • Graceful shutdown handling
  • Health check endpoints

๐Ÿ† Hackathon Participants

Building something cool? Here's how to stand out:

  1. Read HACKATHON_GUIDE.md - Everything you need to know
  2. Build unique features - Show your creativity
  3. Write clean code - This is your portfolio piece
  4. Document well - Help others understand your work
  5. Present professionally - The winner joins Bytes3!

What Judges Look For:

  • ๐ŸŒŸ Innovation - Unique, creative solutions
  • ๐Ÿ’Ž Technical Excellence - Clean, scalable code
  • ๐Ÿ˜Š User Experience - Intuitive, polished interface
  • โœ… Completeness - Working demo with documentation
  • ๐Ÿ’ผ Professionalism - Production-ready mindset

๐Ÿค Contributing

This is a vibe coding project! Contributions welcome:

  1. Fork the repo
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes (keep the vibe going!)
  4. Test thoroughly
  5. Submit a pull request

Vibe Coding Rules:

  • โœจ Keep it fun and functional
  • ๐ŸŽฏ Focus on user experience
  • ๐Ÿ”ง Make it easy to extend
  • ๐Ÿ“š Document what you build
  • ๐Ÿš€ Ship working features

๐Ÿ“„ License

MIT License - feel free to vibe code with this!

๐Ÿ™ Acknowledgments

  • 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! ๐Ÿš€

About

๐Ÿ† Hackathon: Build a Solana NFT Discord bot. Win Junior Dev position at Bytes3 + $300 USDC. TypeScript boilerplate with Magic Eden API, Prisma, Wallet Connect. Solo/team. Deadline: Nov 30. Follow @bytez3_ to submit.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published