Coder Social home page Coder Social logo

jonnyiv's Introduction

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

  • Change the default Admin user credentials in /db/seeds.rb
  • Set the different prize levels on the User::REFERRAL_STEPS constant inside /app/models/user.rb
  • Run rake secret to generate a new Rails secret_token and set it in /config/intializers/secret_token.rb (or in the RAILS_SECRET environment variable).
  • The config.ended setting in /config/application.rb decides whether the prelaunch campaign has ended or not (e.g. Active/Inactive). We've included this option so you can quickly close the application and direct users to your newly launched site.

License

The code, documentation, non-branded copy and configuration are released under the MIT license. Any branded assets are included only to illustrate and inspire.

Please change the artwork to use your own brand! Harry's does not give you permission to use our brand or trademarks in your own marketing.

jonnyiv's People

Contributors

danielschwartz avatar

Watchers

James Cloos avatar Artyom Pechyorin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.