Sinatra is a Ruby framework that helps you quickly create web applications, APIs and microservices. Its minimalism not only attracted a lot of developers, but it has also inspired Flask in Python and Express in Node.js

Almost a decade ago, I used Sinatra to build pincodr, schedulr, webhooks and mudra. They had gotten stale because I didn’t update them to latest stack.

This year, I decided to reboot pincodr. I spent time finding the right stack, tried building it in Phoenix/Elixir and Pliny in Ruby. However, in the end, I decided to stick to Sinatra, because I wanted to avoid rewrite and realized it was still a good choice.

Upgrading Sinatra and other packages was an easy process, however, I found myself struggling setting up production infra. It took me 3-4 days, just to sort out my deployment process as well as setting up the server. To save time for my next projects and to possibly help others, this weekend I spent some time extracting it as a bolierplate project called Scoop.

Scoop uses

  1. Corneal to make scaffolding models, controllers and views easier
  2. ActiveRecord as database ORM
  3. Capistrano for deployment
  4. Puma as app server
  5. Nginx as a proxy server

In addition,

  1. it is also JSON API ready with JSON, CORS and JSONP support already enabled,
  2. has a rails like console, and
  3. comes up with example script and rake task that can be used to perform tasks that load the environment

You can start using Scoop by forking this repository. Scoop’s README has detailed steps to set up development and production systems as well as the deployment process.

Do give Sinatra & Scoop a try.