Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn slack-bot-server into a reusable framework #3

Closed
dblock opened this issue Jan 13, 2016 · 3 comments
Closed

Turn slack-bot-server into a reusable framework #3

dblock opened this issue Jan 13, 2016 · 3 comments

Comments

@dblock
Copy link
Collaborator

dblock commented Jan 13, 2016

We tell users to fork this project and build on top. There're probably a few things that can be done to turn this into a framework, maybe extract a set of gems.

  • slack-bot-service: just the service parts that starts/stops/restarts/manages a set of teams and bots
  • slack-bot-store: a set of models that give a team storage
  • slack-bot-api: an API for slack button integration and teams
  • slack-bot-web: a Web UI and API to register teams
@dominicsayers
Copy link

I haven't had time to understand how this is put together yet, but this is just a note to describe my situation as an example use-case.

I have an existing Rails app (with a Postgres db) that defines accounts (analogous to Slack teams) each of which has multiple users. Also a user can belong to multiple accounts (just like Slack itself). An account can store credentials for Slack in the form of an API Key for a bot and we currently use this to let my app post news to a team's Slack channel.

It makes sense to me to have a separate server that listens for Slack messages, so I like the slack-bot-server concept. I'd need it to be able to authenticate with my app and perform CRUD operations based on the messages it receives (I have defined an API for this). I'd also need to be able to define the Slack listener's settings within my app's UI (hopefully the slack-bot-server API can do this and is authenticated).

I'm willing to put some effort into making slack-bot-server work for my needs unless you think I'm barking up the wrong tree.

@dblock
Copy link
Collaborator Author

dblock commented Jan 22, 2016

I think you're barking up the right tree :) maybe a good place to start is to add PostgreSQL support to this project, refactoring storage so it can be either mongodb or PostgreSQL. This will help you understand all the moving parts.

tmsrjs added a commit to tmsrjs/slack-ruby-bot-server that referenced this issue May 30, 2016
dblock added a commit that referenced this issue Jun 1, 2016
Turn project into gem, a step forward to #3.
@dblock
Copy link
Collaborator Author

dblock commented Jun 1, 2016

Closing this thanks to @tmsrjs work on the gem.

I've renamed this project to slack-ruby-bot-server, which is consistent with slack-ruby-bot and cut 0.1.0. I will close this issue since now this is a gem, splitting functionality into separate libraries and interfaces are further good problems to have.

Next steps is to make bots like slack-market or slack-amber-alert to use the gem, and continue absorbing functionality here and making new releases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants