A Complete SaaS for Online Tipping Solution on Monero Cryptocurrency Network (XMR).
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.
-
Business Strategy
-
Client Side:
- Framework: Nuxt Js - Vue Js
- Language: TypeScript
-
Server Side:
- Framework: Nest Js
- Language: TypeScript
- Cache: Redis
- ORM: TypeORM
- Database: PostgreSQL
- Queues: BullMQ
-
Infrastructure:
- Containerization: Docker π³
- Gateway: Traefik
-
Payment Providers:
- Monero:
- Monero Project
- Wallet Server : monero-lws
- Monero:
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.
- Docker π³
- Monero-lws Instance
- A Monero Wallet
- 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 traefikthen setup the env
cd traefik
cp .env.example .envNow 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 -dCreate 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-nodeThe 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-lwsFrom 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 -dBecause 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 -fYou 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 .envOpen 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 -dThen we need to run the migrations:
docker compose exec -it nest npm run migration:run
In order to use notifications like SimpleX or Signal you need to set up the integrations. If you don't need them skip to next step.
- Email: Email notifications already uses the env variables for sending emails.
- SimpleX:
Simplex is automatically set up when running the server docker compose. The data from container will be in
/server/simplexdirectory. - Signal:
In order to use Signal notifications you need to have a Signal account. Open server url in a browser or send a get request to
/signal/qrcode( Example:https://server.xmrchat.com/signal/qrcode). It will give you a qr code if there is not a signal account already added. Open Signal app on your phone and navigate to settings -> Linked devices and add new device. Scan then qr code you got from the server.
Go to /xmrchat/client directory and create your .env file from .env.example.
cp .env.example .envChange .env file with yours.
Run the container
docker compose up -dThe website should be up on the value set on /client/.env -> DOMAIN_NAME.
BullMQ is used for background tasks. BullBoard is used for monitoring the queues and can be accessed on server domain ${DOMAIN_NAME}/queues with credencials set on server envs BULLBOARD_USERNAME and BULLBOARD_PASSWORD.
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.
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 -dThen run the Nest project itself use node version more than 20.x.x
npm i
npm run start:dev
Add your .env based on .env.example, then run the project:
npm i
npm run dev
For detailed testing instructions, see TESTING.md.
Client tests live in client/ and can be run with:
cd client
npx playwright testWe also provide a GitHub Actions workflow to SSH into your server, spin up containers, run migrations, and execute Playwright tests. See TESTING.md for more information.
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.
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.