Project

early_bird

0.0
No release in over a year
EarlyBird provides simple waitlist functionality to WIP Rails apps
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

~> 7.0, >= 7.0.8
 Project Readme

EarlyBird

A very simple Gem to add waitlist functionality to a WIP Rails app.

Future Features

I plan to add automated invite codes in the near future

Usage

Follow the installation instructions and you're good to go!

Installation

Add this line to your application's Gemfile:

gem "early_bird"

And then execute:

$ bundle

Or install it yourself as:

$ gem install early_bird

Then install the migrations:

$ bin/rails early_bird:install:migrations

And migrate the database:

$ bin/rails db:migrate

EarlyBird requires new and show views to be implemented in your app:

# app/views/early_bird/submissions/new.html.erb
<%= form_with(model: @submission) do |form| %>
  <%= form.email_field :email, placeholder: "Your email" %>
  <%= form.submit "Join the Waitlist" %>
<% end %>
# app/views/early_bird/submissions/show.html.erb
<p>Thank you! <%= @submission.email %> has been added to the waitlist!</p>

Then mount the engine in your routes.rb file:

mount EarlyBird::Engine => "/"

In your application_controller.rb file, define an authenticate_user! method, which EarlyBird skips (to allow access to the waitlist while preventing access to the rest of the app):

class ApplicationController < ActionController::Base
  before_action :authenticate_user!

  private 

  def authenticate_user!
    http_basic_authenticate_with name: "dev", password: "secret"
  end
end

Contributing

Contributions welcome

License

The gem is available as open source under the terms of the MIT License.