Really Quick Reviews of All The Tools and Libraries PrettierCI Uses

Bike meets shed

It blows my mind how many useful things exist to accelerate building software products. PrettierCI stands on the shoulders of other services and open-source libraries, and I wanted to give a shoutout to them with a bit of color on my experience with each.

The very day I decided to make a splash page for PrettierCI I saw Launchaco on Product Hunt. There’s a cottage industry of splash page/website builder tools, and I have no idea how the others compare, but using Launchaco was a delight. I was chuffed to bits that the widgets they provided were exactly what I thought the stereotypical SaaS/software site would have:

They get it

It also supports Mailchimp out of the box for email collection. There’s a cottage industry of email collection/marketing stuff too; Mailchimp was fine for me but not as unexpectedly delightful as Launchaco.

Node + Typescript is my go-to toolset for building web apps lately. For years it was Ruby, but types (even if they are sort of faux-types). I considered Go (which we’re building more and more things in at Opendoor), but right now I’m way more proficient with the library and tooling ecosystem of Node, and I wanted to optimize for time rather than leveling up a bit more with Go.

I still use Express, mostly out of habit and proficiency. I started to dig into Koa a bit but there’s enough that I’d have to Google (i.e. “what Koa router do I use? Does X library work for Koa 2?”) that it didn’t make sense for me to pick up before launching. I might switch to Koa in the near future, since I’ve had a few bugs stemming from the lack of real promise support in Express.

I’ve got some thoughts about ORMs. Your abstractions for getting stuff out of a database end up defining so much of your relationship with a codebase — usually for the worse.

After working with Rails for awhile, I’m not big on the active record pattern — it’s too easy to end up with sneaky database calls in views etc which end up bloating performance and make subsystems hard to refactor. For Ruby in particular, lack of types make refactoring that much harder and you’re often totally relying on tests (which probably have various stubs and mocks to boot which will hide some errors). But hey, I digress.

Typeorm is pretty nice because it’s native Typescript and maps the types of the database columns to types in your code. It has a reasonable repository-ish pattern API that separates how you get the data out of the database (“Repositories”) vs. the data itself (subclasses of “Entity”, which are pretty thin wrappers around the row data). In the past I’ve used Knex, which is a bit leaner with no “model”-esque abstractions, just executes queries), but the type support of Typeorm + pretty sane abstractions have made me a convert.

I did miss some of ActiveRecord’s expressive relationship query controls (i.e. “preload these associations”, “join and filter against this relationship”), but after reading some example code and docs I always figured out how to get what I needed out of Typeorm.

I got a working demo of PrettierCI working pretty quickly and it felt great — but it didn’t have a UI, which CI services generally need. In 2018 there’s a plethora of design systems and frameworks to choose from (Material, Blueprint, etc) for folks like me who don’t really need a bespoke visual design.

I hadn’t used Boostrap in awhile, but Bootstrap 4 is so awesome. I was already familiar with flexbox so doing lots of specific flex layouts was intuitive, and the built-in components covered everything I needed. There’s no custom stylesheets to maintain, it’s all Bootstrap for now.

Fun fact — PrettierCI didn’t have a job queueing system for the first week or so after launch. It just kicked off promises during web requests but didn’t block on them. If you’re embarrassed about your first version you waited too long, right?

I ended up using Bull as the job system. I don’t have a great reason for why I didn’t use Kue. Bull got the job done (shoutout to Arena for the UI) but I find myself missing Sidekiq.

Also out of habit, PrettierCI is on Heroku and I loaded up some of my preferred tools with it:

“Hobby” “Free” “Development” 👌👌

It’s just so easy to spin a thing up on Heroku. I have been considering switching to something else (i.e. Zeit or something “serverless”) to cut down on costs. Right now it’s $28/month and it doesn’t feel like it should cost that much to run a product like this at the current (tiny) scale in 2018.

Small shoutout to some of those add-ons I’ve installed — LogDNA has worked well for me in the past, as has Sentry. A lot of these developer tools are part of their own cottage industries that I would hate to compete in, but I’m super happy they can all keep rocking and rolling for little projects like PrettierCI.

I think in 2017 using multiple subdomains in one app/codebase became my favorite party trick, so it continued with PrettierCI (www., app., and some other ones that are a bit sneaky). Nip.io is a pretty nice way of dealing with this locally — I visit app.127.0.0.1.nip.io and www.127.0.0.1.nip.io to test everything and it requires no special logic in the code to deal with local domains. Shoutout to vhost for making it easy to do with Express.

PrettierCI responds to webhooks from Github for most of its features, and Ngrok makes it really simple to run my local code against real Github projects and actions. Since PrettierCI is a Github App, I setup a special “test” app that has a webhook pointing to an ngrok address and everything works.

Chat support has never failed to be valuable for every product I’ve worked on, and I wanted it on PrettierCI. Like splash page makers and email tools, live chat tools are a booming cottage industry; I found Crisp by Googling “free Intercom,” which I assure you says more about me and Intercom than it does about Crisp. I’ve gotten some great feedback from the chat box, so it gets some hearty clap emojis.

The steps of validating my effort in PrettierCI were 1) this Twitter poll 2) collecting ~20 emails from the splash page 3) having a credit-card wall for private repositories. Non-zero folks have entered payment info for PrettierCI “Teams” (or whatever it will be called) which is encouraging.

When I tried to start collecting payments for AskMeEvery in ~2011, Stripe didn’t exist and it was a giant mess that went nowhere. In 2018 Stripe exists and it’s amazingly easy. I spent way more time fiddling with payment info CSS than with the Stripe integration.

My final Bootstrap 4 payment form

I think that’s basically it. I didn’t have much time to build PrettierCI, maybe an hour or so a day, so I wanted to lean on existing tools and my own experience as much as possible. But I ended up learning new stuff anyway (Bootstrap, Typeorm, some other knowledge detours that might come in handy one day).

Engineering @Opendoor

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store