A junior dev's short review of RedwoodJS

Introduction

RedwoodJS is a full-stack framework for building web applications. It offers a powerful set of tools for building both the front end and back end of your application in a single codebase.

I got to know about Redwood from watching a video from Theo where he was discussing the framework with its co-creator. I enjoyed listening to them talk through the design philosophy behind Redwood as well as its many use cases, and so I had to give it a go in my next project.

What was I building?

The chance came soon after when I needed to build a small inventory management web application for a final-year project in my undergraduate course.

A system architecture diagram showing how redwood was used

On the backend, I used Redwood's services to define my business logic which interacted with a cloud-hosted Postgres database via Prisma to manage Users and Items in the inventory management system. Additionally, Redwood provided an easy way to build a self-hosted authentication solution via dbAuth, which made use of Redwood's serverless functions behind the scenes.

On the frontend, I made heavy use of Redwood's cells to manage data fetching and display. The Redwood router also helped make it very simple to implement navigation. I decided to use Mantine as a component library so that I didn't have to build complex components from scratch if I needed them. I also used tailwind to style layouts and simpler custom components.

Things I liked about Redwood

  • Opinionated file structure: Redwood places code relating to the frontend in the /web folder and code relating to the backend in the /api folder. I found that this form of organizing files helped greatly when the number of files increased as the project grew in size over time.

  • Code generation via CLI: Creating new entities (services, components, cells, layouts, page, etc) was easy to do with the convenient CLI tool that Redwood provided. It took care of much of the boilerplate that I had to write and this allowed me to write the code that actually mattered!

  • Great documentation and guides: I found the documentation very accessible and informative. The Redwood team made it very easy to search for things on the docs. What blew me away was that there were even full writeups to guide users through concepts, such as this introduction to servers that was the precursor to a guide for baremetal deployment.

  • From Init to Deployment: The Redwood framework, along with the docs, does a very thorough job of taking a developer from the point of initializing their project to deployment. To a very junior developer like myself, this guided approach was very much appreciated.

  • Out-of-the-box features: I could tell that the creators and maintainers of Redwood thought through the pain points of developers because of the insanely useful features that come out of the box. One significant one was that Redwood helped me create a self-hosted authentication solution very easily. It had the necessary APIs to make it work and even a written guide so that I could implement Role Based Access Control (RBAC) in my web app. These non-trivial tasks that I'm super grateful that Redwood enabled me to implement relatively easily.

Things I didn't quite like about Redwood

  • GraphQL code generation: The developer experience with GraphQL was generally smooth but was clunky at times. This was because of the additional step of Redwood generating types based on a user-defined SDL file. My problem with this flow was that I frequently had to manually restart VSCode's GraphQL server before I could see the SDL changes come into effect (due to the aforementioned code generation step). An alternative that has been the talk of the web dev world, tRPC, seems to do away with code gen entirely which is super interesting! I expect to be trying it out in my next project to see what the hype is about.

  • Redwood Cells and TypeScript: I often had TypeScript yelling that it couldn't find the appropriate file for a Redwood Cell, even though the file was present. This is likely an issue with the code gen for the types of Cells. Although this wasn't impeding me from development, it IS somewhat annoying when you see those red squiggly lines.

Conclusion

Overall, my experience with Redwood was very positive. It's a powerful framework that offers a great developer experience and makes it easy to build web applications. Though I had some issues while using it, the tools and features that I got out of the box from Redwood were incredibly helpful in my development process. It's amazing how Redwood saved me hours, if not days, of my time while also guiding me toward best practices.

I would 100% recommend you to check Redwood out and even try it in a small side project to see what it can do for you. This experience has opened my eyes to how full-stack frameworks are the future of web development. Though Redwood has been amazing to use, I'm looking forward to trying my hand at other frameworks that have popped up recently like create-t3-app which was inspired by one of my favorite tech YouTubers.

If you've made it this far into my blog post, thank you! This is my first ever blog post in (hopefully) more to come. I was inspired to learn in public by this blog post from Swyx and I plan to do that by writing more blog posts like these. If you have feedback, I would like to hear it. Please drop me a DM here or tweet at me.