A decentralized platform for meme battles where users can submit memes, participate in battles, and vote for their favorite memes using blockchain technology.
- User Management: Register and authenticate users with wallet addresses
- Meme Management: Upload and categorize memes using AI
- Battle System: Create and participate in meme battles
- Voting System: Vote for favorite memes using blockchain
- Leaderboard: Track user performance and wins
- AI Integration: Automatic meme categorization and battle name generation
- Blockchain Integration: Secure voting and battle management
- Node.js
- Express
- Sequelize ORM
- PostgreSQL
- OpenAI API (GPT-4 Vision)
- Ethers.js
- React.js
- Ethers.js for Web3 integration
- Tailwind CSS for styling
- React Query for state management
- Solidity
- Hardhat
- Node.js >= 14
- PostgreSQL
- OpenAI API Key
- Ethereum Wallet and Provider (e.g., Infura)
- MetaMask or similar Web3 wallet
Create a .env file in the root directory:
DATABASE_URL=postgresql://username:password@localhost:5432/database_name
OPENAI_API_KEY=your_openai_api_key
CONTRACT_ADDRESS=your_contract_address
PROVIDER_URL=your_ethereum_provider_url
PRIVATE_KEY=your_private_key
PORT=3000- Clone the repository:
git clone https://github.com/Prasad5172/unfold2024- Install backend dependencies:
cd backend
npm install- Install frontend dependencies:
cd frontend
npm install- Start the backend server:
cd backend
npm start- Start the frontend development server:
cd frontend
npm startPOST /api/users- Register new userGET /api/users/wallet/:wallet_address- Check wallet existence
POST /api/memes- Add new memeGET /api/memes/user/:user_id- Get user's memesGET /api/memes/category/:category- Get memes by category
GET /api/battles/live- Get live battlesGET /api/battles/user/:user_id- Get user's battlesGET /api/battles/wins/:user_id- Get user's winsPOST /api/battles/register- Register for battlePOST /api/battles/vote- Vote for memeGET /api/leaderboard- Get global leaderboard
The platform runs daily battles in different categories:
- Regular Memes
- Dark Memes
- Celebrity Memes
- Political Memes
Battle Schedule:
- Registration starts: 10 AM IST
- Registration closes: 12 PM IST
- Battle ends: 8 AM IST (next day)
Memes are automatically categorized using GPT-4 Vision API into:
- Regular Memes
- Dark Memes
- Celebrity Memes
- Political Memes
- Sexist Memes (filtered)
The platform uses smart contracts for:
- Battle creation and management
- Voting system
- Winner declaration
- Token staking and rewards
- Wallet address verification
- Transaction signing
- Rate limiting
- Input validation
- SQL injection prevention
- XSS protection
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenAI for GPT-4 Vision API
- Ethereum community
- IPFS for decentralized storage