{"id":14955646,"url":"https://github.com/chiditarod/dogtag","last_synced_at":"2026-01-03T17:45:26.520Z","repository":{"id":10785924,"uuid":"13054787","full_name":"chiditarod/dogtag","owner":"chiditarod","description":"Racer registration and management application for the CHIditarod. Integrates with Stripe and Classy.","archived":false,"fork":false,"pushed_at":"2024-09-18T09:16:15.000Z","size":1521,"stargazers_count":5,"open_issues_count":17,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-14T11:46:02.684Z","etag":null,"topics":["heroku","rails","rails4","registration","ruby","ruby-on-rails","signup","ticketing-system"],"latest_commit_sha":null,"homepage":"http://chiditarod.org","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chiditarod.png","metadata":{"files":{"readme":"README.md","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-09-24T04:39:55.000Z","updated_at":"2024-09-18T09:07:18.000Z","dependencies_parsed_at":"2023-12-17T23:27:06.503Z","dependency_job_id":"771df0a3-5856-48dc-9ba7-361fc6550448","html_url":"https://github.com/chiditarod/dogtag","commit_stats":{"total_commits":360,"total_committers":5,"mean_commits":72.0,"dds":0.3416666666666667,"last_synced_commit":"54b5c22700bb1f061ad651ce39307405fecfb469"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chiditarod%2Fdogtag","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chiditarod%2Fdogtag/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chiditarod%2Fdogtag/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chiditarod%2Fdogtag/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chiditarod","download_url":"https://codeload.github.com/chiditarod/dogtag/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234808933,"owners_count":18890086,"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":["heroku","rails","rails4","registration","ruby","ruby-on-rails","signup","ticketing-system"],"created_at":"2024-09-24T13:11:29.583Z","updated_at":"2025-10-01T01:31:03.687Z","avatar_url":"https://github.com/chiditarod.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"dogtag\n======\n\n*dogtag is a Ruby on Rails application that registers user and teams for the annual [CHIditarod](http://chiditarod.org) urban shopping cart race and epic mobile food drive.  The code is 100% open-source, runs on Heroku, and has processed more than $100,000.*\n\n![Build Status](https://travis-ci.org/chiditarod/dogtag.svg?branch=master)\n[![Test Coverage](https://codeclimate.com/github/chiditarod/dogtag/badges/coverage.svg)](https://codeclimate.com/github/chiditarod/dogtag/coverage)\n[![Code Climate](https://codeclimate.com/github/chiditarod/dogtag.png)](https://codeclimate.com/github/chiditarod/dogtag)\n\nIntegrations\n--------\n- Payments/Refunds via the Stripe API\n- Fundraising campaign automation via the Classy API\n\nRequirements\n------------\n- App Server like Heroku\n- Redis\n- PostgreSQL\n- SMTP Server\n\nRuntime Environment Variables\n-----------------------------\n\n```\nDATABASE_URL=postgres://postgres:123abc@localhost:5432\nSTRIPE_PUBLISHABLE_KEY=pk_test_...\nSTRIPE_SECRET_KEY=sk_test_...\nCLASSY_CLIENT_ID=              # optional\nCLASSY_CLIENT_SECRET=          # optional\nCLASSY_ORGS=                   # comma-separated list of classy organization ids the client has access to. used to cache org members\nROLLBAR_ACCESS_TOKEN=          # optional\nDEFAULT_FROM_EMAIL             # e.g. info@yourdomain.tld\nSMTP_DOMAIN                    # e.g. heroku.com\nSMTP_HOST                      # e.g. smtp.foo.tld\nSMTP_PORT\nSMTP_USERNAME\nSMTP_PASSWORD\n```\n\n## Custom questions using jsonform\n\nEach race has a `jsonform` field. This field can contain a [jsonform](https://github.com/jsonform/jsonform) schema that is consumed and rendered as questions to the end-user during their team signup. Their responses are then saved into their team record and are included when exporting a CSV.\n\n- __NOTE:__ There's a hack that requires addition to `HACK_PARAM_WHITELIST` any time a new jsonform question is added.  See [https://github.com/chiditarod/dogtag/issues/40](https://github.com/chiditarod/dogtag/issues/40).\n- For example jsonform data, see [github](https://github.com/chiditarod/dogtag/tree/master/examples/jsonform)\n\n## Developer Setup\n\n*Tested against MacOS Mojave (10.14.2)*\n\n### Prerequisites\n\n- [Xcode](https://itunes.apple.com/us/app/xcode/id497799835)\n- [Docker](https://docs.pie.apple.com/artifactory/docker.html)\n- [Homebrew](https://brew.sh/)\n\n### Install Ruby\n\n```bash\nbrew install rbenv\nrbenv install $(cat .ruby-version)\ngem install bundler\n```\n\n### Install\n\n#### MacOS 12.6\n\n```sh\nxcode-select --install\nsoftwareupdate --all --install --force\n\nbrew install readline openssl v8 libpq\ngem install libv8 --platform=\"x86_64-darwin-20\"\nbundle config --local build.pg --with-opt-include=\"/opt/homebrew/opt/libpq/include\" --with-opt-lib=\"/opt/homebrew/opt/libpq/lib\"\nbundle install\n\ndocker-compose up -d db\nbundle exec bin/rails db:migrate RAILS_ENV=test\nrspec\n```\n\n#### MacOS 12.1\n\n```sh\nxcode-select --install\nsoftwareupdate --all --install --force\n\nbrew install readline openssl v8 libpq\ngem install libv8 --platform=\"x86_64-darwin-20\"\nbundle install\nbundle exec bin/rails db:migrate RAILS_ENV=test\nrspec\n```\n\n#### Prior MacOS Versions\n\n```sh\nbrew install libffi libpq\nexport PKG_CONFIG_PATH=\"$PKG_CONFIG_PATH:/usr/local/opt/libffi/lib/pkgconfig\"\nbundle config --local build.ffi --with-ldflags=\"-L/usr/local/opt/libffi/lib\"\nbundle config --local build.pg --with-opt-dir=\"/usr/local/opt/libpq\"\nbundle install\n```\n\n### Create an `.env` file for local development\n\nThis file is used when booting Rails outside of Docker.  Customize `.env` with `STRIPE_PUBLISHABLE_KEY` and `STRIPE_PUBLISHABLE_KEY` entries, which are currently required to boot the app.\n\n```bash\ncp .env.example .env\n```\n\n## Local Development\n\n### Build and run all containers\n\nThis will also create the `dogtag_test` and `dogtag_development` databases and will build and boot mailcatcher.\n\n    docker-compose up -d\n\n### Run the test suite\n\n    docker-compose run web bundle exec rspec   # from within the container\n    bundle exec rspec                          # or from the console\n\n### Mailcatcher\n\nThe `mailcatcher` gem gets built into a docker image and deployed in the\ndocker compose cluster. It exposes an SMTP port on `1025` and a web UI on `1080`.\n\n## Database\n\n### Create and Migrate\n\nVia docker:\n\n    docker-compose run web bundle exec rake db:migrate\n    docker-compose run -e RAILS_ENV=test web bundle exec rake db:migraten\n\nOr via the command line:\n\n    bundle exec rake db:migrate\n    RAILS_ENV=test bundle exec rake db:migrate\n\n### Connect to postgres inside container\n\n    docker-compose exec db psql -U postgres\n\n### Restore postgres db from a dump file\n\n```bash\ndocker cp /local/file.dump $(docker-compose ps -q  db):/file.dump\ndocker-compose exec db pg_restore -U postgres --verbose --clean --no-acl --no-owner -h localhost -d dogtag_development /file.dump\n```\n\n## Basic Deploy Plan\n\n1. Test locally using TEST Stripe credentials.\n2. Deploy to a Heroku staging environment using TEST credentials.\n3. Deploy to production using PROD credentials.\n4. Tail them logs.\n\n## Yearly SDLC Cycle\n\nHere is an outline of the yearly cycle for using Dogtag with a single event ([CHIditarod](http://www.chiditarod.org), in our case).\n\n1. Do a development cycle to incorporate any new features.\n1. Update the jsonform with any new questions and expected responses for the specific race.\n1. Launch it all locally, make sure Stripe payments are functioning and a team can finalize their registration successfully.\n1. Use mailcatcher to ensure emails are being created and sent.\n1. Check that the SSL certificate for dogtag.chiditarod.org is up to date and working\n1. Turn on SSL in heroku and apply the cert.\n1. Upgrade PostgreSQL if needed\n1. Upgrade Rails to pick up security fixes.\n\n\n## Developers\n\n### Upgrade Ruby\n\n```\nexport RUBY_CONFIGURE_OPTS=\"--with-openssl-dir=$(brew --prefix openssl)\"\nrbenv install 2.7.5\n```\n\n### Jsonform hacks\n\nWhen you add fields to the jsonform, they won't persist unless you\nallowlist them in `app/controllers/questions_controller.rb`.\n\n### Scratch Ruby Upgrade notes\n\n```sh\nbundle config build.thin --with-cflags=\"-Wno-error=implicit-function-declaration\"\n\ngem install libv8 -v '8.4.255.0' -- --with-v8-lib\n\nbundle config build.libv8 --with-system-v8\ngem install libv8 -v '8.4.255.0' --with-system-v8\n\nCC='clang -fdeclspec' gem install libv8 -v '8.4.255.0'\nCC='clang -fdeclspec' gem install libv8 -v '8.4.255.0' --with-system-v8\n\n# bundle config build.libv8 --platform=\"x86_64-darwin-20\"\n\ngem install bundler -v '2.1.4'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchiditarod%2Fdogtag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchiditarod%2Fdogtag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchiditarod%2Fdogtag/lists"}