https://github.com/giveth/giveth-toshi-app
Giveth's Toshi chat bot app
https://github.com/giveth/giveth-toshi-app
Last synced: about 1 year ago
JSON representation
Giveth's Toshi chat bot app
- Host: GitHub
- URL: https://github.com/giveth/giveth-toshi-app
- Owner: Giveth
- License: mit
- Archived: true
- Created: 2017-11-20T18:11:38.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-02-15T16:20:43.000Z (over 3 years ago)
- Last Synced: 2025-02-22T22:23:53.108Z (over 1 year ago)
- Language: JavaScript
- Size: 640 KB
- Stars: 4
- Watchers: 10
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Toshi SOFA App
This repo helps you build a [Toshi app](https://www.toshi.org) in Javascript.
The sample bot can:
* send messages
* send and request money
* create simple UI for buttons and menus
* store sessions and state for each user
TODO
* sending image messages
* creating web view UIs
## Launch your own Toshi app in 5 minutes
Read our [guide to creating a Toshi app](http://developers.toshi.org/docs/creating-a-token-app).
When ready, fork this repo and deploy it to Heroku.
[](https://heroku.com/deploy)
Then check out [`src/bot.js`](src/bot.js) to start changing the bot logic.
## Running locally with Docker
You can run the project locally with
```
docker-compose up
```
If any new depencies are added you can rebuild the project with
```
docker-compose build
```
To reset the postgres database in your dev environment you can use
```
docker-compose down -v
```
## Architecture
Deploying a Toshi app requires a few processes to run:
* **toshi-headless-client**
This is a client we provide (similar to the iOS or Android client) that provides a wrapper around the Toshi backend services. It also handles end-to-end encrypting all messages using the Signal protocol. It is written in Java and runs in the background, proxying all the requests to and from your bot.
* **redis**
We use redis pub/sub to provide a connection between the toshi-headless-client and your bot.
* **bot.js**
This is where all your app logic lives.
* **postgres**
Postgres is used to store session data so you can persist state for each user who talks to your bot (similar to cookies in a web browser).

## See also
* [https://www.toshi.org]