Skip to content

NationBuilder is a Ruby on Rails application for running adhocracies online by loosely connecting people based on their priorities.

Notifications You must be signed in to change notification settings

elisehuard/nationbuilder

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fork for Belgian experiment

The main difference is that Belgium is multilingual.
current maintainer: Elise Huard


NationBuilder is a radical and fun new way to run your country, state, city, neighborhood, corporation or non-profit completely democratically with thousands of people over the internet.

This project started as White House 2, but it’s now expanding into NationBuilder so anyone can use it to run a democracy. You can also see it in action at Parliament 2 and Australia 2.

My blog has a bit more on the goals, and we’re using NationBuilder to set the priorities for the NationBuilder software at Feedback Nation.

NationBuilder is coded with Ruby on Rails 2.3.2, and released under the MIT License, the same as Ruby on Rails.

Jim Gilliam
http://www.jimgilliam.com/
http://twitter.com/jgilliam


Installation instructions for Heroku

Heroku is a unique and very easy to use hosting platform designed specifically for Ruby applications. This is the easiest way to get started.

Create a Heroku account: http://heroku.com/signup

Install the Heroku gem:

sudo gem install heroku

Clone a copy of NationBuilder on your local machine.

git clone git://github.com/jgilliam/nationbuilder.git
cd nationbuilder

Decide the URL you want. At first, your site will live at SITE_NAME.heroku.com. So just decide what you want your SITE_NAME to be and replace that throughout these install instructions. If you have your own domain you want to use, that comes soon.

heroku create SITE_NAME
git push heroku master

You should get an error now from heroku “App crashed during startup, see the crashlog.” This just means we need to load the database.

heroku rake db:schema:load

If you don’t have your own domain yet, you can skip this step. For your own domain, create a CNAME in your DNS settings that points to “proxy.heroku.com”. Once that’s in, run this:

heroku addons:add custom_domains
heroku domains:add YOUR_DOMAIN_NAME
heroku config:add DOMAIN='YOUR_DOMAIN_NAME'

If you AREN’T using your own domain, then just run this:

heroku config:add DOMAIN='SITE_NAME.heroku.com'

Now add a few addons. Memcached provides caching, and Sendgrid is a third party email service that allows you to send emails from a cloud computing service like Heroku.

heroku addons:add memcached
heroku addons:add cron:daily
heroku addons:add sendgrid

You need an Amazon S3 account to store graphics, get that here.

heroku config:add S3_KEY='YOUR ACCESS KEY'
heroku config:add S3_SECRET='YOUR SECRET ACCESS KEY'
heroku config:add S3_BUCKET='BUCKET IDENTIFIER'

NationBuilder makes extensive use of the DelayedJob plugin, which costs 0.05$/hour on heroku for one job queue. You can still get up and running and play around without installing DelayedJob, but the rankings will never update and a few features will not work. To install DelayedJob just do this:

heroku workers 1
heroku rake jobs:enqueue

Now go to http://SITE_NAME.heroku.com

The first screen will ask you for a few basic things about your nation, and help you create an admin account. Once you’re through with that, you’ll be ready to go. There are a lot more settings under Settings > Nation Settings. Colors, email templates, etc.

To enable Facebook integration:

Go to the Facebook developer application and create a new application. Under “Connect” options, be sure to put the domain you are using. Get the API key and secret key and add it to heroku like this:

heroku config:add FACEBOOK_API_KEY='YOUR API KEY'
heroku config:add FACEBOOK_SECRET_KEY='YOUR SECRET KEY'
heroku rake facebook:register_templates

To enable Twitter integration, you need to get your API keys here.

heroku config:add TWITTER_KEY='YOUR API KEY'
heroku config:add TWITTER_SECRET_KEY='YOUR SECRET KEY'

Note: heroku console action might be needed if government was already created:


>> g.twitter_key='XXXXYYYYY'
=> "XXXXYYYYY"
>> g.twitter_secret_key='BBBBBBBBBCCCCCCCCC'
=> "BBBBBBBBBCCCCCCCCC"
>> g.has_twitter_enabled?
=> true
>> g.save

For Yahoo mail and Windows Live contact importing, you set the API keys under Settings > Nation Settings > API Keys

To enable search:

You need to set up a Solr server. There are details on this in the Heroku docs. Once you have the URL for your Solr server, you can add it to your app like this:

heroku config:add WEBSOLR_URL='http://urlofyoursolrserver/solr'
heroku restart
heroku rake solr:reindex

Heroku is planning to have a better way of using Solr soon.

About

NationBuilder is a Ruby on Rails application for running adhocracies online by loosely connecting people based on their priorities.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 79.8%
  • JavaScript 20.2%