Redwood.js

Redwood.js

RedwoodJS is a full-stack, open-source framework for building web applications. It was launched in 2020 by Tom Preston-Werner, a co-founder. Redwood uses a unique combination of established technologies:

  • The is built with , a popular library for building user interfaces.
  • For the , Redwood uses , a query language for APIs that allows you to request specific data and aggregate responses from multiple sources.
  • It utilizes as an Object-Relational Mapping (ORM) solution to manage the layer. helps developers build performant and safe access.
  • . Redwood's router is declarative, built on the idea of "routes as a first-class concept."'

At a high level, RedwoodJS has two main parts:

  1. The . This is a built with and Server. is used for access, and Apollo Server is used to create the server.
  2. The . This is a React application that's built with several libraries like Apollo Client (for fetching data from the ), (for routing), and (for testing).

Some Discoveries

While I prefer over , due to the workspace support, I like to use Yarn for this.

Getting Started

text
yarn create redwood-app --ts ./redwoodblog
text
yarn redwood dev
text
yarn redwood generate page home /
text
yarn redwood generate page about

Generating Layouts

text
yarn redwood g layout blog

Using

Opening Prisma Studio

text
yarn rw prisma studio

Scaffolding Prisma Simple CRUD

text
yarn rw g scaffold post

Components

text
yarn rw g cell Articles

When having type errors

text
yarn rw g types

Setting up Auth

text
rw setup auth supabase
text
The table `...` does not exist in the current database.

You need to yarn rw prisma migrate dev

Set up Storybook

text
yarn rw storybook

Set up Jest

text
yarn rw test
Backlinks7