Skip to content

A small and simple Rails 3.2 project that is ready to be used as a prelaunch site. It includes all the necessary requirements like prize groups, open/closed states, and simple social sharing.

License

Notifications You must be signed in to change notification settings

gstratford/prelaunchr

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prelaunchr

Originally open sourced over on our engineering blog, and discussed in great detail over at Tim Ferriss' Blog, Prelaunchr is a skeleton Rails application for quickly starting a viral prelaunch campaign for new companies or products. The campaign is conducive to social sharing and has prize levels based on the number of people each person refers. By default, we've included our original HTML/CSS for both the site and email to give you a better idea of how this looked when actually running.

Mechanics

Prelaunchr has a main mechanic from which everything else is derived: Every User is given a unique referral_code which is how the application knows who referred a signing up user. Based on the amount of referrals a User has brought to the site, they are put into a different "prize group". The groups, amounts, and prizes are completely up to you to set.

IP Blocking

By default, we block more than 2 sign-ups from the same IP address. This was simplistic, but was good enough for us during our campaign. If you want something more substantial take a look at Rack::Attack

Setup

  • Follow the standard Rails 3.2.x setup tasks over at the Rails GitHub, basically bundle install in this directory.
  • Run bundle exec rake db:create db:schema:load db:seed to setup the database
  • Type bundle exec rails s to startup the Rails Server
    • For convenience we have also bundled a Heroku Procfile to use on production. This uses Unicorn for the web server and runs a Delayed::Job worker for sending email.

Teardown

When your prelaunch campaign comes to an end we've included a helpful rake task to help you compile the list of winners into CSV's containing the email addresses and the amount of referrals the user had.

  • Run bundle exec rake prelaunchr:create_winner_csvs and the app will export CSV's in /lib/assets corresponding to each prize group.

Configuration