Tony Messias

January 14, 2024

Running Dockerized Apps with HTTPS Locally

I recently needed to run a dockerized application over HTTPS locally. I use Ubuntu, so I don't have the conveniences of Valet or Herd. But don't sweat; we can combine Traefik and mkcert. Instead of binding each application to local port `:80`, we'll bind a global Traefik container to `:80`, `:443`, and `:8080` (the latter is just where...
Read more
December 21, 2023

Software is supposed to be "soft"

I hear "clean architecture" and immediately think "rigid systems" and "unnecessary abstractions." My current view is that systems are "living things" and there is no "one size fits all" approach. I originally saw this idea (or something similar) in the "Livable Code" talk by Sarah Mei. I do think "the Rails way" is a good start for web...
Read more
December 7, 2023

FormKit's AutoAnimate With Stimulus

I saw FormKit's AutoAnimate lib on Laracasts and had to try it in a Hotwired app. Here's a quick one on how you can use it in your apps too. Installing AutoAnimate First, you need to pull it, I'm using Importmap Laravel so I can pull it using the `pin` command: php artisan importmap:pin @formkit/auto-animate This adds a new entry to th...
Read more
September 22, 2023

Welcome Strada

Strada is finally here! 🥳 🥳 🥳 In summary, we can make our multi-page web apps behave like SPAs with Turbo. With Stimulus, we can sprinkle JavaScript to improve UX in certain areas (Turbo already can do a lot with basic forms + links). Turbo Native turns our web navigation into Native navigation (stacking screens, showing WebView conten...
Read more
September 19, 2023

Bulk Operations With Turbo

Bulk operations are a common UI pattern. I think there are a lot of tricks we can learn from building something like this. It's one of those UIs that we can build 80% of it relatively quickly, but the other 20% might take way more time than the rest. We can get most of it implemented with just HTML. However, to nail the UX and accessib...
Read more
September 9, 2023

Workbench App for Packages

Maintaining an open-source package requires a lot of effort. One problem I see in maintaining Turbo Laravel (and the other packages) is having an easy way to reproduce the reported issues. Suppose the person reporting the issue doesn't know the package internals that well (which is fine). In that case, they can still report the steps t...
Read more
March 26, 2023

Kamal and Laravel (previously MRSK)

Update 09.24.2023: MRSK was renamed to Kamal. I've recorded a video version of this article, which you can find on my YouTube channel. --- The 37signals folks released a new tool for deploying containerized web apps called Kamal. When we think about deploying containerized apps, we might think of Kubernetes, Docker Swarm, Hashicorp's N...
Read more
January 21, 2023

On SaaS and Teams

I tried to explain why I think it's so much simpler to adopt a SaaS boilerplate such as Jetstream instead of rolling your own. I failed. I'm not sure if I did a bad job at explaining or what. Here's another attempt. To me, the best thing about Jetstream is how the teams are set up. People assume that the resources they create in a web ...
Read more
January 20, 2023

Hiding Empty States with CSS

This may be obvious to y'all, but I think it's still worth sharing. Whenever we're building a page, we need to think about its empty state. Sure, your list will look amazing with those icons, shades, typography, avatars... but what about when it's empty? When doing server-side rendering in Blade I used to do something like: <div id="ch...
Read more
July 29, 2022

Stimulus and Laravel

I've been using Stimulus more and more with Turbo since it was made for that. And every time I get myself wanting a simple way to create a Stimulus Controller and register it. I thought of adding a `artisan stimulus:make` command to the Turbo Laravel package, but that would be quite a stretch. That package shouldn't really be concerned...
Read more
July 13, 2022

Rotating Signed Global IDs in Attachments

I was watching the GoRails episode called How To Update ActionText Attachments which deals with the issue that apparently popped up in the Rails 6 to Rails 7 upgrade and it's still undocumented. Looks like the key generator changed from SHA1 to SHA256 in the upgrade, which broke some people's attachments. Here's the discussion about th...
Read more
July 9, 2022

New Install Scripts for Rich Text Laravel, Turbo Laravel, Importmap Laravel, and TailwindCSS Laravel

I had to revisit the install commands on my packages because of the recent change in frontend setup in Laravel (from Mix to Vite), so I thought it would be a cool idea to record a video showing y'all how they are currently working. Here's the link to the video: https://youtu.be/Vq82cO_W8cA You can find the script of the video below, wi...
Read more
June 25, 2022

Laravel Frontend Without Depending on Node

There are many options these days when it comes to bundling assets. In Laravel, we had Laravel Mix, which was a wrapper around webpack, and now we're getting a newer take on this which uses Vue's Vite to bundle our frontend. In a previous blog post I shared two new libraries that allow us to have a frontend setup in Laravel without dep...
Read more
June 25, 2022

Environment-Specific Configs Using PHP8's Match

This is gonna be a short one. I previously shared this as a tweet, but thought it would make a nice little blog post. Recently I had the need of having the configuration of my disks in Laravel (docs). I started tinkering with how I wanted to be able to configure it, then I realized I already had a clean way using PHP8's `match` express...
Read more
February 22, 2022

Globalid Laravel

Polymorphism is a very known concept in programming. To put it simply: it's the idea that many things can play the same role in a system. For instance, think about the Pull Request Reviewer feature on GitHub. You can assign a single team member, multiple, or an entire team as the reviewer. I've blogged about how to make use of the Glob...
Read more
February 2, 2022

Frontend Without Node, NPM, or Webpack in Laravel

I've been following the Rails/Phoenix recent moves to simplify their development workflows and requirements. One interesting thing is that they seem to want to move away from depending so much on Node.js and Webpack for their frontend development. That's interesting! Laravel seems to have a different relationship with frontend tooling....
Read more
October 10, 2021

On Delegated Types

After listening to a recently released interview with DHH in the Maintainable podcast where he shared some of his views on legacy software and how they do it at Basecamp, I realized may have gotten polymorphic associations wrong. Kinda. I've used Polymorphic associations before as a way to apply multiple concerns to a group of entities...
Read more
September 29, 2021

Rich Text Laravel - Introduction

A couple weeks ago I've silently tagged version 1.0.0 of the Rich Text Laravel package and my goal was to ship version 1.0 with some content and tutorials, but my timeline didn't work out. Anyways. I've recorded a video which introduces the package. We're going from the installation steps, to migrating existing data, to implementing a ...
Read more
August 31, 2021

Rich Text Laravel 1.0.0-BETA

Hey, folks. The Rich Text Laravel package is here. After some rewrites and some delay due to another package I needed in order to finish this one, it's time to get it out of development mode. I've been tinkering with this package for a while. I got the idea of building this package when I was watching Chris Oliver's talk at RailsConf 2...
Read more
April 26, 2021

On Wearing Multiple Hats

I find it weird when I hear people saying they act differently whether they are doing programming or going through a code review. As they were wearing different hats and while they are doing that, they act like someone else, with a different mentality. I also find it weird when this analogy is applied to the TDD loop. And it goes as yo...
Read more
April 1, 2021

Turbo Frames, Sidebar Layout, and Details Page

I have been thinking about this problem for a while. There is a page design style that I found hard to replicate in a Hotwire way, but I think I got a good solution. Say you have a sidebar section where you list all notes and the main content section on the right where you render each note. Clicking on a note (or creating a new one) wo...
Read more
March 4, 2021

On Making Software

I've recently joined a technical book club and we are reading a book called "Making Software". I'm only about 20% done with it, but I wanted to test out this new HEY World thing, so I thought I'd give it a shot and write an early review of the book. The book itself is very dense. Very academic. But reeeeallly interesting! Each chapter ...
Read more