{"id":13878370,"url":"https://github.com/coorasse/passkit","last_synced_at":"2025-04-05T12:07:22.373Z","repository":{"id":60661329,"uuid":"539464624","full_name":"coorasse/passkit","owner":"coorasse","description":"Wallet Pass generation for Ruby On Rails","archived":false,"fork":false,"pushed_at":"2024-08-08T12:17:59.000Z","size":658,"stargazers_count":93,"open_issues_count":3,"forks_count":27,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-29T11:07:50.443Z","etag":null,"topics":["passkit","wallet-pass"],"latest_commit_sha":null,"homepage":"","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/coorasse.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["coorasse"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2022-09-21T11:59:11.000Z","updated_at":"2025-02-14T08:02:29.000Z","dependencies_parsed_at":"2024-01-15T17:01:35.920Z","dependency_job_id":"2c39b486-4bb0-4b95-a576-e6797ff04fcb","html_url":"https://github.com/coorasse/passkit","commit_stats":{"total_commits":16,"total_committers":4,"mean_commits":4.0,"dds":0.3125,"last_synced_commit":"2c5c2a47c039496c9f67a3bbc8b60311366a67dd"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coorasse%2Fpasskit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coorasse%2Fpasskit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coorasse%2Fpasskit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coorasse%2Fpasskit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coorasse","download_url":"https://codeload.github.com/coorasse/passkit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247332609,"owners_count":20921853,"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":["passkit","wallet-pass"],"created_at":"2024-08-06T08:01:47.564Z","updated_at":"2025-04-05T12:07:22.355Z","avatar_url":"https://github.com/coorasse.png","language":"Ruby","funding_links":["https://github.com/sponsors/coorasse"],"categories":["Ruby"],"sub_categories":[],"readme":"# \u003cimg src=\"./docs/wallet.png\" alt=\"Goboony\" height=\"50\"/\u003e Passkit\n\nYour out-of-the-box solution to start serving Wallet Passes in your Ruby On Rails application.\n\nDo you have a QRCode or a Barcode anywhere in your app that you want to distribute as Wallet Pass, compatible for iOS and Android? Look no further!\n\nThis gem provides everything necessary to distribute Wallet Passes in pkpass format, and gives you all the steps to follow for what we cannot provide.\n\n**We provide:**\n\n* A (not yet) fancy dashboard to manage your passes, registered devices and logs.\n* All API endpoints to serve your passes: create, register, update, unregister, etc...\n* All necessary ActiveRecord models.\n* A BasePass model that you can extend to create your own passes.\n* Some helpers to generate the necessary URLs, so that you can include them in the emails.\n* Examples for everything.\n\n**We don't provide (yet):**\n\n* Full tests coverage: we are working on it!\n* A fancy dashboard: our dashboard is really really simple right now. Pull requests are welcome!\n* Push notifications: this is the most wanted feature I believe. Pull requests are welcome!\n* Google Wallet integration: we use https://walletpasses.io/ on Android to read .pkpass format.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'passkit'\n```\n\nAnd then execute:\n\n    $ bundle install\n\nOr install it yourself as:\n\n    $ gem install passkit\n\nRun the initializer:\n\n    $ rails g passkit:install\n\nthat will generate the migrations and the initializer file.\n\nMount the engine in your `config/routes.rb`:\n\n```ruby\nmount Passkit::Engine =\u003e '/passkit', as: 'passkit'\n```\n\nand run `bin/rails db:migrate`.\n\n### Setup environment variables\n\nIf you followed the installation steps, you already saw that Passkit provides\nyou the tables and ActiveRecord models, and also an engine with the necessary APIs already implemented.\n\nNow is your turn. Before proceeding, you need to set these ENV variables:\n* `PASSKIT_WEB_SERVICE_HOST`\n* `PASSKIT_CERTIFICATE_KEY`\n* `PASSKIT_PRIVATE_P12_CERTIFICATE`\n* `PASSKIT_APPLE_INTERMEDIATE_CERTIFICATE`\n* `PASSKIT_APPLE_TEAM_IDENTIFIER`\n* `PASSKIT_PASS_TYPE_IDENTIFIER`\n\nWe have a [specific guide on how to get all these](docs/passkit_environment_variables.md), please follow it.\nYou cannot start using this library without these variables set, and we cannot do the work for you.\n\n## Usage\n\nIf you followed the installation steps and you have the ENV variables set, we can start looking at what is provided for you.\n\n### Dashboard\n\nHead to `http://localhost:3000/passkit/dashboard/previews` and you will see a first `ExampleStoreCard` available for download.\nYou can click on the button and you will obtain a `.pkpass` file that you can simply open or install on your phone.\nThe dashboard has also a view for logs, and a view for emitted passes.\n\nBy default the dashboard is protected with basic auth. Set the credentials using these ENV variables:\n* `PASSKIT_DASHBOARD_USERNAME`\n* `PASSKIT_DASHBOARD_PASSWORD`\n\nYou can also change the authentication method used (see example below for Devise):\n\n```ruby\n# config/passkit.rb\n\nPasskit.configure do |config|\n  config.authenticate_dashboard_with do\n    warden.authenticate! scope: :user\n    ## redirect_to main_app.root_path unless warden.user.admin? # if you want to check a specific role\n  end\nend\n```\n\n### Mailer Helpers\n\nIf you use mailer previews, you can create the following file in `spec/mailers/previews/passkit/example_mailer_preview.rb`:\n\n```ruby\nmodule Passkit\n  class ExampleMailerPreview \u003c ActionMailer::Preview\n    def example_email\n      Passkit::ExampleMailer.example_email\n    end\n  end\nend\n```\n\nand head to `http://localhost:3000/rails/mailers/` to see an example of email with links to download the Wallet Pass.\nPlease check the source code of [ExampleMailer](app/mailers/passkit/example_mailer.rb) to see how to distribute your own Wallet Passes.\n\n### Example Passes\n\nPlease check the source code of the [ExampleStoreCard](lib/passkit/example_store_card.rb) to see how to create your own Wallet Passes.\n\nAgain, looking at these examples, is the easiest way to get started.\n\n### Create your own Wallet Pass\n\nYou can create your own Wallet Passes by creating a new class that inherits from `Passkit::BasePass` and \ndefining the methods that you want to override.\n\nYou can define colors, fields and texts. You can also define the logo and the background image.\n\nYou should place the images in a 'private/passkit/\u003cyour_downcased_passname\u003e' folder.\nThere is a [dummy app in the gem](test/dummy) that you can use to check how to create your own Wallet Passes.\n\nFull documentation for image specifications is on Apple's\n[Pass Design and Creation](https://developer.apple.com/library/archive/documentation/UserExperience/Conceptual/PassKit_PG/Creating.html)\npage. Naming the file according to convetion and putting it in 'private/passkit/\u003cyour_downcased_passname\u003e' is all that's needed for it\nto be included in the pass.\n\n### Serve your Wallet Pass\n\nUse the [Passkit::UrlGenerator](lib/passkit/url_generator.rb) to generate the URL to serve your Wallet Pass.\nFor one pass, you can initialize it with:\n\n```ruby\nPasskit::UrlGenerator.new(Passkit::MyPass, User.find(1))\n```\n\nFor one passes, you can initialize it with:\n\n```ruby\nPasskit::UrlGenerator.new(Passkit::UserTicket, User.find(1), :tickets)\n```\n(this presumes you have `User.find(1).tickets` would return the ticket records)\n\nand then use `.android` or `.ios` to get the URL to serve the Wallet Pass.\nAgain, check the example mailer included in the gem to see how to use it.\n\n## Debug issues \n\n* On Mac, you can open the *.pkpass files with \"Pass Viewer\". Open the `Console.app` to log possible error messages and filter by \"Pass Viewer\" process.\n* Check the logs on http://localhost:3000/passkit/dashboard/logs\n* In case of error \"The passTypeIdentifier or teamIdentifier provided may not match your certificate, \nor the certificate trust chain could not be verified.\" the certificate (p12) might be expired.\n\n\n## Apple documentation\n\n* [Apple Wallet Passes](https://developer.apple.com/documentation/walletpasses)\n* [Send Push Notifications](https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_apns)\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` 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 the created tag, 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/coorasse/passkit. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/coorasse/passkit/blob/master/CODE_OF_CONDUCT.md).\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 Passkit project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/coorasse/passkit/blob/master/CODE_OF_CONDUCT.md).\n\n## Credits\n\n* \u003ca href=\"https://www.flaticon.com/free-icons/credit-card\" title=\"credit card icons\"\u003eCredit card icons created by Iconfromus - Flaticon\u003c/a\u003e\n\n* https://www.sitepoint.com/whats-in-your-wallet-handling-ios-passbook-with-ruby/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoorasse%2Fpasskit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoorasse%2Fpasskit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoorasse%2Fpasskit/lists"}