Donata is a modern, self-hosted donation system designed for streamers and content creators. It provides a complete solution for accepting donations, managing alerts, and tracking contributions - all while maintaining full control over your donation infrastructure.
- 🥡 Streamlined Donations: Easy-to-use donation page with customizable fields
- 👃 Multiple Payment Methods: Support for BLIK, P24, and credit cards through Stripe
- 🌨 Customizable Overlays: Real-time stream overlays for donations and voting
- 🌒 Voting System: Integrated voting mechanism for viewer engagement
- 🔐 Self-hosted: Full control over your data and infrastructure
- 📠 WebSocket Integration: Real-time updates and notifications
- 💳 Docker Support: Easy deployment with Docker and Docker Compose
- 🔐 Secure: Built with security best practices and data protection in mind
Donata consists of several key components:
- Backend Server (Node.js + Express)
- WebSocket Server for real-time communication
- Frontend donation page (React + TypeScript)
- Stream overlay system
- CLI tools for testing and management
- Docker and Docker Compose
- Node.js 18+ (for local development)
- pnpm (package manager)
- Stripe account for payment processing
# Clone the repository
git clone https://github.com/szymontex/donata
cd donata
# Create and configure .env file
cp .env.example .env
# Configure your Stripe keys and other settings in .env
# Start using Docker Compose
docker-compose up -d
# Install dependencies
pnpm install
# Start development server
pnpm dev
- Copy
.env.example
to.env
- Configure your Stripe API keys
- Adjust port settings if needed
- Additional configuration options can be found in the documentation
- Main donation page:
https://your-domain/
- Stream overlay:
https://your-domain/overlay.html
- Voting overlay:
https://your-domain/voting-overlay.html
- Stripe webhooks:
https://your-domain/stripe-webhooks
- Vote reset:
https://your-domain/api/votes/reset
- Go to the Stripe Dashboard
- Navigate to Developers > Webhooks
- Click "Add Endpoint"
- Enter your webhook URL:
https://your-domain/stripe-webhooks
- Select event to listen to:
payment_intent.succeeded
- Ensure your API version matches the one in your .env file
- After creating, you'll get a Webhook Signing Secrets
- Add them to .env
Note: Ensure your webhook endpoint is publicly accessible and uses HTTPS.
Test donation (15 PLN):
curl -X POST http://localhost:3000/stripe-webhooks -H "Content-Type: application/json" -d "{\"type\":\"payment_intent.succeeded\",\"data\":{\"object\":{\"amount\":1500,\"metadata\":{\"participantId\":\"3\",\"participantName\":\"KXNP\",\"nickname\":\"TestowyUser\",\"message\":\"Testowa wiadomosc!\"}}}}"
Reset votes:
curl -X POST "https://your-domain/api/votes/reset"
Multiple test donations (10 random donations):
for i in {1..10}; do curl -X POST "https://your-domain/stripe-webhooks" -H "Content-Type: application/json" -d "{\"type\":\"payment_intent.succeeded\",\"data\":{\"object\":{\"amount\":$((1000 + RANDOM % 5000)),\"metadata\":{\"participantId\":\"$i\",\"participantName\":\"Player $i\",\"nickname\":\"Donor$i\",\"message\":\"Test message $j!\"}}}}"; sleep 1; done
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.