#Beckton - build groups of paying members
Note: still in development - it is a good idea to get in touch before using for real.
Beckton is a tool for creating a new group of paying members, using the Conditional Commitment design pattern - payments are only taken if a target it met.
Beckton could be used for thigns like setting up a new union branch or a new cooperative purchasing group. It uses GoCardless to create and manage payments and Twillio to send updates.
##Deploy to Heroku
Before you start, you will need to:
- setup an account on GoCardless and get an Access Token
- setup and account on Twillio and get an SID, Auth Token and choose a phone number
- have an account on Heroku (with a payment method setup)
Then, just click this button:
##Local development
This section describes how to get a development copy of Beckton working.
You must have the following things installed before you start
Clone this repository and install the requirements:
git clone git+https://github.com/memespring/beckton.git
cd beckton
virtualenv .
source bin/activate
pip install -r requirements.txt
npm install
To run beckton, you need to run several different things:
To run the web app:
source bin/activate
export SETTINGS='config.DevelopmentConfig'
export GOCARDLESS_ACCESS_TOKEN='ENTER YOUR GO CARDLESS ACCESS TOKEN'
python server.py
Run the scheduler (in a separate terminal):
source bin/activate
export SETTINGS='config.DevelopmentConfig'
celery -A beckton.celery beat
Run the message que (in a separate terminal):
source bin/activate
export SETTINGS='config.DevelopmentConfig'
export GOCARDLESS_ACCESS_TOKEN='ENTER YOUR GO CARDLESS ACCESS TOKEN'
export TWILLIO_SID='ENTER YOUR TWILLIO SID'
export TWILLIO_AUTH_TOKEN='ENTER YOUR TWILLIO AUTH TOKEN'
export TWILLIO_PHONE_NUMBER='ENTER YOUR TWILIO PHONE NUMBER'
celery -A beckton.celery worker
Run the assets compiler (in a separate terminal):
grunt
##Settings
BECKTON_TARGET
The number of people who need to sign up before payments are takenBECKTON_STATEMENT
The statement that people are agreeing to e.g. I will join a tea club if 10 other people do tooBECKTON_TERMS
An additional thing that people confirm e.g. I am a resident of Barking and Dagenham"BECKTON_EXPLANATION
Some words explaining the context of this campaign. this is displaid on the 1st page. Markdown is OK.BECKTON_RATES_LABEL
The label for the radio buttons for choosing which rate to pay e.g. what hours do you work?BECKTON_RATES_CSV
What rate options and prices to display e.g. "4,Part-time (£4 a month)|8,Full-time (£8 a month)"BECKTON_POSTCODE_AREAS_CSV
Limit signups to specific UK postcodes e.g. "SW9,EC1,BR4" Set to False to allow any postcodeBECKTON_SUCCESS
The message to display on the 1st page when the target has been met e.g. "The target has been met - someone will be in touch"BECKTON_DIRECT_DEBIT_CURRENCY
The currency for direct debits (defaults to "GBP")BECKTON_DIRECT_DEBIT_NAME
What the subscription should be called in GoCardless
##Testing
Note: test coverage is currently much lower than it should be.
To run the tests:
source bin/activate
export SETTINGS='config.TestingConfig'
python tests.py
##Resetting the database
python manage.py reset