Skip to content

westonganger/rails_scrabble_with_friends

Repository files navigation

Rails Scrabble With Friends

CI Status

Simple web-based scrabble for you and your friends with zero friction authentication.

Features:

  • Zero friction authentication
  • Fully usable on Mobile and Desktop
  • Does not attempt to validate or spellcheck any words for you. You are provided a simple search input which links to a dictionary.

Screenshots

Screenshot: Desktop Screenshot: Mobile

Screenshot: Sign In

Screenshot: Start New Game

Screenshot: Find or create game

Screenshot: Waiting to Start Game

Demo / Play

Demo or play at https://scrabble.westonganger.com

How Authentication Works

Authentication is designed to be zero friction and works as follows:

  1. User chooses any username
  2. Username is stored in session
  3. User can then create or join any game given a Game ID or Game Name

Setup

Developed as a Rails engine. So you can add to any existing app or create a brand new app with the functionality.

First add the gem to your Gemfile

### Gemfile
gem "scrabble_with_friends", git: "https://github.com/westonganger/scrabble_with_friends.git"

Then install and run the database migrations

bundle install
bundle exec rake scrabble_with_friends:install:migrations
bundle exec rake db:migrate

Option A: Mount as a subdomain

### config/routes.rb

scrabble_with_friends_subdomain = "scrabble_with_friends"

mount ScrabbleWithFriends::Engine,
  at: "/", as: "scrabble_with_friends",
  constraints: Proc.new{|request| request.subdomain == scrabble_with_friends_subdomain }

not_engine = Proc.new{|request| request.subdomain != scrabble_with_friends_subdomain }

constraints not_engine do
  # your app routes here...
end

Option B: Mount to a path

### config/routes.rb

### As sub-path
mount ScrabbleWithFriends::Engine, at: "/scrabble_with_friends", as: "scrabble_with_friends"

### OR as root-path
mount ScrabbleWithFriends::Engine, at: "/", as: "scrabble_with_friends"

Development

Run migrations using: rails db:migrate

Run server using: bin/dev or rails s

Testing

bundle exec rspec

We can locally test different versions of Rails using ENV['RAILS_VERSION']

export RAILS_VERSION=7.0
bundle install
bundle exec rspec

Credits

Created & Maintained by Weston Ganger - @westonganger

About

Simple web-based scrabble for you and your friends with zero friction authentication

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published