Git Product home page Git Product logo

sibyl's Introduction

Sibyl

modular matterbridge bot framework

Bintray Bintray

Design

THe chatbot is equally accessible on all chat platforms supported by matterbridge
users from all platforms can use the bot the same way. There is no special features forcing users to switch platforms introduced.

Features (Modules) are designed to be written modularly with only the minimal dependency of core which also provides basic functionality like parsing configs, providing a database connection and more generic utilities

All messages transformations happens though Interceptors registered on the incoming and outgoing pipelines
Interceptors are (simplified): (T) -> T? transformation functions that can modify or consume the message as it passes through them
Interceptors are registered along with stages, all interceptors on a stage are processed before the next stage is processed
All Modules can register their interceptors at any level

Commands are written using https://ajalt.github.io/clikt
The Core Module processes command parsing and invocation
Modules can register any number of top level and subcommands

Modules can check for the existence of modules they depend on and possibly register the dependencies or skip loading (TODO: implement that)

Live Reloading or disabling modules after being enabled is not planned, simplifying the design
if you need to change modules just restart
the matterbridge will keep running and provide missed backlog to the bot

Usage

Usage as a dependency

repositories {
    maven(url = "https://dl.bintray.com/nikkyai/github") {
        name = "bintray-nikky"
    }
    maven(url = "https://dl.bintray.com/nikkyai/snapshot") {
        name = "bintray-nikky-snapshot"
    }
}

dependencies {
    implementation("moe.nikky.sibyl:core:_")
}

Setup

development environment setup

# required once before starting the postgres container
# required because docker on windows cannot get permissions right on mounted folders
docker volume create sibyl_pgdata

# starting all required services
docker-compose up -d

# applying migrations, baseline is only required once and after flywayClean
./gradlew flywayBaseline
./gradlew flywayMigrate
./gradlew flywayValidate

now you should be ready to start hacking away

Running the sample application

  1. follow #setup
  2. start matterbridge
    make sure to have a api section configured see matterbridge/matterbridge-sample.toml as reference
  3. run ./gradlew :sample:run once, expect it to fail, this is just to generate the first few config files
  4. edit run/sample.json
    {
        "$schema": "./schemas/sample.schema.json",
        "host": "localhost",
        "token": null,
        "port": 4242,
        "useWebsocket": false
    }
    all config files have referenced json schemas, so that IDEs (vscode, IJ idea, etc) are able to provide smart code completion
  5. run ./gradlew :sample:run

sibyl's People

Contributors

nikkyai avatar

Stargazers

 avatar  avatar

Watchers

 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.