SumOfUs / Champaign

SumOfUs Online Campaign Platform.
MIT License
49 stars 21 forks source link

Reuse & Contribution #969

Open bmenant opened 7 years ago

bmenant commented 7 years ago

Hi there,

Benjamin here from Agir pour l’Environnement (French NGO). We’re looking for a new campaigning software. Since you’ve open-sourced Champaign, I was wondering if there were any intend to really open the project to external contributions and reuses? Or was it a step for transparency at the first place?

From the outside, Champlain looks great! But it’s hard to guess what it actually does. From a NGO perspective, it’s hard to tell whether it’d fit its own needs or not.

So far, the project looks pretty tight to SOU needs and means, doesn’t it? Also, there’s not much documentation available. As a matter of fact, I haven’t succeeded in my efforts to properly install the software on a Docker machine.

I guess some work has to be done to make contributions and adoptions easier. Is this something you’re interested in? If so, can we give a hand, in any manner?

vincemtnz commented 7 years ago

Hey @bmenant! We're definitely open to external contributions. It'd be great to see Champaign adopted by other organisations and seeing it mature as a product. So far there has been interest shown from other progressive organisations in using Champaign, but nothing that materialised, so SOU are the only ones using – and developing – Champaign at the moment, so your point that the project is pretty tight to SOU needs is partly (or should I say mostly?) true.

You're right in pointing out that it's hard to guess what Champaign actually does! Perhaps as a result us using it internally and not having external collaboration or a community around Champaign, we've been sloppy with documentation.

A bit of an intro... Champaign is a tool that enables campaigners to create campaigns (hope I'm not sounding silly!), so for example campaigners can create petitions, fundraisers, surveys, etc (I've used a few examples from our site). For fundraisers, we currently integrate with Braintree for PayPal and card payments, and GoCardless for direct debit. We've tried to make it quite modular so you don't necessarily need to use all features. We also integrate quite well with ActionKit which is what our campaigners use for email campaigns.

Champaign also supports creating custom (and reusable) templates. The Upstanders website is a good example of a fundraiser page with a custom template 👌 .

If you're interested in getting it up and running, let us know and we can probably help you getting it up and running / deploying it.

bmenant commented 7 years ago

Thanks @eyko!

As I said (or not), our own legacy tool is getting older (high technical dept and software entropy). We’re looking forward to change. Should we join in an existing project or rebuild our own system? That is the question. I must carefully inspect features Champaign provides that our legacy tool doesn’t and what would have to be done to catch our legacy tool up.

So, sure, I’d love giving it a try! 😉

So far, I’ve tried to follow the Docker instructions... but it didn’t turn out very well. I tried to do the things step by step on a naked Debian VM, but it didn’t work out well either.


Ok, let’s start over and document the process step by step, following the afore mentioned instructions.

N.B. ⚠️ signs mark any step the instructions are missing out, or whenever I’m having trouble.

Host information and Docker version

$ uname -sr
Linux 4.9.0-3-amd64

$ docker --version
Docker version 17.03.1-ce, build c6d412e

$ docker-compose --version
docker-compose version 1.13.0, build 1719ceb

Setting up the project

I assume the first 5 steps aren’t relevant to Linux hosts, where Docker runs natively. I’ll jump ahead to the 6th step. By the way, I guess Docker Machine would come in handy over here.

- [x] `docker-compose build`
- [ ] `config/secrets.yml` is already there... ⚠️ 
- [x] `cp config/env.template.yml env.yml`
- [x] Edit `env.yml` I guess we’re talking about `config/env.yml`... ⚠️ 

PG_USERNAME: postgres PG_PASSWORD: secretpwd PG_HOST: db PG_POST: 5432

- [x] Fix `config/database.yml` since PostgreSQL isn’t running on localhost. ⚠️ 
```diff
diff --git a/config/database.yml b/config/database.yml
index aa0bb318..d4d56b21 100644
--- a/config/database.yml
+++ b/config/database.yml
@@ -21,7 +21,7 @@ development: &default
   pool: 5
   username: <%= ENV['PG_USERNAME'] %>
   password: <%= ENV['PG_PASSWORD'] %>
-  host: localhost
+  host: <%= ENV['PG_HOST'] %>
   port: <%= ENV['PG_PORT'] %>

Automated Tests

+# Install all npm packages if CI=false. Install production packages if CI=true +RUN if [ $CI = false ]; then yarn install; fi +RUN if [ $CI = true ]; then yarn install --production; fi +

- [x] `docker-build` & cie...
- [x] `docker-compose run web rspec spec` completed: 🎉 

2760 examples, 0 failures, 54 pending

Randomized with seed 56941


Let’s try it out
---------

- [x] `docker-compose up`
- [ ] Check that it works:

$ curl -I localhost:3000 HTTP/1.1 302 Found X-Frame-Options: SAMEORIGIN X-XSS-Protection: 1; mode=block X-Content-Type-Options: nosniff Location: http://example.com Content-Type: text/html; charset=utf-8 Cache-Control: no-cache X-Request-Id: 7ac3e030-7933-47e6-8c5c-01b2b9783bf3 X-Runtime: 0.008558 Vary: Origin

The server outputs:

web_1 | I, [2017-06-29T14:28:01.117956 #7] INFO -- : Redirected to http://example.com web_1 | I, [2017-06-29T14:28:01.118053 #7] INFO -- : Completed 302 Found in 4ms (ActiveRecord: 0.3ms)

Which sounds like it works, but like I forgot to edit a couple of settings somewhere...
- [x] Change `example.com` for `localhost:3000` in `config/settings/development.local.yml`... ⚠️ 
```diff
diff a/config/settings/development.yml b/config/settings/development.local.yml
--- a/config/settings/development.yml
+++ b/config/settings/development.yml
@@ -79,16 +80,16 @@ robots: 'staging'
 instantiate_stdout_logger: true

 # Defines domain for page URLs
-host: 'http://actions.example.com'
+host: 'http://localhost:3000'

-home_page_url: 'http://example.com'
+home_page_url: 'http://localhost:3000'
 default_mailer_address: 'info@example.org'
 smtp:
   user_name: 'smtp username'
   password: 'smtp password'

 members:
-  dashboard_url: 'http://example.com'
+  dashboard_url: 'http://localhost:3000'

Voilà ! 😄

rodrei commented 7 years ago

Hey @bmenant! Thanks so much for this!

As you noticed, the README is quite outdated. Tomorrow morning I'll spend some time on it and try to get the app running from scratch as you did, and I'll update the README accordingly.

I'll take a look at your notes more in depth tomorrow, but I can answer some of your points now:

I gotta run now, but I'll be working on the README tomorrow. Let me know if you were able to make any progress. Cheers!

rodrei commented 7 years ago

Hey @bmenant, if you'd like to join us on slack we can discuss this and help you get started too.

https://join.slack.com/champaign-core/shared_invite/MjA1NzU5MDg1NTg2LTE0OTg3NTcxNDYtNDU0Mjg3ZjQ1ZQ

bmenant commented 7 years ago

Thanks so much for helping me out @rodrei!

Indeed, I was so close!

Thanks for the Slack invitation. I won’t be there tomorrow. See you next week.

rodrei commented 7 years ago

Hey @bmenant! AK should be optional, but it seems that slipped through the cracks, I'll push a fix for that and let you know.