Railyard – An Open-Source Tool to Setup New Projects

As software engineers, we love solving problems, especially challenging ones but we also often dislike doing simple, boilerplate, or repetitive tasks, especially if we’ve done them before. Setting up the initial boilerplate of a new application is a critical part of the custom software development lifecycle but it often delays getting to the meat of the application:

  • What does the application actually do?
  • What are we trying to solve?
  • Why does anyone care?
  • Have we validated our assumptions?

In an agile iterative process, it is important to get the pencil to paper sooner rather than later and Railyard helps us do that by eliminating much of the initial dependency and boilerplate setup on new projects. The project is an open-source internal tool made freely available for others to use and contribute to on Github (https://github.com/teamairship/railyard).

Railyard logo

Instead of integrating Devise, another CI/CD pipeline, or a testing strategy again, Railyard provides a framework to script common installation and initialization workflows. We’ve already built in many common gems and design patterns as options that can be chosen on project initialization through an extendable command-line interface built with Thor.

Simply running the command below generates a full production-ready application framework ready to deploy to Heroku.

“./bin/railyard create ../app-name”

When you enter the command above you are presented with two main core concepts: Blueprints and Templates.

Blueprints are dependency specific and offered as a la carte options while Templates are meant to encompass entire pre-configured distinct applications. For example, installing Devise would be the duty of a single Blueprint whereas creating a fully configured e-commerce solution would be the role of a Template. The idea is to give the developer a good starting point whether they are using a collection of Blueprints or a single Template.

When running the Railyard command you will be presented with two paths, either the Blueprint or Template path.

If the Template option is chosen, then the Blueprints workflow will be skipped and you will be presented with Template options. Currently, we just have one example Template as a placeholder but will be building more out over the coming months.

If you answer no to the Template question then you will be dumped into the Blueprint workflow which allows you to choose dependencies one by one:

As you can see in the sample above, any combination of Blueprints can be chosen to scaffold the desired application. Currently, we have the following Blueprints included in the repo:

  • Tailwind
  • Devise
  • GraphQl
  • ESLint / Prettier
  • Letter Opener
  • Pundit
  • Simple Form
  • Rspec / Unit Test

While we’ve started with these, this is only a first step and you should expect that these Blueprints will evolve and more will be added over time.

But don’t wait for us! Developers can clone the repo, create a branch and create their own Blueprints and Templates since the project is open source. We did just that with some recent downtime at Airship. It’s hard to schedule engagements back to back in a custom software development shop and there will inevitably be some downtime to consider between projects. Utilizing this time to add functionality to our internal tooling gives us a few things:

  • A ramp-up and learning opportunity for developers.
  • A stronger starting point for upcoming projects.
  • Standardization so code bases look similar across projects.
  • A way to contribute to and benefit from the open-source community.
  • A marketing tool and hook for conversations with clients.

As you can see, investing in Railyard is also investing in growth opportunities, our team, and our process which makes our developers better and more equipped for future engagements. This along with culture is very important at Airship and the company is constantly looking for ways to invest back into the team, the process, and clients; Railyard is just one example of this. Another similar effort that focuses on mobile is a project called Airfoil, but more on that another day!

Ready to get started?