This app is called PROPS. The idea behind it is to express saying 'thank you!' in a geeky way.
- Ruby on Rails 4.2
- Ruby 2.2.3
- Postgres
- React with react_webpack_rails
Copy database settings:
cp config/database.yml.sample config/database.yml
Create DB user:
createuser -s -r props
Setup database:
bin/rake db:setup
Setup config file for your environment:
cp config/secrets.yml.sample config/secrets.yml
Create slack application by going to Your Apps.
It is important to set the redirect url for your application to be like https://yourdomain/auth/slack/callback.
You'll also need to select Permission Scopes to be as follows:
- identity.avatar
- identity.basic
- identity.email
- identity.team
- chat:write:bot
- team:read
- users.profile:read
- users:read
- users:read.email
Development endpoints:
When you have the credentials, put them in the config/secrets.yml file
under omniauth_provider_key and omniauth_provider_secret values.
Auth0 integration:
- Create
non-interactive auth0 clientand useAUTH0_API_CLIENT_IDandAUTH0_API_CLIENT_SECRETfrom that client - Go to your auth0 account settings, advanced tab, and turn on 'Enable APIs Section' for be able to see API's view
- Under API section, create click button for creating api and after that you will receive
AUTH0_API_AUDIENCE - Don't forget to connect and authorise api in Auth0 Management API (non-interactive-clients tab), with your new ni-client, created in point 1
Slack feature:
In order to post props notifications and recieve thumbs-ups, you need to set slack.default_channel value (must be valid channel name, e.g. general) in your secrets.
Note: If you're going to use Heroku Free Dynos, please be aware that you app will sleep at least 6h a day - and because of that you may not receive all reactions from Slack.
Install node dependencies:
$ npm install
Generate react-bundle for the first time:
$ npm build
- run rails server.
- run webpack in watch mode:
$ npm start
We use RSpec 3 for testing backend and Mocha + Karma to test React components. We are using Chrome launcher.
- run
npm run test-devto run tests. - run
npm run test-liveto run tests in watch mode.
Please follow Ruby style guide available here.
If you make improvements to this application, please share with others.
- Fork the project on GitHub.
- Make your feature addition or bug fix.
- Commit with Git.
- Send the author a pull request.
If you add functionality to this application, create an alternative implementation, or build an application that is similar, please contact me and I’ll add a note to the README so that others can find your work.
MIT. See LICENSE.
