Skip to content

sa8ab/xmrchat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


XMRChat
XMRChat

A Complete SaaS for Online Tipping Solution on Monero Cryptocurrency Network (XMR).

Overview

XMRChat is a tip-for-chat application. Users can set up a page and have others send chat messages in exchange for XMR. The application is built with a focus on privacy and security.

Table of Contents 🤸

Business Strategy: Payment

The service uses a one-time payment strategy. During the deployment setup process, you will need to provide your Monero wallet address and set the service price. After clients register, they will configure their page by specifying details such as name and unique URL path. Once the service price is paid, their page is now public, and they can share their page links with their audience to receive tips.

  • Server: Contains the backend code ( Nest JS ).
  • Client: Contains the frontend code ( Nuxt JS ).
  • Traefik: Contains Traefik setups

First of all you must create network that containers communicate over it.

docker network create traefik

then setup the env

cd traefik
cp .env.example .env

Now change the .env with yours and run the container.

Warning

The password must be Hashed in the env and also if you add that in compose file the "$" characters must be doubled to not recognized as variable by docker engine.

docker compose up -d

Create and run a monero node. If you already have a synced node with zmq enabled skip to next step.

In monero directory clone the monero github repo to a folder called monero-node:

cd monero
git clone https://github.com/monero-project/monero.git monero-node

The cloned repo has a Dockerfile in the root directory. In last line of Dockerfile comment out CMD command.

# CMD ["--p2p-bind ...

In monero directory clone monero-lws repository on branch release-v0.3_0.18:

git clone -b release-v0.3_0.18 https://github.com/vtnerd/monero-lws

From last line of Dockerfile remove ENTRYPOINT and CMD and replace it with only ENTRYPOINT ["monero-lws-daemon"]

Final Dockerfile will be ending like this:

...
EXPOSE 8443

ENTRYPOINT ["monero-lws-daemon"]

The directories after following the steps would look like this.

└── xmrchat/
    ├── client
    ├── monero/
    │   ├── monero-node/
    │   ├── monero-lws/
    │   └── docker-compose.yml
    ├── server
    └── traefik

In /xmrchat/monero directory run the containers:

docker compose up -d

Because the Monero daemon must sync with the network, it may take a long time. You can monitor this process by checking the logs:

docker compose logs -f

You should make sure it is synced and ready, in the meantime you can go to next steps.

Go to /xmrchat/server directory and create your .env file from .env.example.

cp .env.example .env

Open the .env file and change the values with yours. the variables have descriptions on how to set them.

Then run the containers:

docker compose up -d

Then we need to run the migrations:

docker compose exec -it nest npm run migration:run

Go to /xmrchat/client directory and create your .env file from .env.example.

cp .env.example .env

Change .env file with yours.

Run the container

docker compose up -d

The website should be up on the value set on /client/.env -> DOMAIN_NAME.

For development you might not need monero or monero-lws if you don't make tips or create new pages ( any payments related to monero ). If you need lws instance access or can't run yours please contact us.

Server

Add your .env file based on .env.example.

Run backend locally with docker-compose.dev.yml file

docker compose -f docker-compose.dev.yml up -d

Then run the Nest project itself use node version more than 20.x.x

npm i
npm run start:dev

Client

Add your .env based on .env.example, then run the project:

npm i
npm run dev

License

This project is licensed under the Apache License 2.0. For the full license text, please see the LICENSE file in the root of this repository.

Notice

A NOTICE file has been included in the root of this repository. This file contains acknowledgments and notices required by the Apache License 2.0.

Pursuant to the terms of the Apache License 2.0, the NOTICE file must be included in redistributions of this software.