# README
snet-matrix-framework
ai-bots based on the Matrix protocol and snet ecosystem
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
About The Project
The snet-matrix-framework is designed to create bots that will connect the messenger user on the Matrix protocol and AI services in the snet ecosystem
Getting Started
Installation
- Install Docker Engine and Compose plugin
- Clone the repo
git clone https://github.com/tensved/snet-matrix-framework.git cd snet-matrix-framework git submodule update --init --recursive
- Create an
.env
file based onexample.env
and add data to it - Create an
.env.local
file infrontend
directory based onfrontend/example.env.local
and add data to it - Build and run docker containers
docker compose up -d --build
- Run certbot to issue a certificate
docker compose run --rm certbot certonly --webroot --webroot-path /var/www/certbot/ -d yourdomain.com
- Uncomment all lines in the file
nginx/templates/default.conf.template
- Restart the
nginx
container so that Nginx starts using the new certificatedocker compose restart nginx
Explanation of variables in .env
Database
- DB_USER – username for connecting to the database
- DB_PASSWORD – password for the database user
- DB_HOST – hostname or IP address of the database server
- DB_PORT – port number on which the database server is listening
- DB_NAME – name of the database to connect to
App
- APP_PORT – port number on which the application will run
- PRODUCTION – flag indicating whether the application is running in production mode
- DOMAIN – your domain for the client application that provides the payment gateway
- PAYMENT_TIMEOUT – time to pay for the service call
Matrix
- MATRIX_HOMESERVER_URL – URL of the Matrix homeserver
- MATRIX_BOT_USERNAME – username for the Matrix bot that will provide access to snet services
- MATRIX_BOT_PASSWORD – password for the Matrix bot that will provide access to snet services
- MATRIX_SERVERNAME – server name for your Matrix
Ethereum
- IPFS_PROVIDER_URL – URL of the IPFS provider
- ETH_PROVIDER_URL – HTTP URL for the Ethereum provider (e.g., Infura)
- ETH_PROVIDER_WS_URL – WebSocket URL for the Ethereum provider (e.g., Infura)
- CHAIN_ID – chain ID of the Ethereum network
Admin
- ADMIN_PUBLIC_ADDRESS – public address of the admin on the blockchain
- ADMIN_PRIVATE_KEY – admin private key
Notes
- Make sure your domain has the correct A records configured
- Use
docker compose run --rm certbot renew
to renew certs - The minimal example of service is located at the path
cmd/main.go