Conservancy's Improvements and changes to the Houdini project. These are generally upstreamed but some items are Conservancy-specific, particularly some items in the docs/ directory on the conservancy/current branch.
Find a file
Bradley M. Kuhn 9368de336a
Some checks failed
Javascript build and test / lint (14.6.0, ubuntu-20.04) (push) Has been cancelled
Javascript build and test / jest (14.6.0, ubuntu-20.04) (push) Has been cancelled
Javascript build and test / webpack (14.6.0, ubuntu-20.04) (push) Has been cancelled
Placeholders / notice_js (push) Has been cancelled
Placeholders / notice_ruby (push) Has been cancelled
Placeholders / lint (14.6.0, ubuntu-20.04) (push) Has been cancelled
Placeholders / jest (14.6.0, ubuntu-20.04) (push) Has been cancelled
Placeholders / webpack (14.6.0, ubuntu-20.04) (push) Has been cancelled
Placeholders / main_build (14.6.0, ubuntu-20.04, 2.7.3) (push) Has been cancelled
Ruby test and build / main_build (14.6.0, ubuntu-20.04, 2.7.3) (push) Has been cancelled
Conservancy: remove depends_on, at least temporarily.
I don't currently understand how depends_on works in Docker, so I'm
just removing it for now until I know what to put it in its place.
2021-08-10 10:52:08 -07:00
.github Update to ruby 2.7.3 2021-05-24 14:03:02 -05:00
.storybook Add CssBaseline decorator and Roboto to Storybook 2021-03-10 00:54:23 -06:00
app Add api/users/current 2021-08-06 17:40:30 -05:00
bin Replace nonprofit creation with houdini:nonprofit:create Rails command 2021-03-28 16:17:52 -05:00
client/css/global Remove old client js 2020-05-27 12:30:04 -05:00
commands/rails/commands/houdini/nonprofit/create Replace nonprofit creation with houdini:nonprofit:create Rails command 2021-03-28 16:17:52 -05:00
config Add api/users/current 2021-08-06 17:40:30 -05:00
db Add stripe_refund.* publishing 2021-07-14 11:23:22 -05:00
docker Conservancy: remove depends_on, at least temporarily. 2021-08-10 10:52:08 -07:00
docs docs: note build-from-source goal, but yet undone for yarn & nodejs 2021-08-09 19:01:01 -07:00
gems Move info about the hoster into its own module 2021-04-23 12:59:42 -05:00
lib Add stripe_refund.* publishing 2021-07-14 11:23:22 -05:00
public Move widget css into a controller so it's updateable 2020-04-23 14:09:56 -05:00
script docker: rvm installation, but don't use get.rvm.io script. 2021-08-09 19:37:04 -07:00
spec Add api/users/current 2021-08-06 17:40:30 -05:00
types Use the typescript version of semicolon eslint rule 2021-01-11 12:38:44 -06:00
.bootstraprc Everything works except fonts 2020-04-23 14:09:56 -05:00
.browserslistrc Be more specific in the browserlist file 2020-10-09 11:47:39 -05:00
.buildpacks Initial commit. Previous history maintained by CommitChange 2018-03-25 13:30:42 -04:00
.dockerignore docker: Node/Yarn: install nodesource & yarn keys from local copy 2021-08-09 19:00:58 -07:00
.env.template Remove AWS 2020-06-10 11:35:39 -05:00
.env.test Remove AWS 2020-06-10 11:35:39 -05:00
.eslintignore Replace nonprofit creation with houdini:nonprofit:create Rails command 2021-03-28 16:17:52 -05:00
.eslintrc.js Use the typescript version of semicolon eslint rule 2021-01-11 12:38:44 -06:00
.gitignore Improve i18n-js generation and use 2020-11-24 17:02:45 -06:00
.jshintrc Initial commit. Previous history maintained by CommitChange 2018-03-25 13:30:42 -04:00
.markdownlint.jsonc Add markdownlint to project and builds 2020-10-15 15:12:48 -05:00
.nvmrc Update to 14.6.0 for node 2020-07-28 11:49:40 -05:00
.rspec Add the rails helper to .rspec 2019-11-08 16:13:03 -06:00
.rubocop.yml Add stripe_refund.* publishing 2021-07-14 11:23:22 -05:00
.rubocop_rspec.yml Split RSpec related rubocop rules into a separate file 2021-04-08 11:08:17 -05:00
.ruby-gemset dev: add .ruby-gemset and fix dependencies issues 2019-08-02 12:49:24 -05:00
.ruby-version Update to ruby 2.7.3 2021-05-24 14:03:02 -05:00
AGPL-3.0.txt AGPLv3, as downloaded from https://www.gnu.org/licenses/agpl-3.0.txt 2018-03-25 15:10:40 -04:00
babel.config.js Make sure @material-ui/core and @material-ui/icons aren't fully imported in babel 2020-07-16 02:52:33 -05:00
CC0-1.0.txt Creative Commons 0 1.0 Universal (CC0 1.0), Public Domain Dedication, as downloaded from: http://creativecommons.org/publicdomain/zero/1.0/legalcode.txt 2018-03-25 15:10:39 -04:00
CODE_OF_CONDUCT.md Initial commit. Previous history maintained by CommitChange 2018-03-25 13:30:42 -04:00
config.ru Upgrade to rails 6.1 2021-01-06 17:15:20 -06:00
dc fix docker name so it works consistently 2019-03-06 08:58:20 -05:00
Gemfile Add shoulda-matchers and begin using 2021-07-22 12:00:21 -05:00
Gemfile.lock Add shoulda-matchers and begin using 2021-07-22 12:00:21 -05:00
GPL-3.0.txt GPLv3, as downloaded from https://www.gnu.org/licenses/gpl-3.0.txt 2018-03-25 15:46:42 -04:00
included.json Add react-typescript-checkmark NOTICE 2021-03-09 19:03:21 -06:00
jest.config.js Ignore some files for Jest 2021-02-22 13:19:56 -06:00
LGPL-3.0.txt LGPLv3, as downloaded from https://www.gnu.org/licenses/lgpl-3.0.txt 2018-03-25 15:46:42 -04:00
LICENSE Shorten license definition 2020-06-15 10:26:57 -05:00
NOTICE-js Bump dns-packet from 1.3.1 to 1.3.4 2021-05-28 17:03:13 -05:00
NOTICE-ruby Add shoulda-matchers and begin using 2021-07-22 12:00:21 -05:00
package.json Update to webpacker 5.4.0 2021-05-21 14:30:57 -05:00
postcss.config.js WIP 2020-04-23 14:09:14 -05:00
Procfile Remove unneeded job worker for procfile 2019-11-14 14:23:37 -06:00
Procfile.dev Initial Transaction and OfflineTransaction support 2021-04-13 10:47:37 -05:00
Procfile.dev-hmr Initial Transaction and OfflineTransaction support 2021-04-13 10:47:37 -05:00
Rakefile style(format): run rubocop format autocorrect 2019-08-02 19:07:29 +02:00
README.md Adds general reference to docs folder on README 2021-07-06 10:34:35 -05:00
run Improve docker-compose setup 2019-01-17 11:50:55 -06:00
setupTests.js Support for grape and onboarding via react 2018-05-22 13:33:35 -05:00
tsconfig.jest.json Support for grape and onboarding via react 2018-05-22 13:33:35 -05:00
tsconfig.json Update to Webpacker 5.1.1 2020-05-27 17:05:25 -05:00
Web-Template-Output-Additional-Permission.txt Paragraph reformat only; no textual change. 2018-03-25 15:48:15 -04:00
yarn.lock Bump dns-packet from 1.3.1 to 1.3.4 2021-05-28 17:03:13 -05:00

Houdini build

Note

: This is the latest version (pre-2.0) of Houdini and is currently in HEAVY development. You may want to use v1 instead.

The Houdini Project is free and open source fundraising infrastructure. It includes...

  • Crowdfunding campaigns
  • Donate widget page and generator
  • Fundraising events
  • Nonprofit Profiles
  • Nonprofit payment history and payouts dashboard
  • Nonprofit recurring donation management dashboard
  • Nonprofit metrics overview / business intelligence dashboard
  • Nonprofit supporter relationship management dashboard (CRM)
  • Nonprofit org user account management
  • Simple donation management for donors

The frontend is written in a few custom frameworks, the largest of which is called Flimflam. We endeavor to migrate to React as quickly as possible to increase development comfort and speed.

All new backend code and React components well tested.

Prerequisites

Houdini is designed and tested to run with the following:

  • Ruby 2.6
  • Node 14
  • Yarn
  • PostgreSQL 10 or 12
  • Ubuntu 18.04, 20.04 or equivalent

Get involved

Houdini's success depends on you!

Join our Zulip chat

https://houdini.zulipchat.com

Help with translations

Visit the Internationalization channel on Houdini Zulip and discuss

Help with usability tests

Check on contribution_guide_usability_testing.md and create an issue with your test design or run test sessions for opened usability testing issues.

Dev Setup

Tips for specific circumstances

  • Docker: Docker was previously used for development of Houdini. See docker.md for more info.
  • Mac: Mac dev setup may require some unique configuration. See mac_getting_started.md for more info.

Installation prep

Houdini requires a few pieces of software be installed, as well as some optional pieces which make development much easier.

These include:

  • PostgreSQL 12 (10 probably works)
  • NodeJS 14 (we require 14 because we want the full internationalization built-in)
  • Ruby 2.7.3

There a few optional tools which make working on Houdini easier

  • Ruby Version Manager (RVM) - RVM makes it simple to switch between versions of Ruby for different projects. Additionally, you can use different "gemsets" per version so you can separate the state of a set of different projects. It will also switch versions at the console when you change to a directory for an project prepared for RVM, like Houdini.
  • Automatic Version Switching for Node (AVN) - similar to RVM, AVN makes it simple to switch between versions of Node. When properly configured, it automatically switches version at the console whe you change to a directory for a project prepared for AVN, like Houdini.

One-time setup

You'll want to run the next commands as root or via sudo (for Ubuntu 18.04 users or anyone running ProgresSQL 10, change "postgresql-12" below to "postgresql-10"). You could do this by typing sudo /bin/sh running the commands from there.

apt update
apt install curl -yy
curl -sL https://deb.nodesource.com/setup_14.x | bash -
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
apt update
apt install git postgresql-12 libpq-dev libjemalloc-dev libvips42 yarn -yy

You'll run the next commands as your normal user.

Note

: in the case of a production instance, this might be your web server's user.

Note

: We use RVM to have more control over the exact version of Ruby. For development, it's also way easier because you can use a consistent version of Ruby (and different sets of installed gems) for different projects. You could also use rbenv or simply build ruby from source.

Note

: We recommend building Ruby with jemalloc support as we do in these instructions. In practice, it manages memory far more efficiently in Rails-based projects.

Tip: To get out of the root shell, run exit

# add rvm keys
curl -sSL https://rvm.io/mpapis.asc | gpg --import -
curl -sSL https://rvm.io/pkuczynski.asc | gpg --import -
curl -sSL https://get.rvm.io | bash -s stable
source $HOME/.rvm/scripts/rvm
echo 'source "$HOME/.rvm/scripts/rvm"' >> ~/.bashrc
rvm install 2.7.3 --disable-binary --with-jemalloc

Run the following command as the postgres user and then enter your houdini_user password at the prompt.

Note

: For development, Houdini expects the password to be 'password'. This would be terrible for production but for development, it's likely not a huge issue.

Tip: To run this, add sudo -u postgres to the beginning of the following command.

createuser houdini_user -s -d -P

Now that we have all of our prerequisites prepared, we need to get the Houdini code.

git clone https://github.com/HoudiniProject/houdini

This will download the latest Houdini code. Change to the houdini directory and we can set the rest of Houdini up.

Let's run the Houdini project setup and we'll be ready to go! P

bin/setup

Note

: The .env file holds your environment variables for development; on production you might have these set somewhere else other than this file.

Tip: On Heroku, the environment variables are set in your Dashboard.

Also, you should set the STRIPE_API_KEY and STRIPE_API_PUBLIC environment variables which you'd get from the Stripe dashboard. On your development environment, make sure to use test keys. If you don't, you're going to be charged real money!

Testing

To verify everying is set up correctly, you can try running through the test cases:

./bin/rails spec

You should expect to see the output of the test execution, including messages about pending test cases, and eventually get the output to the effect of below:

Finished in 6 minutes 25 seconds (files took 10.35 seconds to load)
2433 examples, 0 failures, 42 pending

Coverage report generated for RSpec to .../houdini/coverage. 10552 / 12716 LOC (82.98%) covered.

The important thing to look for is that the number of failures is zero.

Creating your first nonprofits and user

To create a nonprofit, use the command line to run the following command and fill in the questions with the required information:

bin/rails houdini:nonprofit:create

There are available arguments that add congirugrations on the nonprofit's creation:

  -su, [--super-admin], [--no-super-admin]     # Make the nonprofit admin a super user (they can access any nonprofit's dashboards)
      [--confirm-admin], [--no-confirm-admin]  # Require the nonprofit admin to be confirmed via email
                                               # Default: true

Additionally, it is possible to provide arguments to fill in the fields for the nonprofit creation without coming across the questions:

      [--nonprofit-name=NONPROFIT_NAME]        # Provide the nonprofit's name
      [--state-code=STATE_CODE]                # Provide the nonprofit' state code
      [--city=CITY]                            # Provide the nonprofit's city
      [--nonprofit-website=NONPROFIT_WEBSITE]  # Provide the nonprofit public website
      [--nonprofit-email=NONPROFIT_EMAIL]      # Provide the nonprofit public email
      [--user-name=USER_NAME]                  # Provide the nonprofit's admin's name
      [--user-email=USER_EMAIL]                # Provide the nonprofit's admin's email address (It'll be used for logging in)
      [--user-phone=USER_PHONE]                # [OPTIONAL] Provide the nonprofit's 's phone
      [--user-password=USER_PASSWORD]          # Provide the nonprofit's admin's password

You can use this in the future for creating additional nonprofits.

Startup

bin/rails server You can connect to your server at http://localhost:5000

Super admin

There is a way to set your user as a super_admin. This role lets you access any of the nonprofits on your Houdini instance. Additionally, it gives you access to the super admin control panel to search all supporters and nonprofits, which is located at /admin url.

To create the super user, go to the rails console by calling:

bin/rails console

In the console, run the following:

admin=User.find(1) #or the id of the user you want to add the role
role=Role.create(user:admin,name: "super_admin")

Code Analysis

We use Rubocop to perform static code analysis:

rubocop

Additional documentation

We have some additional documentation describing some implementations, definitions and other guides on the docs folder.

Known Issues

For a list of how to solve known issues

Run in production

You will likely want to make a few changes in your configuration of Houdini before running in production as you would for any Rails project. These include:

  • Use a proper cache store. The development uses memory_store which isn't shared between processes or server and clears every time your server software restarts. Memcached or Redis are good choices here.

Providing the complete corresponding source code

Note: This is not legal advice and provides a suggestion which may be compliant. You should talk with your legal counsel if you have questions or concerns with how to comply with the various licenses of Houdini.

Providing the complete, corresponding source code (CCS) of your project is a requirement of some of the licenses used by Houdini. There are two methods for doing so right now:

  1. Providing a tarball of the current running code
  2. Providing a link to Github where the code is pulled from

The easiest method is to provide a tarball. Houdini automatically provides a link on the Terms & Privacy page which generates a tarball for the current running code at runtime. For this to work though, the following characteristics must be true:

  • Your have to have committed any changes you made to the project in HEAD in your git repository
  • The .git folder for your repository must be a direct subfolder of your $RAILS_ROOT
  • Your web server must be able to run git archive