https://github.com/eddiewebb/slack-cheers
https://github.com/eddiewebb/slack-cheers
Last synced: 27 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/eddiewebb/slack-cheers
- Owner: eddiewebb
- Created: 2016-05-04T19:50:32.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2018-11-14T13:53:43.000Z (over 7 years ago)
- Last Synced: 2025-11-04T02:28:56.942Z (9 months ago)
- Language: PHP
- Size: 114 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Team Cheers for Slack
## Features
1. Web UI ('/') and RESTful service API ('/api')
1. Runs locally against SQLite or MySQL.
2. Cloud Foundry compatible
1. Uses Redbeanphp as an ORM to abstract details
1. Uses the Slim framework for routing and helpers
1. Uses Twig templating for HTML presentation.
## Requirements
* Requires SQLite and PDO extensions to run locally
* Requires PHP Buildpack in Cloud Foundry (default)
#Integration with Slack
1. Deploy this somewhere
2. Point slack custom integration 'slash-command' to the /api/recognize endpoint as POST
3. use `/recognize @nameone @namemany |OPtional message` to start awarding folks.
# UI features
Pretty limited, hit /reports to see details for the team.
# Folders and FIles
## Folder Structure
```
|-lib (3rd party files you didn't write)
|-public ( root WEBDIR folder locally and in CF, only files in here are visible in the browser )
|---index.php
|---style
|-src (any custom non-UI code)
|---routes (routing rules for SLim, files must be included in index.php)
|---templates (UI templates for Twig.)
|-----blocks (Sub-templates that inherit from base and override distinct sections)
|-vendor (managed by Composer, do not modify!)
```
#First RUn (using composer)
This project contains a composer.json file, you will need to run composer to get all the required libraries.
See https://getcomposer.org/download/ OR
```
wget https://getcomposer.org/download/1.0.3/composer.phar
php -d extension=phar.so composer.phar install
```
## Special FIles
### .cfignore
make sure that .cfignore includes 'composer.*' - this prevents cloud foundry from moving the vendor directory and/or failing to download dependencies
### public/.htaccess
This allows pretty routes like /report, /, /foo to be hit index.php where Slim can handle the logic.
http://docs.slimframework.com/routing/rewrite/
### .bp-config/options.json
Critical for CLoud Foundry!
This adds MySQL, PDO and other required extensions for common php apps to run.
https://docs.cloudfoundry.org/buildpacks/php/gsg-php-config.html#php-extensions
# populating
The tool will automatically create tables and populate bsed on use in Slack, but for demoing y0u can Load /nuke to populate with sample data.