A First Look at RedwoodJS - Complete Series

Introduction

RedwoodJS - The Universal Deployment Machine

RedwoodJS is an opinionated, full-stack, serverless web application framework for the Jamstack. It is designed to enable the dream of a Universal Deployment Machine.

There has recently been an influx of different projects aiming to build a Fullstack React framework. What are people talking about when they say Full Stack React and why is it suddenly such a hot topic?

The Jamstack is a departure from traditional server-rendered stacks like LAMP and MEAN. Jamstack applications serve static files from globally distributed CDN’s, removing the server and the database from the stack entirely and replacing them with APIs that provide dynamic functionality.

Serverless is a buzz word commonly used to refer to Function-as-a-Service cloud products like AWS Lambda. Instead of paying for a server to always be running and ready to accept requests, you pay based on the specific number of function calls your app invokes.

Tutorial

Part 1 - Setup, Pages

Install and create our first Redwood application

This series will start at the very beginning and assume no prior knowledge of Redwood. We’ll install the Redwood CLI and learn how to use Redwood’s custom generators to create pages.

Part 2 - Routes, Layouts

Explore Redwood’s router and create links for our pages

Redwood has its own built-in router inspired by Ruby on Rails, React Router, and Reach Router. Redwood Router is designed to list all routes in a single file, without any nesting.

Part 3 - Prisma Migrate, Scaffold, Railway

Get our database up and running and learn to create, retrieve, update, and destroy blog posts

Prisma 2.0 is a query builder that provides a type-safe API for submitting database queries that return JavaScript objects. We’ll learn how to write a Prisma schema file and use it to initialize our database. For our backend we’ll use Railway to host our database with Postgres.

Part 4 - Cells

Set up our frontend to render a list of our blog posts by querying data from our backend

We’ll generate a cell that queries our backend and renders all our blog posts to the front page of our site. We’ll use route parameters to link to our blog post pages.

Part 5 - Contact, React Hook Form

Combine everything we’ve learned up to this point to generate a contact page and take input from a user

We’ll explore further into Redwood forms and all the corresponding helpers. Redwood uses react-hook-form by default but it can also use other React form builders.

Part 6 - Schema Definition Language, useMutation

Connect our contact form to the database to persist data entered into the form

After creating our contact form we need to create a new contact schema and migrate our database. We’ll use another Redwood generator to create our SDL and resolvers for our services. We’ll also write a mutation to save the data to the database.

Part 7 - Authentication, Netlify Identity

Implement authentication with Netlify Identity

We’ll use Netlify Identity to implement authentication on our blog. We’ll use one more Redwood generator for authentication. We’ll be able to use Netlify’s login functionality so we don’t have to make our own login form.

Part 8 - Deployment, Railway

Deploy our frontend to Netlify

A website isn’t very useful unless it’s on the web. In this part we’ll deploy our React frontend to Netlify with Netlify Functions. Netlify will give us a free domain that we can share with the world.

3 Likes

HAHAHA Part 8! I’ve never been made into a GIF before! :open_mouth:

1 Like

It was my favorite moment of the whole series. Camera trying to run away after hearing forms is a close second.

2 Likes