DEV Community

Cover image for Update: typescript backend is in the bin.
Pete Hawkins for Nine

Posted on

Update: typescript backend is in the bin.

It’s been almost a year since I last wrote about Nines tech choices. I wanted to give a brief update on what’s changed and what’s stayed.

Here to stay 👍

GraphQL

This was the one piece of the puzzle I liked the most from building Nine. Since the frontend is a static Next.js app using typescript, GraphQL pairs perfectly and having all the data and mutations in the frontend static typed is awesome!

Next.js/vercel

The frontend for Nine being static is really important and has been a great experience.

There is one niggle that I need to sort out at the moment though, the frontend deploy is getting slow. We’re currently building several thousand static pages, what’s worse though, it’s growing as we get more stores online.

What’s gone 👎

Bye bye node

As you might tell from the title of this post, the backend API written in node and typescript is gone.

I am still a Rails developer and I haven’t found anything that gives me the same programmer happiness or productivity than Rails.

I’ve recently deployed a rewrite of the GraphQL API and store manager in Rails. I’m much happier about the stability and maintainability of this stack, especially for side projects where you don’t want them falling over.

This was spurred on by running into issues with bullmq falling over with no apparent reasons. The interactive repl for running database commands wasn’t up to scratch with what I’m used to with Ruby, holding me back from debugging issues. And just me generally not spending enough time on this stack to feel confident managing it.

What’s new ✨

Hotwire. This is something I’ve been tinkering with for quite some time and I must say I am extremely impressed.

In short, you write minimal JS, but can still building highly interactive applications, relying on Rails server-side rendering and the Turbo framework.

The store manager for Nine has lots of modals and replaces the previous React app will full feature parity, with a mere 6 stimulus controllers that are all very generic and reusable 🤯.

I’ll definitely have a few follow up posts on Hotwire, I’ve been building Happi using it and I’ve recently taken a contract role as a Rails engineer at Polywork where it’s also the tech stack of choice.


I never learn my lesson, nearly every time I have strayed away from Ruby / Rails in the past 5 years I have regretted it. Maybe I’ll stop trying new backend frameworks someday 🤷‍♂️

Discussion (4)

Collapse
andycharles6 profile image
andycharles6

Coming from Rails, try adonisjs.com. You'll love it

Collapse
phawk profile image
Pete Hawkins Author

Thanks Andy, I will definitely check it out! Does it play nicely with typescript?

Collapse
andycharles6 profile image
andycharles6

Yes. They have first class support for Typescript. Some of the docs I will recommend you to read to see their approach towards Typescript.

There is a lot to explore in the framework. We have a great small community and everyone is helpful.

Also, one of the community member is creating these screencasts for new comers jagr.co/series/lets-learn-adonis-5

Thread Thread
phawk profile image
Pete Hawkins Author

Oh nice, I do like a good screencast!

That’s cool, I do really like typescript, the main things that let down the node approach for me where 1) bullmq randomly falling over (I still don't know what was going on there, just don't know enough about it to dig in further) 2) type-orm, which is great, but it just wasn't as polished as ActiveRecord, 3) pulling all these libraries together myself, rather than having a more full stack framework. Hopefully adonis solves that.