Skip to content

PurposeOpen/Movement

Repository files navigation

'Movement' is a movement template site that works with the Purpose Platform. You are free to use and modify it to suit your organization! It is released under the MIT license.

It uses the Porpoise gem, which provides the API binding to the Platform as well as controllers, models, views, and assets that can be over-ridden in the movement site.

Getting Started

Run the Purpose Platform locally. Instructions are here.

Fork this repository (PurposeOpen/Movement), clone locally and navigate to the 'Movement' folder that was created, and set the following environment variables (assuming you created a movement on the Platform named 'Demo Movement'):

MOVEMENT_ID=demo-movement
MOVEMENT_NAME='Demo Movement'
PLATFORM_BASE_URI=http://localhost:5000/api/
ENABLE_ACTIVITY_FEED=true

If you want to try out the PayPal donation feature, create a sandbox account at developer.paypal.com, and set the following environment variables:

PAYPAL_501C3_API_LOGIN
PAYPAL_501C3_API_PASSWORD
PAYPAL_501C3_API_SIGNATURE
PAYPAL_501C4_API_LOGIN
PAYPAL_501C4_API_PASSWORD
PAYPAL_501C4_API_SIGNATURE

501C3 and 501C4 are two types of non-profit organizations in the US that have different tax requirements. When creating a donation page in the Purpose Platform, you can select whether the donation goes toward 501C3 or 501C4 activity. The environment variables above allow you to specify an account that will receive each type of donation.

Detailed environment variable documentation is available here.

To start the movement site run:
rails s

Running in Production

Modify public/robots.txt to allow spiders to crawl your site. It currently bans all spiders.

Donations are set to run in test mode in all environments by default (in config/initializers/active_merchant.rb). To accept real donations, after setting the PayPal environment variables with non-sandbox PayPal credentials, set the following in your production environment:
ActiveMerchant::Billing::Base.mode = :production

The SECRET_TOKEN environment variable is required when running in production. See config/initializers/secret_token.rb. A new token can be created by running:
rake secret

Community

Image Attribution