{"id":13819813,"url":"https://github.com/rubyforgood/playtime","last_synced_at":"2025-05-15T10:14:12.471Z","repository":{"id":19901061,"uuid":"88222162","full_name":"rubyforgood/playtime","owner":"rubyforgood","description":"Supporting children and families experiencing homelessness in Washington, DC.  Live app - https://wishlist.playtimeproject.org Organization Website:","archived":false,"fork":false,"pushed_at":"2019-03-03T02:10:32.000Z","size":3095,"stargazers_count":95,"open_issues_count":26,"forks_count":49,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-05-15T09:55:23.617Z","etag":null,"topics":["nonprofit","rails","ruby-for-good"],"latest_commit_sha":null,"homepage":"http://www.playtimeproject.org/","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/rubyforgood.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-14T01:51:50.000Z","updated_at":"2025-05-12T03:29:45.000Z","dependencies_parsed_at":"2022-07-16T10:00:37.033Z","dependency_job_id":null,"html_url":"https://github.com/rubyforgood/playtime","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/rubyforgood%2Fplaytime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyforgood%2Fplaytime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyforgood%2Fplaytime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyforgood%2Fplaytime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rubyforgood","download_url":"https://codeload.github.com/rubyforgood/playtime/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254319663,"owners_count":22051076,"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":["nonprofit","rails","ruby-for-good"],"created_at":"2024-08-04T08:00:53.346Z","updated_at":"2025-05-15T10:14:07.459Z","avatar_url":"https://github.com/rubyforgood.png","language":"Ruby","readme":"\u003cimg src=\"https://github.com/teneresa/playtime/blob/master/new_logo_files/PNG/Playtime_logo_low_res.png\"/\u003e\n\n# Homeless Children's Playtime Project\n[![Build Status](https://api.travis-ci.org/rubyforgood/playtime.svg?branch=master)](https://travis-ci.org/rubyforgood/playtime) [![View performance data on Skylight](https://badges.skylight.io/status/vXHx56uMnWP7.svg)](https://oss.skylight.io/app/applications/vXHx56uMnWP7)\n\n*The mission of the [Homeless Children's Playtime Project][HCPP] is to nurture\nhealthy child development and reduce the effects of trauma among children\nliving in temporary housing programs in Washington, DC.*\n\n*Playtime seeks to create a city that provides every opportunity for children\nin families experiencing homelessness to succeed by ensuring consistent\nopportunities to play and learn, offering support services for families, and\nadvocating for affordable housing and safe shelter.*\n\n[HCPP]: http://www.playtimeproject.org/\n\n### About This App\n\nThe goal of this application is to allow supporters to donate toys and other\nitems that help advance the work of Playtime Project's work in family shelters\nthroughout DC. This application will allow donors to view the organization's\nAmazon wish lists, add items, track contributions, and aid staff in following\nup with donors.\n\n\u003cimg src=\"https://github.com/teneresa/playtime/blob/master/new_logo_files/playtime_app.png\"/\u003e\n\n### About Ruby for Good\n\nThis project was born at Ruby for Good 2017.\n\nRuby for Good is an annual event based out of the DC-metro area where Ruby\nprogrammers from all over the globe get together for a long weekend to build\nprojects that help our communities. For more information about Ruby for Good,\n[visit the website] or [check out the other projects].\n\n[visit the website]: http://rubyforgood.org/\n[check out the other projects]: http://rubyforgood.org/yearbook.html\n\n\n## Join the Team\n\nThis application is a work in progress, and we encourage you to jump in!\n\nTo get started, follow our [Getting Started](#getting-started) guide to set up\nyour computer, then check out [our GitHub Issues][issues] to see what issues are\ncurrently in the pipeline. You can find our contribution guidelines in\n[CONTRIBUTING]. Get in touch with [@micahbales] for more details.\n\nTo join the conversation, join the [#playtime][slack-channel] channel\non Slack ([get an invite][slack-invite]).\n\n* [Getting Started](#getting-started)\n    * [Quick Start](#quick-start)\n    * [Getting Amazon OAuth Working Locally](#getting-amazon-oauth-working-locally)\n    * [Getting Amazon Product Advertising API Working Locally](#getting-amazon-product-advertising-api-working-locally)\n* [Testing](#testing)\n* [Environment](#environment)\n\n[issues]: https://github.com/rubyforgood/playtime/issues\n[@micahbales]: https://github.com/micahbales\n[slack-channel]: https://rubyforgood.slack.com/messages/playtime\n[slack-invite]: https://rubyforgood.herokuapp.com/\n[CONTRIBUTING]: .github/CONTRIBUTING.md\n\n### Getting Started\n\n#### Quick Start\n\nBy the end of this section, you should have the project and dependencies\ninstalled on your local system. For information on how to contribute, see\n[Contributing][CONTRIBUTING].\n\nYou need:\n\n  - Ruby 2.4.1\n  - Rails 5.1\n  - Postgres \u003e=9.1\n  - A JavaScript runtime, we recommend Node.js\n\nYou will need Node.js (which comes bundled with NPM) and it is easiest to\ninstall on Mac, Windows, or Linux [with your favorite package manager][node-pkg]\nor by downloading directly from [nodejs.org][node-direct].\n\n[node-pkg]:    https://nodejs.org/en/download/package-manager/\n[node-direct]: https://nodejs.org/en/download/\n\nYou will also need Git, Ruby, Rails, and PostgreSQL. If you have Git and\nPostgres in some version or another you're probably set. But:\n\n  - If you're working on **a fresh Windows machine**, you're best off installing\n    Ruby and Rails with the [Rails Installer]. For PostgreSQL, you'll want to\n    install [EnterpriseDB].\n\n  - If you have **a fresh Mac OS X machine**, just follow these\n    [directions][Go Rails] (if you're running a different OS version, switch to\n    the correct version). These instructions include PostgreSQL.\n\n  - If you are using **Ubuntu Linux**, use this [Rails Apps Guide] to get set\n    up with Ruby, Rails, and Node.js and this guide to\n    [install PostgreSQL][Postgres Ubuntu].\n\n  - Otherwise, Google for instructions for your OS of choice. Let us know if\n    you get stuck!\n\n[Rails Installer]: http://railsinstaller.org\n[EnterpriseDB]: https://www.enterprisedb.com/downloads/postgres-postgresql-downloads#windows\n\n[Go Rails]: https://gorails.com/setup/osx\n\n[Rails Apps Guide]: http://railsapps.github.io/installrubyonrails-ubuntu.html\n[Postgres Ubuntu]: https://www.postgresql.org/download/linux/ubuntu/\n\n\nNavigate to your desired working directory. Then from a command prompt:\n\n  ```bash\n  $ git clone http://github.com/rubyforgood/playtime\n  $ cd playtime\n  $ bin/setup\n  $ rails server\n  ```\n\nThen navigate to `http://localhost:3000` in your browser to view the app.\n\n#### Getting Amazon OAuth Working Locally (Optional)\n\nBy the end of this section, you should be able to create an account/login to\nthe app on your local machine.\n\nThis application uses Amazon OAuth for authentication. In order to create an\naccount or login locally:\n\n1. Follow [these instructions][Amazon OAuth Instructions] to create an Amazon\n   app. This is required for logging in/creating\n\n2. If you don't have a `.env` file, copy the sample .env configuration:\n\n    ```bash\n    # from the root project directory\n    $ cp .env.sample .env\n    ```\n\n3. In `.env`, fill in the id and secret keys for your Amazon app (Client ID and\n   Client Secret on your Amazon App Console):\n\n    ```bash\n    # .env\n    AMAZON_CLIENT_ID=\"your client id\"\n    AMAZON_CLIENT_SECRET=\"your client secret\"\n    # ...\n    ```\n\n4. *(Optional: Setting up your admin account)* If you want your development\n   account to be an admin, you can set that up by setting the admin environment\n   variables:\n\n   ```bash\n   # .env\n   ADMIN_NAME=\"your name\"\n   ADMIN_AMAZON_EMAIL=\"the email you use for your amazon.com account\"\n   ```\n\n   Next, run `rake users:initialize_admin`. If you've already logged in, your\n   account will be promoted to an admin. If you haven't, your new admin account\n   will be created.\n\n   You can also change your user role by using `rails console`.\n\n5. Start your Rails app with `rails server`. You're ready to OAuth!\n\n[Amazon OAuth Instructions]: https://github.com/wingrunr21/omniauth-amazon#prereqs\n\n\n#### Getting Amazon Product Advertising API Working Locally\n\nBy the end of this section, you should be able to search Amazon products and\nadd items to wishlists on your local machine (when your logged-in user is an\nadmin or site manager).\n\n**This step is only required for site managers and admins searching/adding\nAmazon products.** If your issue doesn't involve working with the Amazon\nProduct API, you'll be fine without this step.\n\nAdmins and site managers can add new items to their wishlists by searching\nthe Amazon Product API. To get this search working locally, you'll need to\ncreate a few Amazon accounts and add some more `.env` configuration:\n\n  1. First, [register for an Amazon Associate account][Amazon Associate]. Order\n     matters here; be sure to do this before step #2!\n\n  2. Next, [become a Product Advertising API Developer][Product Advertising API].\n\n  3. Last, using the AWS credentials you downloaded (or viewed) in step #2,\n     update your `.env` configuration:\n\n       ```bash\n       # .env\n       # ...\n       AWS_ACCESS_KEY=\"your access key id goes here\"\n       AWS_SECRET_KEY=\"your secret access key goes here\"\n       AWS_ASSOCIATES_TAG=\"playtim009-20\" # \u003c- same for everyone\n       ```\n     You'll only be able to download your secret key once, so make sure you put\n     it in a safe place! Otherwise, you'll have to log in and regenerate your\n     credentials.\n\nRestart the server and you're done–you can search to your heart's content!\n\n[Amazon Associate]: http://docs.aws.amazon.com/AWSECommerceService/latest/DG/becomingAssociate.html\n[Product Advertising API]: http://docs.aws.amazon.com/AWSECommerceService/latest/DG/becomingDev.html\n\n\n### Testing\n\nAll specs must pass in order for a PR to be accepted. Specs and associated\nchecks can be run with\n\n  ```bash\n  $ bin/rake\n  ```\n\nSpecs can be found in the `spec` folder, and they follow the typical `rspec`\ndirectory structure. Some notes:\n\n  - We're using FactoryBot to generate objects, and those files can be found\n    in `spec/factories/\u003cplural_model_name\u003e.rb`.\n\n  - Support files, including helper methods, gem initialization/configuration,\n    etc. can be found in `spec/support`.\n\n  - While we use factories instead of fixtures to generate objects, static\n    test files (ex. images or API responses) can be found in `fixtures`.\n\n  - External HTTP requests can be mocked with WebMock. To mark a spec as\n    containing an external request, use the `:external` tag.\n\n\n### Environment\n\nWe manage environment variables using `.env`. This file should be created when\nyour run `bin/setup`, but you can always copy `.env.sample` if it gets deleted.\nFor changes to `.env` to take effect, you'll need to restart your server.\n\n**Remember: `.env` should never be checked into source control!**\n\n  ```bash\n  # Annotated .env example\n\n  # The client id and secret are used for OAuth (creating accounts/logging in).\n  # Setup instructions can be found above in \"Getting Started with OAuth\"\n  AMAZON_CLIENT_ID=\"your amazon client id\"\n  AMAZON_CLIENT_SECRET=\"your amazon client secret key\"\n\n  # The access key and secret are used for interacting with the Amazon Product\n  # API. Setup instructions can be found above in \"Getting Amazon Product\n  # Advertisement API Working Locally\"\n  AWS_ACCESS_KEY=\"your aws access key\"\n  AWS_SECRET_KEY=\"your aws secret key\"\n\n  # If you want to force Amazon login instead of developer in development environment\n  # set it to true.\n  FORCE_AMAZON_LOGIN=false\n\n  # Code for generating affiliate links from search (same for everyone)\n  AWS_ASSOCIATES_TAG=\"playtim009-20\"\n\n  # Default rack env and port (same for everyone)\n  RACK_ENV=\"development\"\n  PORT=3000\n\n  # Admin account details for `rake users:initialize_admin`\n  ADMIN_NAME=\"your name\"\n  ADMIN_EMAIL=\"the email you use for your amazon.com account\"\n  ```\n","funding_links":[],"categories":["Happy Exploring 🤘"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyforgood%2Fplaytime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frubyforgood%2Fplaytime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyforgood%2Fplaytime/lists"}