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
2020-06-02 17:13:05 -05:00
app Remove unneeded profile picture assign 2020-06-02 17:12:53 -05:00
bin bin/setup now installs JS, copies .env and creates secrets 2020-06-02 17:12:06 -05:00
client/css/global Remove old client js 2020-05-27 12:30:04 -05:00
config Fix merge bug in English locale info 2020-06-02 11:12:00 -05:00
db Remove picture column from profile 2020-06-02 17:01:46 -05:00
docker Removal of the codegen 2020-04-23 14:09:58 -05:00
docs Move Docker set up to its own file 2020-05-27 17:31:36 -05:00
gems Remove picture column from profile 2020-06-02 17:01:46 -05:00
lib Update Campaign creation to use jbuilder 2020-05-27 12:32:32 -05:00
public Move widget css into a controller so it's updateable 2020-04-23 14:09:56 -05:00
script Correct the script for restoring a database from a pg_dump 2020-05-04 11:47:16 -05:00
spec Fix typo in name of test 2020-05-27 12:42:21 -05:00
types Add Active Storage types 2020-05-27 12:32:31 -05:00
.bootstraprc Everything works except fonts 2020-04-23 14:09:56 -05:00
.browserslistrc Add webpacker 2020-04-23 13:44:17 -05:00
.buildpacks Initial commit. Previous history maintained by CommitChange 2018-03-25 13:30:42 -04:00
.dockerignore Include qx into the repo 2019-01-09 17:57:35 -06:00
.env.template Update README.md for Rails v6 2020-06-02 17:13:05 -05:00
.env.test Working .travis.yml 2018-11-12 16:46:17 -06:00
.eslintrc.js Relicense Javascript code in accordance with project's new license 2018-03-25 15:10:40 -04:00
.gitignore ignore the ActiveStorage file storage directory 2020-05-27 12:32:31 -05:00
.jshintrc Initial commit. Previous history maintained by CommitChange 2018-03-25 13:30:42 -04:00
.nvmrc Add .nvmrc so nvm just works 2019-11-27 16:15:27 -06:00
.rspec Add the rails helper to .rspec 2019-11-08 16:13:03 -06:00
.rspec_parallel Add support for parallel_tests 2020-04-16 14:17:57 -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.6.6 2020-04-16 13:50:52 -05:00
.travis.yml Working .travis.yml 2018-11-12 16:46:17 -06: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 Update to Webpacker 5.1.1 2020-05-27 17:05:25 -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 style(format): run rubocop format autocorrect 2019-08-02 19:07:29 +02:00
dc fix docker name so it works consistently 2019-03-06 08:58:20 -05:00
Gemfile Migrate from imagemagick to vips for image transformation 2020-05-29 16:54:53 -05:00
Gemfile.lock Migrate from imagemagick to vips for image transformation 2020-05-29 16:54:53 -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
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 Fix typo of word Houdini in LICENSE file 2018-05-29 15:22:02 -05:00
package.json Update to Webpacker 5.1.1 2020-05-27 17:05:25 -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
Rakefile style(format): run rubocop format autocorrect 2019-08-02 19:07:29 +02:00
README.md Update README.md for Rails v6 2020-06-02 17:13:05 -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
tslint.json Add a tslint config 2019-02-14 14:25:22 -06:00
Web-Template-Output-Additional-Permission.txt Paragraph reformat only; no textual change. 2018-03-25 15:48:15 -04:00
yarn.lock Update to Webpacker 5.1.1 2020-05-27 17:05:25 -05:00

Build Status

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

Much of the business logic is in /lib.

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 backend code and React components should be TDD.

Prerequisites

Houdini is designed and tested to run with the following:

  • Ruby 2.6
  • Node 12
  • Yarn
  • PostgreSQL 11
  • Ubuntu 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

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
  • NodeJS 12 LTS
  • Ruby 2.6.2 (NOTE: the default of Ruby 2.7.1 in Debian will likely function but you will receive a ton of deprecation warnings from Ruby)
  • RVM (optional, simplifies managing multiple ruby versions)

One-time setup

You'll want to run the next commands as root or via sudo. You could do this by typing sudo /bin/sh running the commands from there.

TIP: this is the root shell. There's no restrictions on what you do here so be careful!

apt update
apt install curl -yy
curl -sL https://deb.nodesource.com/setup_12.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 2: 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 3: We don't recommend using Ruby 2.7, the current Ubuntu default at this time. Ruby 2.7 will function but spits out tons of deprecation warnings when using Rails applications.

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.6.6 --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!

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!

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:

./dc run web 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")

Known Issues

For a list of how to solve known issues

To run in production

Docker

While Docker should be very possible to use for production, the current Docker solution is optimized heavily for dev purposes. If you know more about creating a solid production Docker setup, please do contribute!

(To be continued)

  • rake assets:precompile
  • if production: make sure memcached is running.

Frontend

Assets get compiled from /client to /public/client

React Generators

If creating new React or Typescript code, please use the Rails generators with the 'react:' prefix. This include:

react:packroot

This generator creates a new entry for Webpack. This is a place where Webpack will start when packing a new javascript output file. It also creates a corresponding component for the entry. Usually, you will have one of these per page.

react:component

This generator creates a React component along with a test file for testing with Jest. Each component should have its own file.

react:lib

This generator creates a basic Typescript module along with a test file.

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.

Style

Ruby

  • 2 spaces for tabs

New frontend code

  • All new front end code should be written in Typescript and React (using TSX files). Please use the React Generators for creation.
  • 2 spaces for tabs

Legacy Javascript

  • 2 spaces for tabs
  • Comma-led lines
  • ES6 imports

Git

  • No need to rebase, just merge