A Bitcoin maximalist meme voting battle widget for YakiHonne/Nostr feeds using Lightning payments.
- Meme Battle System: Two Bitcoin memes compete head-to-head
- Lightning Voting: Vote with sats using Lightning Network payments
- Real-time Updates: Live vote counting and winner determination
- Smart Widget Integration: Built for YakiHonne Smart Widget SDK
- Responsive Design: Mobile-first, works on all devices
- Bitcoin Maxi Themed: Authentic Bitcoin maximalist memes and culture
- Two Bitcoin memes are displayed side by side
- Users click "Vote ⚡" to support their favorite meme
- Choose sats amount (10 sats = 1 vote)
- Lightning payment is processed (currently simulated)
- Votes are counted and displayed in real-time
- Losing meme gets replaced with a new challenger
- React 18 with TypeScript
- Tailwind CSS for styling
- Lucide React for icons
- Vite for development and building
- YakiHonne Smart Widget SDK integration
- Node.js 18+
- npm or yarn
# Clone the repository
git clone https://github.com/YOUR_USERNAME/zapwars-smart-widget.git
cd zapwars-smart-widget
# Install dependencies
npm install
# Start development server
npm run dev
npm run build
The widget is designed to integrate with YakiHonne feeds using the Smart Widget SDK:
import { registerZapWarsWidget } from './smart-widget-sdk';
// Register the widget
registerZapWarsWidget();
// The widget will be available as 'zapwars' type
smartWidgetHandler.registerRenderer('zapwars', (data, container) => {
// Widget renders automatically
});
Update the BITCOIN_MEMES
array in src/components/ZapWars.tsx
:
const BITCOIN_MEMES: Meme[] = [
{
id: '1',
url: '/path/to/your/meme.jpg',
title: 'Your Meme Title',
votes: 0
},
// Add more memes...
];
For production, replace the mock payment function with real Lightning integration:
const simulateLightningPayment = async (sats: number): Promise<boolean> => {
if (window.webln) {
await window.webln.enable();
const result = await window.webln.sendPayment(invoice);
return !!result.preimage;
}
return false;
};
- Real Lightning Network integration
- Backend vote persistence
- Meme submission system
- Tournament brackets
- Leaderboards
- Social sharing
- Nostr integration for vote broadcasting
- Fork the repository
- Create a 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.
- Bitcoin community for the memes
- YakiHonne team for the Smart Widget SDK
- Lightning Network developers
- React and Vite teams
For support, please open an issue on GitHub or contact the development team.
⚡ Zap responsibly! ⚡