Skip to content

Self-hosted open-source donation system for streamers & creators. Real-time overlays, voting, multi-payment (Stripe, BLIK, P24). Easy Docker deploy.

License

Notifications You must be signed in to change notification settings

szymontex/donata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Donata

Self-hosted Open Source Donation System

Stars License Issues

πŸš€ Overview

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.

η›Š Key Features

  • πŸ₯‘ 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

πŸ‡ Architecture

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

🜴 Installation

Prerequisites

  • Docker and Docker Compose
  • Node.js 18+ (for local development)
  • pnpm (package manager)
  • Stripe account for payment processing

Using Docker (Recommended)

# 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

Local Development

# Install dependencies
pnpm install

# Start development server
pnpm dev

πŸ”œ Configuration

  1. Copy .env.example to .env
  2. Configure your Stripe API keys
  3. Adjust port settings if needed
  4. Additional configuration options can be found in the documentation

πŸ”€ API Endpoints & Testing

Endpoints

  • 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

Stripe Webhook Configuration

  1. Go to the Stripe Dashboard
  2. Navigate to Developers > Webhooks
  3. Click "Add Endpoint"
  4. Enter your webhook URL: https://your-domain/stripe-webhooks
  5. Select event to listen to:
    • payment_intent.succeeded
  6. Ensure your API version matches the one in your .env file
  7. After creating, you'll get a Webhook Signing Secrets
  8. Add them to .env

Note: Ensure your webhook endpoint is publicly accessible and uses HTTPS.

πŸ”· One-line Testing Commands

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

πŸ’“ Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

πŸ“‘ License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Self-hosted open-source donation system for streamers & creators. Real-time overlays, voting, multi-payment (Stripe, BLIK, P24). Easy Docker deploy.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published