Behind the scenes of Lemon Squeezy with Gilbert Pellegrom

Mike McAlister  |  August 18, 2021

I would be surprised if you haven’t heard of Gilbert Pellegrom by now. Even if you haven’t, it’s very likely you’ve heard of or used one of the many products he’s created. That’s because he’s a serial creator and tinkerer, building everything from wildly-popular WordPress products like Nivo Slider, to desktop apps like Splashify, to full-blown SaaS apps like Dunked and Lemon Squeezy.

This guy thrives when building elegant software, and somehow he makes it look… effortless. That’s why I wanted to sit down with Gilbert and pick his brain about single-handedly engineering our Lemon Squeezy app in six months time. 😲

Let’s see what kind of gems we can learn from Gilbert (or as we lovingly call him, Gilbitron 🤖).

What is the tech stack behind Lemon Squeezy? How long did it take to build it out?

Lemon Squeezy is built entirely using Laravel and Vue. I’ve been developing SaaS apps using Laravel for years now and find it to be very capable without being too opinionated. PHP gets a lot of hate but the language has come a long way in the last ten years and Laravel really makes it a joy to work with.

The frontend is built with Vue.js using a new library by Jonathan Reinink called Inertia.js. Inertia is great as it allows us to build our frontend like a modern single page app but without all the complex downsides (e.g. APIs, authentication, routing, etc). Inertia makes frontend dev as easy as building an old-school app using server-side rendered templates.

We decided to host the app using one of Laravel’s own services called Laravel Vapor. Vapor allows us to run Lemon Squeezy in a fully auto-scaled, serverless way offering us all of the power of AWS infrastructure without having to mess about with the AWS console and managing our own servers. The database is also powered by AWS using a serverless Aurora instance.

We also use a bunch of services to power the app, including Stripe, PayPal, and Wise for payments/payouts, Quaderno for tax calculation and remittance, Sentry for error logging, Imgix for serving image assets, and GitHub for code hosting and deployment.

All in, the app took six months to design and build the private beta and another two months to launch to the public.

What was the most difficult feature to build for Lemon Squeezy and why? 

There are several parts of Lemon Squeezy that are large and complex with many moving parts, but probably the most challenging part was the checkout page. Mainly because it has so many different states and integrations all on the same page. Plus, it had to look good, work well and be fast.

For example, we use Stripe Elements to collect card details, we have a PayPal button for PayPal payments and we use Quaderno to calculate tax based on your location as well as handling and validating global tax numbers. The checkout also supports multiple variants, “pay what you want” products, free products, discounts, subscriptions, share settings, embedded checkout… the list goes on.

The mad part is that we’re not even finished with the checkout. There are a lot of features and optimizations we want to add to it down the road.

Were there any big “ah-ha!” moments or helpful tidbits that might be helpful to other developers?

I don’t remember there being a big “ah-ha!” moment as such, but I do think it’s incredible what one designer (Orman) and one engineer (myself) have managed to build in just six months. A few reasons why I think this went so well:

  • Being laser-focused on one thing at a time.
  • Communicating quickly and clearly.
  • Fast decision making.
  • Having a good understanding of what we needed to build.
  • Ruthlessly reducing the scope of the initial product.
  • Being realistic about what we could build in the timescales.
  • Leaning heavily on just a few excellent third-party frameworks, packages and services (e.g. Laravel, Inertia, Stripe, Vapor etc).

What’s one app, tool, service, or library that was critical to successfully launching this thing?

As I’ve mentioned, there were a bunch of great tools we used to build Lemon Squeezy but the one that sticks out to me is Laravel. It provides so many of the fundamental features you need to build a service like Lemon Squeezy (e.g. routing, authentication, authorization, validation, queues, emails, scheduling, caching, ORM, etc.) in a nicely packaged and easy to use way, while still being very flexible and extendible. Not to mention all of the supporting packages and services they provide, like Nova, Vapor, Sail etc.

Taylor Otwell and the team at Laravel have done an incredible job and they deserve the recognition that Laravel is truly one of the best web application frameworks out there.

Follow Gilbert for more tips and tricks

Thanks to Gilbert for sharing his time and invaluable insights with us! It’s exciting to take a look under the hood to see how some of our favorite apps are brought to life.

Follow Gilbert on Twitter where he shares more insights like these, as well as screencasts showing how he built some of the Lemon Squeezy components.

Keep an eye out for more Behind the Scenes posts with our other Lemon Squeezy co-founders!