{"id":14955698,"url":"https://github.com/sethherr/grape-doorkeeper","last_synced_at":"2025-10-01T01:31:24.063Z","repository":{"id":27497528,"uuid":"30977803","full_name":"sethherr/grape-doorkeeper","owner":"sethherr","description":"Get to API building quickly","archived":false,"fork":false,"pushed_at":"2018-09-06T16:47:57.000Z","size":216,"stargazers_count":78,"open_issues_count":1,"forks_count":23,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-14T11:46:17.865Z","etag":null,"topics":["doorkeeper","grape","omniauth","rails-application","ruby","swagger","swagger-ui"],"latest_commit_sha":null,"homepage":"https://grape-doorkeeper.herokuapp.com","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sethherr.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-18T17:46:30.000Z","updated_at":"2025-01-04T10:40:34.000Z","dependencies_parsed_at":"2022-07-13T11:20:34.278Z","dependency_job_id":null,"html_url":"https://github.com/sethherr/grape-doorkeeper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sethherr%2Fgrape-doorkeeper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sethherr%2Fgrape-doorkeeper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sethherr%2Fgrape-doorkeeper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sethherr%2Fgrape-doorkeeper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sethherr","download_url":"https://codeload.github.com/sethherr/grape-doorkeeper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234808945,"owners_count":18890088,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["doorkeeper","grape","omniauth","rails-application","ruby","swagger","swagger-ui"],"created_at":"2024-09-24T13:11:34.906Z","updated_at":"2025-10-01T01:31:18.717Z","avatar_url":"https://github.com/sethherr.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Grape-Doorkeeper\n\n#### Create an awesome versioned API, secured with OAuth2 and automatically documented.\n\nThis is a basic Rails 5 application with [Doorkeeper](https://github.com/doorkeeper-gem/doorkeeper), [Grape](https://github.com/intridea/grape) \u0026 [Swagger](http://swagger.io/) for getting to API building quickly.\n\nYou can view the [live app](https://grape-doorkeeper.herokuapp.com) and the [Swagger-ui documentation](https://grape-doorkeeper.herokuapp.com/documentation). \n\nThis app is ready to deploy to Heroku [![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy?template=https://github.com/sethherr/grape-doorkeeper)\n\n\n## Set up\n\n- Set up the rails app and database with `bundle install` and `rake db:setup`\n\n- Run `./start` to get the server running locally. It runs at [http://localhost:3003](http://localhost:3003)\n\n- Copy [.env.sample](/.env.sample) to `.env` and replace the values with your own values.\n\n- Delete the [imaginary item](app/models/imaginary_item.rb) class and [serializer](app/serializers/item_serializer.rb), which are included for demonstration in [the me/items endpoint](app/controllers/api/v1/me.rb#L24-L33).\n\nThis app includes [omniauth-bike-index](https://github.com/bikeindex/omniauth-bike-index). For Bike Index login to work, create a Bike Index app at [BikeIndex.org/oauth/applications/new](https://BikeIndex.org/oauth/applications/new) and add the values from `BIKEINDEX_APP_ID` and `BIKEINDEX_APP_SECRET` to the `.env` file.\n\n*Bike Index uses a similar grape, Swagger, doorkeeper setup\u0026mdash;this is an example of [creating an OmniAuth strategy for doorkeeper](https://github.com/doorkeeper-gem/doorkeeper/wiki/Create-a-OmniAuth-strategy-for-your-provider)*.\n\n\n## Adding to an existing application\n\n[View how to on the wiki](https://github.com/sethherr/grape-doorkeeper/wiki/Adding-to-an-existing-application).\n\n\n## Notes\n\nGrape is mounted in [app/controllers/api](app/controllers/api), as described in the excellent [Introduction to building APIs with Grape](http://codetunes.com/2014/introduction-to-building-apis-with-grape/) by Monterail, and [part 2](http://codetunes.com/2014/grape-part-II/) of the series.\n\nThere are are other posts in the series which are worth reading, particularly [OAuth Implicit Grant with Grape, Doorkeeper and AngularJS](http://codetunes.com/2014/oauth-implicit-grant-with-grape-doorkeeper-and-angularjs/).\n\nThere is also a [Railscast on doorkeeper](http://railscasts.com/episodes/353-oauth-with-doorkeeper).\n\nImportant things in the Gemfile:\n\n- [Doorkeeper](https://github.com/doorkeeper-gem/doorkeeper) (OAuth providing)\n- [grape](https://github.com/intridea/grape) (API building)\n- [wine_bouncer](https://github.com/antek-drzewiecki/wine_bouncer) (Doorkeeper and Grape)\n- [grape-swagger](https://github.com/tim-vandecasteele/grape-swagger) (automatically generates Swagger docs for the [auto documentation](https://grape-doorkeeper.herokuapp.com/documentation))\n- [Devise](https://github.com/plataformatec/devise) (users)\n\n\nAlso important, but maybe not as necessary to know about:\n\n- [rails-assets](https://rails-assets.org) manages the js for swagger-ui\n- [Puma](http://puma.io/) (the web server)\n- [api-pagination](https://github.com/davidcelis/api-pagination)\n- [active_model_serializers](https://github.com/rails-api/active_model_serializers/tree/0-8-stable) - uses 0.8 branch of active model serializers, because nothing past 0.8 supports caching\n- [CORS](https://github.com/cyu/rack-cors)\n- [foreman](https://github.com/ddollar/foreman) (in development to manage processes)\n- [Haml](http://haml.info/) - and [Hamlit](https://github.com/k0kubun/hamlit), which is faster haml\n- [dotenv-rails](https://github.com/bkeepers/dotenv) (load environmental variables - .env is in .gitignore, so it isn't committed)\n- [Bootstrap](http://getbootstrap.com/)\n- Postgres\n\n----\n\nIf you want to change the name of the app, swap out:\n\n- `GrapeDoorkeeper` in [config/application.rb](config/application.rb)\n- `grape-doorkeeper` in [config/database.yml](config/database.yml) (multiple instances)\n- `grape-doorkeeper` in [config/initializers/session_store.rb](config/initializers/session_store.rb)\n- Do a project wide search of `/grape.doorkeeper/i` to catch any lingering ones like [api_v1.html.haml](app/views/documentation/api_v1.html.haml)\n\n\n## Testing\n\nRspec and guard - run `bundle exec guard` to watch your spec files for changes and rerun tests for those files.\n\nThere is a spec for the `api/v1/me` API route and for the swagger docs to help get you started.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsethherr%2Fgrape-doorkeeper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsethherr%2Fgrape-doorkeeper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsethherr%2Fgrape-doorkeeper/lists"}