A Bitcoin donation platform for streamers powered by BTCPay Server.
- Accept Bitcoin donations via Lightning Network or on-chain
- Self-custodial - you control your own wallet
- Customizable donation pages
- Real-time payment notifications
- Admin dashboard for managing donations
- Docker and Docker Compose
- Git
- Clone the repository:
git clone https://github.com/yourusername/cryptosuperchat.git
cd cryptosuperchat- Create environment file:
cp .env.example .env- Edit
.envand set your secrets:
# Generate a secure JWT secret
JWT_SECRET=$(openssl rand -hex 32)- Start all services:
make dev
# or
docker-compose up-
Wait for all services to start (this may take a while on first run as Bitcoin Core syncs headers).
-
Access the services:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8080
- BTCPay Server: http://localhost:49392
After the containers are running, you need to configure BTCPay Server:
- Open http://localhost:49392
- Create an admin account
- Generate an API key with the following permissions:
btcpay.store.cancreateinvoicebtcpay.store.canmodifystoresettingsbtcpay.store.canviewstoresettingsbtcpay.store.webhooks.canmodifywebhooks
- Add the API key to your
.envfile asBTCPAY_API_KEY - Restart the backend:
docker-compose restart backend
┌─────────────────┐ ┌─────────────────┐
│ Frontend │────▶│ Backend │
│ (React/Vite) │ │ (Go/Gin) │
└─────────────────┘ └────────┬────────┘
│
▼
┌─────────────────┐ ┌─────────────────┐
│ PostgreSQL │◀────│ BTCPay Server │
│ (Database) │ │ (Payments) │
└─────────────────┘ └────────┬────────┘
│
▼
┌─────────────────┐
│ NBXplorer │
└────────┬────────┘
│
▼
┌─────────────────┐
│ Bitcoin Core │
│ (Pruned) │
└─────────────────┘
make dev # Start in development mode with hot-reload
make up # Start all services in background
make down # Stop all services
make logs # View logs from all services
make backend-logs # View backend logs
make frontend-logs # View frontend logs
make btcpay-logs # View BTCPay logs
make db-shell # Open PostgreSQL shell
make clean # Remove all containers, volumes, and imagescryptosuperchat/
├── backend/ # Go backend
│ ├── cmd/server/ # Entry point
│ ├── internal/
│ │ ├── config/ # Configuration
│ │ ├── entity/ # Domain models
│ │ ├── repository/# Database layer
│ │ ├── usecase/ # Business logic
│ │ ├── handler/ # HTTP handlers
│ │ └── middleware/# Middleware
│ └── pkg/btcpay/ # BTCPay client
├── frontend/ # React frontend
│ └── src/
│ ├── pages/ # Page components
│ ├── components/# Reusable components
│ ├── services/ # API layer
│ └── context/ # React contexts
├── btcpay/ # BTCPay config
└── scripts/ # Setup scripts
GET /api/v1/streamers/:username- Get streamer profilePOST /api/v1/donations- Create a donationGET /api/v1/donations/:id/status- Check payment status
POST /api/v1/auth/register- Register new streamerPOST /api/v1/auth/login- LoginPOST /api/v1/auth/refresh- Refresh tokenPOST /api/v1/auth/logout- Logout
GET /api/v1/admin/profile- Get profilePUT /api/v1/admin/profile- Update profileGET /api/v1/admin/donations- List donationsPUT /api/v1/admin/donations/:id/display- Mark donation as displayedGET /api/v1/admin/stats- Get statistics
POST /api/v1/webhooks/btcpay- BTCPay webhook handler
For production deployment:
- Use proper SSL/TLS certificates
- Set strong passwords and secrets
- Configure proper firewall rules
- Use a reverse proxy (nginx, Caddy, etc.)
- Consider using a managed database
- Monitor Bitcoin Core sync status
MIT