ajcwebdev
Video cover art for RedwoodJS with Anthony | Tech Talks with Santosh

RedwoodJS with Anthony | Tech Talks with Santosh

Published:

Anthony Campolo joins Tech Talks with Santosh to demonstrate how to create and deploy a RedwoodJS application, showcasing its full-stack capabilities with React, GraphQL, and Prisma integration.

Episode Summary

In this episode, Anthony Campolo provides an in-depth demonstration of RedwoodJS, a full-stack web application framework. He explains the framework’s architecture, which combines React for the frontend, GraphQL for the API layer, and Prisma for database operations. Anthony walks through creating a basic blog application, highlighting RedwoodJS’s CLI tools for generating components, pages, and backend services. He showcases the framework’s “cell” concept for declarative data fetching and its scaffold feature for quickly building CRUD interfaces. The discussion covers deployment options, emphasizing RedwoodJS’s flexibility across various hosting platforms. Anthony also touches on the framework’s future plans, including Vite integration and server-side rendering support, while addressing its position in the current web development ecosystem.

Chapters

00:00 - Introduction to RedwoodJS

Anthony introduces RedwoodJS as a full-stack framework for startups, differentiating it from other React-based frameworks like Next.js and Gatsby. He explains that RedwoodJS provides a complete end-to-end solution, including database integration, which sets it apart from frameworks that only handle the front-end or require additional setup for back-end functionality. Anthony emphasizes RedwoodJS’s out-of-the-box features, such as authentication and database abstraction with Prisma, highlighting how these integrated components streamline the development process for full-stack applications.

02:56 - Setting Up a RedwoodJS Project

Anthony demonstrates the process of setting up a new RedwoodJS project. He explains the project structure, focusing on the web and API folders that separate front-end and back-end code. The demonstration covers the creation of pages using RedwoodJS’s CLI commands, showing how to generate a home page and set up routing. Anthony also introduces the concept of “cells” in RedwoodJS, which provide a declarative way to fetch and display data from the API. He walks through creating a simple layout and adding navigation between pages, illustrating the framework’s approach to building a coherent application structure.

08:24 - Database Integration and GraphQL Setup

This chapter delves into setting up the database and GraphQL layer in RedwoodJS. Anthony explains how to use Prisma to define the database schema, demonstrating the creation of a simple blog post model. He shows the process of running migrations to update the database structure and introduces the GraphQL schema definition language (SDL) used in RedwoodJS. The demonstration covers how RedwoodJS automatically generates CRUD (Create, Read, Update, Delete) operations based on the Prisma model, showcasing the framework’s ability to quickly set up a fully functional API with minimal manual coding.

17:01 - Building the Frontend and Data Fetching

Anthony focuses on building the frontend of the application, particularly emphasizing RedwoodJS’s unique “cell” concept for data fetching. He demonstrates how cells provide a declarative way to handle loading states, errors, and successful data retrieval from the GraphQL API. The chapter covers creating a component to display blog posts, showing how to query data using GraphQL and render it in the React frontend. Anthony explains the benefits of this approach, highlighting how it simplifies state management and reduces boilerplate code typically associated with data fetching in React applications.

25:50 - Deployment and Environment Configuration

The final chapter covers the deployment process for a RedwoodJS application. Anthony walks through setting up the project for deployment, explaining how to configure environment variables for different deployment targets. He demonstrates deploying the application to Vercel, showing how RedwoodJS’s built-in deployment commands simplify the process. The discussion touches on other deployment options available for RedwoodJS, including serverless and traditional server deployments. Anthony also addresses considerations for production deployments, such as setting up authentication to secure the application’s API endpoints.