• This repository has been archived on 21/Mar/2019
  • Stars
    star
    889
  • Rank 51,338 (Top 2 %)
  • Language
    Ruby
  • License
    MIT License
  • Created over 10 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A small and simple Rails 4 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.

Prelaunchr

Archived

Warning: This project is unmaintained and has dependencies with known security vulnerabilities.

Six years after our own viral pre-launch campaign, and having enabled many other teams to start with a splash, it is time to retire the Prelaunchr project. We have taken the step of archiving Prelaunchr - it has been hard to update vulnerable dependencies of a project that we haven't used since 2013! You are welcome to fork the project, but we recommend updating all dependencies to recent versions and enabling Github's security scans.

We will not be updating the project or responding to issues or PRs. Good luck with your launches and beyond.

β€” Harry's Engineering Team

Build Status

About

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

Developer Setup

Get Ruby 2.5.0 (rbenv), bundle and install:

brew update && brew upgrade ruby-build && rbenv install 2.5.0

Clone the repo and enter the folder (commands not shown).

Install Bundler, Foreman and Mailcatcher then Bundle:

gem install bundler foreman mailcatcher
bundle

Copy the local database.yml file sample and .env.sample:

cp config/database.yml.sample config/database.yml
cp .env.sample .env

Update your newly created .env file with the needed configuration DEFAULT_MAILER_HOST: sets the action mailer default host as seen in config/environment/.rb. You will minimally need this in production. SECRET_KEY_BASE: sets a secret key to be used by config/initializers/devise.rb

Setup your local database:

bundle exec rake db:create
bundle exec rake db:migrate

Start local server and mail worker:

foreman start -f Procfile.dev

View your website at the port default http://localhost:5000/. View sent mails at http://localhost:1080/.

To create an admin account

In Rails console, run this command. Be careful to not use the example admin user for security reasons. Password confirmation should match password.

AdminUser.create!(:email => '[email protected]', :password => 'password', :password_confirmation => 'passwordconfirmaiton')

You can run this locally in a Rails console for development testing.

If you are deployed to Heroku, you would run it there.

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

  • Set the different prize levels on the User::REFERRAL_STEPS constant inside /app/models/user.rb
  • 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.

More Repositories

1

dynosaur

An auto-scaling engine for Heroku web dynos using pluggable API connections.
Ruby
167
star
2

kontrast

A tool for monitoring visual changes in web applications, designed for us in a continuous integration flow.
Ruby
54
star
3

arthur-redshift-etl

ELT Code for your Data Warehouse
Python
25
star
4

cronut

[DEPRECATED] A dead man's switch server implementation in Rails. (We @harrystech have moved to a full-featured "job monitoring as a service" vendors and have retired Cronut.)
Ruby
24
star
5

dynosaur-rails

[Deprecated] Web interface for https://github.com/harrystech/dynosaur
Ruby
11
star
6

notebook-server

Infrastructure code to run notebooks on some EC2 nodes
Shell
10
star
7

rails-pipeline

Data Pipeline for distributed collection of Rails applications
Ruby
9
star
8

split_cacheable

An extension to Split to allow for automatic cache bucket creation accross Split tests.
Ruby
9
star
9

pixlee-ruby

A simple wrapper for the Pixlee API
Ruby
5
star
10

tap-gladly

Tap for gladly following singer spec, built with Meltano SDK
Python
3
star
11

ping-me-maybe

Ruby
2
star
12

scala-jooq-tables

Library for interacting with jooq tables in a friendlier DSL
Scala
2
star
13

bi_tooling

Tooling to support our BI application (in Looker)
Python
2
star
14

arthur-tools

Tools used for arthur-redshift-etl that are generally useful
Python
2
star
15

twitter-ua

Google Universal Analytics for Twitter
Ruby
1
star
16

merchant_e_solutions

Merchant e-Solutions Reports
Ruby
1
star
17

TryBeforeYouBuy

Mini iOS augmented reality app that lets users virtually shave with one of our razors.
Swift
1
star