From 3721c06964b3ab2fbfb1a7652c9ef7c1bcb05609 Mon Sep 17 00:00:00 2001 From: Nick Holden Date: Thu, 4 Oct 2018 07:55:37 -0700 Subject: [PATCH] Add Pusher to docs (#809) * Add documentation for getting Pusher API keys Some features on dev.to, such as direct messaging, require Pusher to function. This change adds instructions to the docs about how to sign up for a Pusher account and add the API keys for local development. * Add Pusher mention to "Key App tech/services" page in docs --- config/sample_application.yml | 5 ++++ docs/addl-tech.md | 43 ++++++++++++++++---------------- docs/get-api-keys-dev-env.md | 46 +++++++++++++++++++++++++---------- 3 files changed, 60 insertions(+), 34 deletions(-) diff --git a/config/sample_application.yml b/config/sample_application.yml index 8e9e1e7ea..ab1979c81 100644 --- a/config/sample_application.yml +++ b/config/sample_application.yml @@ -13,3 +13,8 @@ STREAM_RAILS_SECRET: ALGOLIASEARCH_API_KEY: ALGOLIASEARCH_APPLICATION_ID: ALGOLIASEARCH_SEARCH_ONLY_KEY: + +PUSHER_APP_ID: +PUSHER_KEY: +PUSHER_SECRET: +PUSHER_CLUSTER: diff --git a/docs/addl-tech.md b/docs/addl-tech.md index 0f5dd8687..a097d776e 100644 --- a/docs/addl-tech.md +++ b/docs/addl-tech.md @@ -1,25 +1,26 @@ ## 🔑 Key App tech/services -* We use [_Puma_](https://github.com/puma/puma) for the server -* We [rely heavily on edge caching](https://dev.to/ben/making-devto-insanely-fast) with _Fastly_ -* We use _Cloudinary_ for image manipulation/serving -* We use _Keen_ for event storage -* We use _Airbrake_ for error monitoring -* We use _Timber_ for logging -* We use [_Delayed Job_](https://github.com/collectiveidea/delayed_job) for background workers -* We use _Algolia_ for search -* We use [_Redcarpet_](https://github.com/vmg/redcarpet) and [_Rouge_](https://github.com/jneen/rouge) for Markdown -* We use _[Carrierwave](https://github.com/carrierwaveuploader/carrierwave)/Fog/AWS S3_ for image upload/storage -* We use a modified version of [_InstantClick_](http://instantclick.io/) instead of _Turbolinks_ -* We are hosted on _Heroku_ -* We use _Heroku scheduler_ for scheduled jobs (default) -* We use _Sendgrid_ for API-triggered mailing -* We use _Mailchimp_ for marketing/outreach emails -* We use [_Figaro_](https://github.com/laserlemon/figaro) for app configuration. -* We use [_CounterCulture_](https://github.com/magnusvk/counter_culture) to keep track of association counts (counter caches) -* We use [_Rolify_](https://github.com/RolifyCommunity/rolify) for role management. -* We use [_Pundit_](https://github.com/varvet/pundit) for authorization. -* We use Service Workers to proxy traffic -* We use Preact for some of the front end. See [Frontend](https://docs.dev.to/frontend/) for more info +- We use [_Puma_](https://github.com/puma/puma) for the server +- We [rely heavily on edge caching](https://dev.to/ben/making-devto-insanely-fast) with _Fastly_ +- We use _Cloudinary_ for image manipulation/serving +- We use _Keen_ for event storage +- We use _Airbrake_ for error monitoring +- We use _Timber_ for logging +- We use [_Delayed Job_](https://github.com/collectiveidea/delayed_job) for background workers +- We use _Algolia_ for search +- We use [_Redcarpet_](https://github.com/vmg/redcarpet) and [_Rouge_](https://github.com/jneen/rouge) for Markdown +- We use _[Carrierwave](https://github.com/carrierwaveuploader/carrierwave)/Fog/AWS S3_ for image upload/storage +- We use a modified version of [_InstantClick_](http://instantclick.io/) instead of _Turbolinks_ +- We are hosted on _Heroku_ +- We use _Heroku scheduler_ for scheduled jobs (default) +- We use _Sendgrid_ for API-triggered mailing +- We use _Mailchimp_ for marketing/outreach emails +- We use [_Figaro_](https://github.com/laserlemon/figaro) for app configuration. +- We use [_CounterCulture_](https://github.com/magnusvk/counter_culture) to keep track of association counts (counter caches) +- We use [_Rolify_](https://github.com/RolifyCommunity/rolify) for role management. +- We use [_Pundit_](https://github.com/varvet/pundit) for authorization. +- We use Service Workers to proxy traffic +- We use Preact for some of the front end. See [Frontend](https://docs.dev.to/frontend/) for more info +- We use [_Pusher_](https://pusher.com) for realtime communication between the application and users’ browsers. _This list is non-exhaustive. If you see something that belongs here, feel free to add it._ diff --git a/docs/get-api-keys-dev-env.md b/docs/get-api-keys-dev-env.md index 2e350b7b4..b665f3ce5 100644 --- a/docs/get-api-keys-dev-env.md +++ b/docs/get-api-keys-dev-env.md @@ -25,9 +25,9 @@ Choose OAuth or Email Sign Up 7. Change your keys accordingly (name of Algolia key -> name of our application key): -* `Application ID -> ALGOLIASEARCH_APPLICATION_ID` -* `Search-Only API Key -> ALGOLIASEARCH_SEARCH_ONLY_KEY` -* `Admin API KEY -> ALGOLIASEARCH_API_KEY` +- `Application ID -> ALGOLIASEARCH_APPLICATION_ID` +- `Search-Only API Key -> ALGOLIASEARCH_SEARCH_ONLY_KEY` +- `Admin API KEY -> ALGOLIASEARCH_API_KEY` ![screen shot 2018-05-02 at 4 26 27 pm](https://user-images.githubusercontent.com/17884966/39547471-b24f2e36-4e25-11e8-9a0e-b988d6a8253f.png) @@ -62,9 +62,9 @@ Choose OAuth or Email Sign Up 7. Change your keys accordingly (name of Algolia key -> name of our application key): -* `Application ID -> ALGOLIASEARCH_APPLICATION_ID` -* `Search-Only API Key -> ALGOLIASEARCH_SEARCH_ONLY_KEY` -* `Admin API KEY -> ALGOLIASEARCH_API_KEY` +- `Application ID -> ALGOLIASEARCH_APPLICATION_ID` +- `Search-Only API Key -> ALGOLIASEARCH_SEARCH_ONLY_KEY` +- `Admin API KEY -> ALGOLIASEARCH_API_KEY` ![screen shot 2018-05-02 at 4 26 27 pm](https://user-images.githubusercontent.com/17884966/39547471-b24f2e36-4e25-11e8-9a0e-b988d6a8253f.png) @@ -92,8 +92,8 @@ The only important field is the "Callback URL" `http://localhost:3000/users/auth 5. Change your keys accordingly: (name of Twitter key -> name of our application key): -* `Access Token -> TWITTER_KEY` -* `Access Token Secret -> TWITTER_SECRET` +- `Access Token -> TWITTER_KEY` +- `Access Token Secret -> TWITTER_SECRET` 6. Done! @@ -104,8 +104,8 @@ The only important field is the "Callback URL" `http://localhost:3000/users/auth ![screen shot 2018-04-26 at 4 08 01 pm](https://user-images.githubusercontent.com/17884966/39329488-77cbf554-496c-11e8-941e-dd257b5223ee.png) 3. Change your keys accordingly; (name of GitHub key -> name of our application key): -* `Client ID -> GITHUB_KEY` -* `Client Secret -> GITHUB_SECRET` +- `Client ID -> GITHUB_KEY` +- `Client Secret -> GITHUB_SECRET` 4. Done! @@ -133,8 +133,28 @@ The only important field is the "Callback URL" `http://localhost:3000/users/auth 6. Change your keys accordingly: (name of Stream key -> name of our application key): -* `Key -> STREAM_RAILS_KEY` -* `Secret -> STREAM_RAILS_SECRET` -* `"https://us-east-api.stream-io-api.com/api/v1.0/" -> STREAM_URL` +- `Key -> STREAM_RAILS_KEY` +- `Secret -> STREAM_RAILS_SECRET` +- `"https://us-east-api.stream-io-api.com/api/v1.0/" -> STREAM_URL` 7. Done! + +# Pusher + +1. [Sign up for a free account with this link](https://dashboard.pusher.com/accounts/sign_up). + ![screen shot 2018-10-03 at 5 48 09 pm](https://user-images.githubusercontent.com/7942714/46447013-85187700-c734-11e8-92f7-89a17240ea0f.png) + +2. Once signed in, fill out the prompt to create a new Pusher Channels app. Only an app name is required. + ![screen shot 2018-10-03 at 5 35 14 pm](https://user-images.githubusercontent.com/7942714/46446837-69f93780-c733-11e8-82d9-52ad97812d4b.png) + +3. In your new Pusher Channels app, click the "App Keys" tab. + ![screen shot 2018-10-03 at 5 41 43 pm](https://user-images.githubusercontent.com/7942714/46446905-c0667600-c733-11e8-9c55-8fabf28a27fe.png) + +4. Change your keys accordingly (name of Pusher key -> name of our application key): + +- `app_id -> PUSHER_APP_ID` +- `key -> PUSHER_KEY` +- `secret -> PUSHER_SECRET` +- `cluster -> PUSHER_CLUSTER` + +5. Done!