GithubHelp home page GithubHelp logo

niko150 / token-app-js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jeremyhenrickson/token-app-js

0.0 2.0 0.0 26.08 MB

Foundation for building a Javascript app for Token (Chat Bot / Web View)

Shell 0.47% JavaScript 99.53%

token-app-js's Introduction

Token SOFA App

This repo helps you build a Token app 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 Token app in 5 minutes

Read our guide to creating a Token app.

When ready, fork this repo and deploy it to Heroku.

Deploy

Then check out 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 Token app requires a few processes to run:

  • token-headless-client
    This is a client we provide (similar to the iOS or Android client) that provides a wrapper around the Token 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 amd from your bot.
  • redis
    We use redis pub/sub to provide a connection between the token-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).

diagram

See also

token-app-js's People

Contributors

barmstrong avatar faymontage avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.