/starwavatars

The Force is with these Identicons!

Primary LanguageRubyMIT LicenseMIT

Starwavatars Sample

Starwavatar

Inspired by GitHub Identicons, the Force is strong with these randomly generated graphics.

A New Hope, For Gravatar Fallbacks

Starwavatar is very much a diminutive furry creature of a Rails app, containing only a single route /avatars. You can laser-blast any value to the end of that route and end in either .svg to return a SVG or .png to return a PNG.

## The Original Trilogy of Iconsets

The icons are generated by forcing Jory Raphael’s iconset (used with permission) through random noise generated by an Imperial probe droid, splitting the colours into a Tatooine sunset rainbow and displaying the result.

The Gravatar Awakens

Starwavatar works great as a fallback for displaying an Identicon for folks who don’t have a Gravatar.

A generic Gravatar URL looks like this:

https://secure.gravatar.com/avatar/<md5sum>

But you can pass a default value:

?default=https%3A%2F%2Fpath.to.your.starwavatar.host%2Favatars%2F<md5sum>.png

May the Starwavatar be with you: Deployment

If you set your warp drive co-ordinates to Heroku, just upload this repo and you’re ready to go. If you want to play with the colors generated, everything happens in app/models/starwavatar_avatar.rb using the Paleta gem.

In theory, if you’re all set with Heroku, Rails, bundler and git this should just work:

git clone git@github.com:teamtito/starwavatars.git
cd starwavatars
bundle
heroku create
git push heroku

The app itself shouldn’t require much by way of resources to run, but if you’re going to use it in production, you’re going to want to put it in front of a CDN to make sure that requests for the same asset get cached and delivered from an edge endpoint. We use Fastly and it works great.

The Force is strong in my family

Starwavatar is brought to you by Team Tito, with love and over-zealous fandom.

License

The Starwavatars source code is released under the MIT License.