{"id":19710780,"url":"https://github.com/rootstrap/courier","last_synced_at":"2026-06-13T17:01:58.123Z","repository":{"id":85582532,"uuid":"134580975","full_name":"rootstrap/courier","owner":"rootstrap","description":"A middleware gem for deep links that survive the install process","archived":false,"fork":false,"pushed_at":"2018-05-23T17:58:35.000Z","size":16,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-06-12T01:05:05.591Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/rootstrap.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-23T14:22:43.000Z","updated_at":"2021-07-28T12:19:13.000Z","dependencies_parsed_at":"2023-07-02T04:45:55.111Z","dependency_job_id":null,"html_url":"https://github.com/rootstrap/courier","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rootstrap/courier","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootstrap%2Fcourier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootstrap%2Fcourier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootstrap%2Fcourier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootstrap%2Fcourier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rootstrap","download_url":"https://codeload.github.com/rootstrap/courier/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootstrap%2Fcourier/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34292326,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-13T02:00:06.617Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-11T22:08:25.179Z","updated_at":"2026-06-13T17:01:58.118Z","avatar_url":"https://github.com/rootstrap.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Courier\n\nAn free, open source minimalistic alternative to Firebase Invite or branch.io\nSend deep links to your mobile users that survive the installation process.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'courier'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install courier\n\n## Configure\n\nThe courier gem adds a middleware that handles the deep link redirection and user identification either before it reaches your application.\n\nTo configure add the middleware to your stack wherever it makes more sense for you.\nOptions you can provide to the configuration blocks are:\n\n- *deep_link_base*: _required_ This is the name of your mobile app to redirect the deep links.\n- *mounted_as: Default*: _optional_ Default(courier). This are the mounted url for currier links.\n\n### Ruby On Rails\n\nAdd the following config block to an initializer\n\n```\nCourier.configure do |config|\n  config.deep_link_base = 'my-app' # required\n  # config.mounted_as = 'deep-links-base' # optional\nend\n```\nAdd the middleware to your stack in `config/application.rb`\n\n```\n  config.middleware.use Courier::Middleware`\n```\n\n### Other Rack Applications\n\nCourier is built on top of Rack so any Rack project can integrate it. Simply make sure you add `Courier::Middleware` to your rack stack and run the configure block when starting your server.\n\n## Usage\n\n### Deep linking to your app\n\nAfter set up simply send links to your users that match your `mounted_at` directory IE: http://yourdomain.com/courier/invite?friend_id=someid\u0026invitation_id=otherid\n\nUsers that follow the link from mobile phones will be redirected to a deep link with the form\n\n`\u003cdeep_link_base\u003e://invite?friend_id=someid\u0026invitation_id=otherid`\n\nThis open to possible paths: *New users* (users that don't have your app), *Existing Users*\n\n### Existing users\n\nNothing to do here. Just handle the deep link as you always do on your iOS or Android application\n\n### New users\n\nOne of the challenges courier attempts to solve is the deep link surviving the install process.\nBy default deep links will redirect the user to open your app or install it on the appropriate store.\nAfter downloading and installing your app, when they open the app they won't get the content they would have gotten if they followed the deep link having the app installed the first time.\nTo Handle that simply do this at some time when loading your app.\n\nMake a request\n\n`GET http://\u003cyour_app_url\u003e/\u003cmounted_at\u003e/check`\n\nThis request will respond with:\n\n- 404: When courier is unable to match the user with a user that followed a deep link recently\n- 200: JSON body response with the information of the request previously done by the user.\n\nSample response:\n\n```\n{\n  \"deep_link_path\" : \"\u003cthe_followed_path\u003e\"\n  \"params\" : [\n    { \"\u003cparameter_name\u003e\": \"\u003cparameter_value_string\u003e\" },\n    ...\n  ]\n}\n```\n\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/rootstrap/courier. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the Courier project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/courier/blob/master/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frootstrap%2Fcourier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frootstrap%2Fcourier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frootstrap%2Fcourier/lists"}