Published on: 2022-08-14
Introduction: A New Era of JavaScript Frameworks
In 2022, full-stack JavaScript is no longer just a buzzword — it’s a movement. With tools like Next.js, Remix, and Blitz gaining popularity, RedwoodJS carves out its own niche: a full-stack framework purpose-built for startups and modern apps, with batteries included.
1. What Is RedwoodJS?
RedwoodJS is an opinionated, full-stack framework designed by Tom Preston-Werner (co-founder of GitHub). It aims to make building and deploying JAMstack applications as simple as possible. Out of the box, it comes with:
- React (frontend)
- GraphQL (API layer)
- Prisma (ORM for database)
- Apollo (data fetching)
- TypeScript (optional but supported)
- Serverless-first deployment strategy
2. Key Concepts That Make Redwood Unique
Directory Structure
Redwood introduces a clear separation between the frontend and backend:
/web → Frontend (React)
/api → Backend (GraphQL, Prisma)
Generators
Want to scaffold a CRUD interface?
yarn rw generate scaffold post
This generates:
- Prisma model
- GraphQL SDL
- Services
- Pages and forms
- Routing setup
It’s Rails-style scaffolding but modernized for React and GraphQL.
Cells: Data Fetching Made Declarative
Redwood introduces Cells, a way to encapsulate GraphQL fetching with loading, error, and success states in a single component.
export const QUERY = gql`
query FindPostById($id: Int!) {
post(id: $id) {
id
title
body
}
}
`;
No need for custom useEffect or data-loading boilerplate — it’s all handled within the Cell.
3. Building a Blog: Quick Demo
Let’s build a simple blog with posts:
Step 1: Create the App
yarn create redwood-app blog-app
cd blog-app
Step 2: Define a Post Model
In api/db/schema.prisma:
model Post {
id Int @id @default(autoincrement())
title String
body String
}
Then run:
yarn rw prisma migrate dev
Step 3: Scaffold It
yarn rw generate scaffold post
Redwood gives you routes, forms, pages, and full CRUD functionality.
4. Deployment: Serverless First
RedwoodJS is made for modern platforms like:
-Netlify
-Vercel
-Render
Just run:
yarn rw setup deploy netlify
Redwood auto-generates deployment configs, including for Netlify Functions.
5. Who Should Use Redwood?
RedwoodJS is a perfect fit if you:
-Want to ship MVPs fast
-Prefer convention over configuration
-Like React, GraphQL, and modern tooling
-Are deploying to the JAMstack
It’s especially great for early-stage SaaS, marketplaces, and dashboards.
Conclusion: Redwood must try
While it’s not as hyped as some frameworks, RedwoodJS is a hidden gem. If you want full control, modern tooling, and the ability to scale from serverless MVP to production SaaS, Redwood is worth serious consideration.