Skip to content
This repository was archived by the owner on Dec 12, 2024. It is now read-only.

Selfhosted monero donation system written with Spring Boot, Java (backend) and React, JavaScript (frontend).

License

Notifications You must be signed in to change notification settings

chekist32/simple-xmr-donation-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Archived Repository

This repository has been archived and is no longer maintained.
Please visit the Salmon Donate Project.

Simple monero donation service

Selfhosted monero donation system written with Spring Boot, Java (backend) and React, JavaScript (frontend).

  • Provides an admin page where user can make some minor customizations.
  • Provides a notification functionality via donation link, that can be used with OBS browser source.

Installation

Docker

In the root folder you can find docker-compose.yml file which is populated with example configuration.

version: '3'
services:
  
  postgres-db:
    image: postgres:16-alpine
    restart: always
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_DB=postgres
      - POSTGRES_PASSWORD=postgres
    ports:
      - "54321:5432"
    volumes:
        # Here you should paste a path (directory) where 
        # postgres-db container will persist its data.
      - /var/docker_data/simple_monero_donation_service/postgres:/var/lib/postgresql/data
      - ./init.sql:/docker-entrypoint-initdb.d/init.sql

  monero-rpc:
    image: chekist32/monero-wallet-rpc:v0.18.3.1
    restart: unless-stopped
    ports:
      - 38083:38083
    volumes:
        # Here you should paste a path (directory) where the view-only monero wallet is located.
      - /var/docker_data/simple_monero_donation_service/monero/wallets/test1_wallet:/monero/wallet
    command:
        # For reference see: https://github.com/chekist32/monero-wallet-rpc-docker/blob/master/docs/monero-wallet-rpc-man.md
      - "--stagenet" 
      - "--daemon-address=stagenet.community.rino.io:38081"
      - "--trusted-daemon" 
      - "--rpc-bind-port=38083" 
      - "--rpc-login=user:pass" 
      - "--wallet-dir=/monero/wallet"

  backend:
    image: chekist32/simple-xmr-donation-service-backend:v0.5.0
    env_file:
        # Here you can paste a path to the .env file for backend container.
        # Example can be found under backend/env.example
      - ./backend/.env.dev
    ports:
      - 8081:8080
    depends_on:
      - monero-rpc
      - postgres-db

  frontend-client:
    build:
      context: ./frontend
      dockerfile: client/Dockerfile
      args:
          # A url mapped to the backend container
        - API_BASE_URL=http://localhost:8081
    ports:
      - "81:80"
    depends_on:
      - backend

  frontend-admin:
    build:
      context: ./frontend
      dockerfile: admin-panel/Dockerfile
      args:
          # A url mapped to the backend container
        - API_BASE_URL=http://localhost:8081
    ports:
      - "82:80"
    depends_on:
      - backend

This configuration can already be used in test purposes. Steps you need to complete in order to be able to run:

  1. Create /var/docker_data/simple_monero_donation_service/postgres directory.
  2. Create a monero view_only stagenet (for production setups mainnet) wallet and put it inside /var/docker_data/simple_monero_donation_service/monero/wallets/test1_wallet directory.
  3. On the base of backend/.env.example
# The name of your wallet file
MONERO_WALLET_PATH=test1 
# A password for wallet private keys unlocking (optional)
MONERO_WALLET_PASSWORD=  
# A monero wallet rpc host:port 
MONERO_RPC_SERVER_URL=http://monero-rpc:38083
# A username for accessing the monero walet rpc (optional) 
MONERO_RPC_SERVER_USERNAME=user 
# A password for accessing the monero walet rpc  (optional)  
MONERO_RPC_SERVER_PASSWORD=pass


POSTGRES_DB_HOST=postgres-db:5432
POSTGRES_DB_NAME=monero_donation_service_db
POSTGRES_DB_USERNAME=postgres
POSTGRES_DB_PASSWORD=postgres


SMTP_HOST= # your smtp host (for example: smtp.gmail.com)
SMTP_PORT=  # your smtp port (for example: 587)
SMTP_USERNAME= # your smtp username (for example: example@gmail.com)
SMTP_PASSWORD= # your smtp password (optional)

# A url mapped to the frontend-admin container (default http://localhost:82)
ADMIN_PANEL_UI_URL=http://localhost:82  

# allowed origins in format [ https://example1.com,https://example2.com ]
# (basically the urls mapped to frontend-admin and frontend-client containers)
ALLOWED_ORIGINS=http://localhost:81,http://localhost:82  

create .env.dev file and put it inside backend directory.

  1. Run
    docker-compose up

Usage

Here is the preview video of usage.

demo.mp4

Known Issues

  1. Lack of an edit functionality for the profile avatar on the admin page.
  2. Lack of a time zone conversion on the admin page.

Further Development

  1. Add the ability to donate in other cryptocurrencies (at least in BTC and LTC).

About

Selfhosted monero donation system written with Spring Boot, Java (backend) and React, JavaScript (frontend).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published