18F / standup-slack-bot

A Slack bot to streamline team standup without disturbing the overall flow of conversation
https://standup-slack-bot.app.cloud.gov/
Other
87 stars 31 forks source link

Crank up webserver #80

Closed mgwalker closed 7 years ago

mgwalker commented 8 years ago

Uses botkit's built-in express to start a web server, give it a static route at /lib/web/static, and dynamically ingest and create API endpoints as defined in /lib/web/api. This is very much intended to qualify as an MVP. The details of how the API endpoints are defined etc. is up for discussion. Likewise the static content - e.g., should it be generated by a template engine so we don't have a ton of repeated code? Etc, etc.

Needed for:

codecov-io commented 8 years ago

Current coverage is 81.68%

Merging #80 into develop will not change coverage

@@            develop        #80   diff @@
==========================================
  Files            25         25          
  Lines           595        595          
  Methods         106        106          
  Messages          0          0          
  Branches         94         94          
==========================================
  Hits            486        486          
  Misses          109        109          
  Partials          0          0          

Powered by Codecov. Last updated by f0aeabb...b450719

codecov-io commented 8 years ago

Current coverage is 81.68%

Merging #80 into develop will not change coverage

@@            develop        #80   diff @@
==========================================
  Files            25         25          
  Lines           595        595          
  Methods         106        106          
  Messages          0          0          
  Branches         94         94          
==========================================
  Hits            486        486          
  Misses          109        109          
  Partials          0          0          

Powered by Codecov. Last updated by f0aeabb...a2a7d01

mgwalker commented 8 years ago

Went ahead and added Mustache templating.

stvnrlly commented 8 years ago

This is nice. I think that the glossary part is ready for merging, but I want to set up auth before adding in the API. Should we just work on this in this branch, or split that off?

mgwalker commented 8 years ago

My intent was just to get a bare-bones server up with the basic structure for serving up documentation and an API, and then fill in content later. So we'd merge this, then you and I could work independently on documentation and API.

It's fine to merge this now, but FWIW I've changed up the documentation stuff a fair bit. Up to you if you want to merge now and the new stuff later, or I can push up these changes now. Only the content isn't ready, but that's exactly what's meant to come later. 😛

mgwalker commented 8 years ago

You didn't respond or merge before I could do otherwise, so I went ahead and put in the markdown/mustache changes. The API stuff is all the same, though.

stvnrlly commented 8 years ago

I think I'm going to take a quick crack at adding authentication, since as it is anybody could get a partial list of our Slack channels via the API. If it turns out to be anything substantial, I'll break that off and merge the rest.

mgwalker commented 8 years ago

Oh, right... If it's helpful to you, you can look at air traffic control. It does OAuth with Trello, but you could swap out the Trello strategy with the Slack one (https://www.npmjs.com/package/passport-slack) and it should be pretty straightforward from there.

https://github.com/18F/internal-air-traffic-control/tree/develop/server

stvnrlly commented 8 years ago

Okay! Picking this up again, here are the few things that I think will make this ready to go:

Beyond those, there are a few things that don't preclude merging, and may be things to do beyond MVP:

  1. Should the landing page be about how to install this on your own Slack, and things like the glossary moved to their own pages?
  2. It looks like we can set the static dir directly now.
  3. I'm curious about the approach to generating the site. Would it make sense to use something like mustache-express and just have Express discover the templates? And within the templates, would it make sense to use partials instead of explicitly building them?
  4. We may want to get assistance in our documentation again, to make sure that it's clear and helpful to users.
mgwalker commented 7 years ago

Did the two tasks, and dealt with "to-be-considered" 2 as well. There's another branch with a more fleshed-out site, but it depends on this so I never opened the PR for it. Once this gets merged, I'll open that one.

stvnrlly commented 7 years ago

Cool. All those other questions can move with us over to the new PR, if necessary.