{"id":13819089,"url":"https://github.com/debtcollective/membership","last_synced_at":"2025-05-16T04:32:35.266Z","repository":{"id":38172855,"uuid":"202372837","full_name":"debtcollective/membership","owner":"debtcollective","description":"💰 Member dues and Donations platform","archived":false,"fork":false,"pushed_at":"2023-03-16T06:01:24.000Z","size":12178,"stargazers_count":11,"open_issues_count":64,"forks_count":2,"subscribers_count":4,"default_branch":"development","last_synced_at":"2024-08-05T08:07:43.120Z","etag":null,"topics":["donations","membership","non-profit","rails","react","ruby","stripe"],"latest_commit_sha":null,"homepage":"https://membership.debtcollective.org","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/debtcollective.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}},"created_at":"2019-08-14T14:59:50.000Z","updated_at":"2022-08-15T05:36:04.000Z","dependencies_parsed_at":"2024-01-13T16:34:02.811Z","dependency_job_id":null,"html_url":"https://github.com/debtcollective/membership","commit_stats":null,"previous_names":[],"tags_count":110,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/debtcollective%2Fmembership","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/debtcollective%2Fmembership/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/debtcollective%2Fmembership/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/debtcollective%2Fmembership/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/debtcollective","download_url":"https://codeload.github.com/debtcollective/membership/tar.gz/refs/heads/development","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225405533,"owners_count":17469363,"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":["donations","membership","non-profit","rails","react","ruby","stripe"],"created_at":"2024-08-04T08:00:39.877Z","updated_at":"2024-11-19T18:31:12.399Z","avatar_url":"https://github.com/debtcollective.png","language":"Ruby","funding_links":[],"categories":["Happy Exploring 🤘"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch2\u003eMembership\u003c/h2\u003e\n\u003c/div\u003e\n\nMembership is a simple app for non profit organizations, that allows users to create an account using [Discourse](https://discourse.org) and donate to the organization. It contains the following features:\n\n- Simple donations payment management through Stripe.\n- One time donations through anonymous accounts.\n- One time donations through user accounts.\n- User dashboard to manage their own subscription.\n- Simple statistics for the Organization around donations.\n- Organization dashboard to manage memberships.\n\n\u003chr /\u003e\n\n[![CircleCI](https://circleci.com/gh/debtcollective/membership.svg?style=svg)](https://circleci.com/gh/debtcollective/membership)\n\n# Table of contents\n\n- [Table of contents](#table-of-contents)\n- [Quick start](#quick-start)\n- [Environment Variables](#environment-variables)\n  - [Dotenv](#dotenv)\n    - [Stripe](#stripe)\n    - [Google reCAPTCHA](#google-recaptcha)\n- [System dependencies](#system-dependencies)\n- [Running tests](#running-tests)\n  - [RSpec](#rspec)\n  - [Cypress](#cypress)\n- [Developer notes](#developer-notes)\n  - [User sessions](#user-sessions)\n  - [Running Overmind](#running-overmind)\n  - [Running Docker](#running-docker)\n  - [Solargraph](#solargraph)\n  - [Formatting with Standard and Prettier](#formatting-with-standard-and-prettier)\n  - [Codecov](#codecov)\n  - [Preview emails in development with Mailhog](#preview-emails-in-development-with-mailhog)\n\n\u003csmall\u003e\u003ci\u003e\u003ca href='http://ecotrust-canada.github.io/markdown-toc/'\u003eTable of contents generated with markdown-toc\u003c/a\u003e\u003c/i\u003e\u003c/small\u003e\n\n# Quick start\n\n```bash\ncp .env.sample .env # copy .env file\nbundle install # install gems\nyarn install # install packages\nrake db:create # create database\nrake db:migrate # migrate database\nrake db:seed # seed database\n\n# run project with\novermind s\n```\n\nAt this point, you should be able to see the app at \u003chttp://membership.lvh.me:5000\u003e\n\n# Environment Variables\n\nThe easiest way to run the app is by using [Doppler](https://www.doppler.com/). Ask to be added to the project.\n\nYou can install it by running `brew install dopplerhq/cli/doppler`. You can can check the [Doppler docs here](https://docs.doppler.com/docs/enclave-installation#local-development), but below is the gist of commands you need to run.\n\n```bash\ndoppler login\ndoppler setup\n```\n\nTo use Doppler to inject environment variables, prepend `doppler run` to commands. You can run [Overmind](#running-the-app-with-overmind) with Doppler running.\n\n```bash\ndoppler run overmind s\n```\n\nWe also support [Dotenv](#dotenv) to configure environment variables. But you will need to supply all the secrets manually.\n\n## Dotenv\n\nTo do this, just run `cp .env.sample .env` and replace the variables you need. For most of them we are providing defaults that work in development.\n\n### Stripe\n\nYou can get the Stripe keys by registering for a free Stripe account and generating test keys. Here's a link to their Docs on how to obtain these keys \u003chttps://stripe.com/docs/keys#obtain-api-keys\u003e.\n\n### Google reCAPTCHA\n\nIn order to obtain this key, you need to go to this address and generate one \u003chttps://www.google.com/recaptcha/admin/create\u003e. Be sure to use the reCAPTCHA V2 and select the I'm not a robot\" checkbox option. Also, set the correct domain names the app is running on, these are `membership.lvh.me` and `localhost`.\n\nIf you need help to get some of these key right or setting this up, please ask other devs for help.\n\n# System dependencies\n\nYou'll need to have installed the following dependencies installed, if you don't want to use the provided Docker containers.\n\n- Ruby\n- Node\n- PostgreSQL\n- Overmind\n\nAn instance of PostgresSQL needs to be actively running.\n_Note:_ MacOS users can use the [Postgres app](https://postgresapp.com).\n\n# Running tests\n\n## Prepare tests\nrails db:test:prepare\n\n## RSpec\n\n```bash\nbundle exec rspec\n```\n\n## Cypress\n\n```bash\nrails cypress:open\n```\n\n# Developer notes\n\n## User sessions\n\nWe use cookie based authentication across subdomains instead of creating sessions between apps. This provides a better experience and fixes out of sync sessions between Discourse and other apps. [Read how to setup a user session](https://github.com/debtcollective/discourse-debtcollective-sso/blob/master/README.md).\n\n## Running Overmind\n\n[Overmind](https://github.com/DarthSim/overmind) is a process manager for Procfile-based apps.\n\nYou can install on OSX by running `brew install tmux overmind`.\n\nA cool feature that Overmind has is that it allows you to connect to specific process terminal via tmux. This is really\nuseful when debugging apps. If you use for example `binding.pry`, you can connect to the debugging terminal by running `overmind connect web`\n\n## Running Docker\n\nYou can run the app using docker compose.\n\n```bash\ndocker compose up\n```\n\n## Solargraph\n\nInstall [Ruby Solargraph](https://marketplace.visualstudio.com/items?itemName=castwide.solargraph) VSCode extension to enable autocompletion.\n\n## Formatting with Standard and Prettier\n\nWe are using [Standard](https://github.com/testdouble/standard) that is a wrapper on top of Rubocop with a predefined set of Rules. If you use VS Code you will want to install [vscode-ruby](https://marketplace.visualstudio.com/items?itemName=rebornix.Ruby) extension and enable formatting on save.\n\nWe include a `.vscode` folder with configuration specific to this project.\n\n```json\n{\n  \"[ruby]\": {\n    \"editor.formatOnSave\": true\n  },\n  \"ruby.lint\": {\n    \"standard\": true\n  },\n  \"ruby.format\": \"standard\",\n  \"ruby.useLanguageServer\": true,\n  \"editor.formatOnSaveTimeout\": 5000\n}\n```\n\nWe're also using [standardjs](https://standardjs.com) and [prettier](https://prettier.io) to standarize our JavaScript development. This is running automatically on a **before commit** hook using [husky](https://github.com/typicode/husky#readme).\n\n## Codecov\n\nWe use [codecov](https://github.com/codecov/codecov-ruby) for our test coverage metrics. In CI we need to provide a `CODECOV_TOKEN` env variable to upload code coverage stats correctly.\n\n## Preview emails in development with Mailhog\n\nWe use [Mailhog](https://github.com/mailhog/MailHog) to preview emails in development. You can install it with brew by running `brew install mailhog`. Once you have it installed, you can run it in a separated terminal session with `mailhog`.\n\nYou can preview the email by going to http://127.0.0.1:8025\n\n## Data migrations with the data_migrate gem\n\nWe use [data_migrate](https://github.com/ilyakatz/data-migrate) to handle data migrations, instead of having many one-off scripts. You can generate a data migration by running.\n\n```bash\nrails g data_migration migration_name\n```\n\nand apply the data migrations by running.\n\n```bash\nrails data:migrate\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdebtcollective%2Fmembership","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdebtcollective%2Fmembership","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdebtcollective%2Fmembership/lists"}