Code and the Coding Coders who Code it · Drew Bragg
Swimming against the current sometimes leads to unexpected treasures. In this fascinating conversation, Adam Fortuna reveals how migrating Hardcover—a social network for readers with 30,000 users—from Next.js back to Ruby on Rails delivered surprising performance improvements and development simplicity. The journey begins with Adam explaining how Hardcover originated as a response to Goodreads shutting down their API. As a longtime Rails developer who initially chose Next.js for its server-side rendering capabilities, Adam found himself drawn back to Rails once modern tools made it viable to combine Rails' backend strengths with React's frontend interactivity. The migration wasn't a complete rewrite—they preserved their React components while replacing GraphQL with ActiveRecord—and unexpectedly saw significant improvements in page load speeds and SEO rankings. At the heart of this technical evolution is Inertia.js, which Adam describes as "the missing piece for Rails for a long time." This elegant solution allows direct connections between Rails controllers and React components without duplicating routes, creating a seamless developer experience. We dive into the challenges they faced, particularly with generating Open Graph images and handling API abuse, and how they solved these problems with pragmatic hybrid approaches. The conversation takes an exciting turn as Adam discusses their work on book recommendation engines, combining collaborative filtering with content analysis to help readers discover their next favorite book. As someone currently enjoying the Dungeon Crawler Carl series (described as "RPG mixed with Hitchhiker's Guide"), Adam's passion for both books and elegant technical solutions shines throughout. Listen in as we explore how going against conventional wisdom sometimes leads to better outcomes, and discover why Hardcover is now being open-sourced to invite community collaboration. Whether you're interested in Rails, JavaScript frameworks, or book recommendations, this episode offers valuable insights into making technical decisions based on real-world results rather than following trends. Links https://hardcover.app/blog/part-1-how-we-fell-out-of-love-with-next-js-and-back-in-love-with-ruby-on-rails-inertia-js https://adamfortuna.com/ https://bsky.app/profile/adamfortuna.com Send us some love. Honeybadger Honeybadger delivers best-in-class error tracking, intelligent logging, and Just Enough APM™. Judoscale Autoscaling that actually works. Take control of your cloud hosting. Disclaimer: This post contains affiliate links. If you make a purchase, I may receive a commission at no extra cost to you. Support the show
0:01Drew BraggHello everyone and welcome to another episode of Code and the Code Encoders.
0:04Drew BraggWho Code it?
0:04Drew BraggI'm your host, drew Bragg, and I'm joined today by Adam Fortuna.
0:07Drew BraggAdam, for anyone who's not familiar with you, would you please give us a little bit of background on yourself.
0:13Adam FortunaHey, hey, I'm Adam.
0:15Adam FortunaI think maybe some Rails and Ruby developers might know me from working at Code School doing interactive courses.
0:22Adam FortunaSome people might know me from a financial blog I wrote for a couple of years called Minify you, minify JavaScript that's kind of the emphasis of the name.
0:30Adam FortunaLately I've been working on Hardcover, which is a social network for readers to find books and get recommendations from friends, all right.
0:40Drew BraggSo the way this is going to work for anyone new to the show is I'm going to ask Adam three questions.
0:44Drew BraggI'm going to ask him what he's working on, what kind of blockers he has.
0:47Drew BraggIf he doesn't have a current blocker, he can talk about a recent blocker he had, how he went about solving it.
0:51Drew BraggAnd then we'll wrap up the show by asking Adam what's something cool, new or interesting that he's recently learned or discovered.
0:57Drew BraggIt doesn't have to be coding related, but of course it always can be so without any further ado, adam, what are you working on?
1:13Adam FortunaI just finished a really big migration for hardcovers codebase where we migrated from Nextjs to Ruby on Rails and that ended up taking quite a bit of time.
1:19Adam FortunaSome of our back end was already in Rails but our front end was in Next.