Apart from my work, on my spare time I like building things that I hope are useful to others. Here I list some of my side projects in random order.
I have been working with APIs since 2014 and the legacy ActiveModelSerializers library is the first ruby gem
I used to serialize my objects. Back then using this library, we could do quite advanced things, even graphql-like
APIs when GraphQL wasn't even announced. Unfortunately, the rewritten ActiveModelSerializers library didn't really
meet my requirements and as it was painstakingly difficult to do some (easy) things.
SimpleAMS is a library for serializing POROs using my taste of things. I tried to make a very clean, flexible
yet powerful API through an inclusion of a single module.
Having worked with APIs so much time, I have seen a recurring pattern:
backend developers create APIs for frontend developers, but they (the backend devs) never use them themselves.
So at times, the API is either plain JSON reflecting the database structure, or if the developer knows what
hypermedia is, the API becomes a super complex thing with hypermedia embedded all over the place by default.
Introspected REST tries to solve this problem by first analyzing where REST fails (spoiler: it treats everything, data and hypermedia,
as a simple entity increasing complexity) and suggests a new model that separates the concerns of the actual API plain data and API metadata.
The API metadata include hypermedia related data like links, forms etc and can be either runtime or static.
It's published as an open publication.
After having worked so many years with Rails and APIs I went on and created a top notch API tutorial for Rails.
It shows you how you can extend your Rails app and build an API without changing a single line of
code from your existing app (i.e. API part is completely separate from the app part).
It uses Michael Hartl's Rails tutorial
which is a classic Rails app and extend it by building an API on top of it.
It's performance analyzer for Ruby classes. Just include it in the bottom of your class and let it analyze your Ruby class performance. Motivation and detailed explanation can be found in this blog post.
Again an HTTP API related library that allows you to load test your app. It has a very simple but extremely powerful (mostly due to http.rb gem) interface that makes it extremely easy to run various scenarios (like submitting data coming from FactoryBot factories).
Simple ruby gem that allows you to transform a json input into an ActiveRelation. Ideal for APIs :)
Drop in cache strategies for ActiveRecord, similar to Shopify's identity_cache, but without support for relations. However, it uses Redis by default instead of Memcached.