Welcome to

TinyHouse: A Fullstack React Masterclass with TypeScript and GraphQL - Part Two

Course Syllabus and Content

Module 1

Introduction

5 Lessons 56 Minutes

  • 01Part Two Welcome
    Sneak Peek00:01:55

    Welcome to Part II of the course.

  • 02The TinyHouse App
    Sneak Peek00:15:10

    In this lesson, we'll highlight all the features we intend to have for our home sharing application, TinyHouse.

  • 03Walkthrough of TinyHouse Code
    Sneak Peek00:12:17

    We'll spend a few minutes walking through the complete TinyHouse code for Part II of the course to gather context on some of the patterns we'll follow.

  • 04Code Patterns & Behavior
    Sneak Peek00:10:54

    In this lesson, we'll continue from the previous lesson and spend more time discussing common patterns we'll employ as we build both the server and client projects of the TinyHouse application.

  • 05How To Go Through The Course
    Sneak Peek00:16:39

    The structure of the course, the material available, and how best to go through the course in Part II.

Module 2

Set-up for Part 2

1 Lesson 2 Minutes

  • 01Set-up For Part II
    Sneak Peek00:02:51

    We begin working on building the TinyHouse application by first modifying the code from the end of Part I of the course to prepare us as we move forward.

Module 3

Routing in TinyHouse

3 Lessons 14 Minutes

  • 01Introducting Module 3
    Sneak Peek00:00:33

    This is an introduction to the work we'll be doing in Module 2.0.

  • Routing is the process of navigating through a web application with the help of URLs. When a link in a webpage is clicked, the URL changes which then navigates a user to a new page. In this lesson, we'll learn about routing and explore the different routes we'll need for our TinyHouse application.

  • React Router is a popular community-built library that provides a set of navigational components to help create routing within React applications. In this lesson, we'll use React Router to declare the main routes and the components that should be shown in these routes for our TinyHouse client application.

Module 4

Setting up our Database

4 Lessons 30 Minutes

Module 5

User Authentication with Google Sign-In & OAuth 2.0

10 Lessons1 Hours 40 Minutes

Module 6

Persist Login Sessions with Cookies

7 Lessons 41 Minutes

  • 01Module 5 Introduction
    Sneak Peek00:00:55

    This is an introduction to the work we'll be doing in Module 5.0.

  • A browser cookie is data that a server can send to a user's web browser where the browser can often send back to the server. With this lesson, we begin discussing how persistent login sessions can be made with cookies by going through a simple exercise with the Google search web application.

  • Before we dive into implementing persistent login sessions in our app, we'll touch on the different storage mechanisms of the web browser. In this lesson, we explore the differences between localStorage, sessionStorage, and cookies.

  • We'll utilize the cookie-parser package in our Node server to help parse a "viewer" cookie from HTTP requests sent from the client.

  • Our server is now able to help set and clear the "viewer" cookie in our client when we sign-in with Google. In this lesson, we'll modify our client such that it will use the "viewer" cookie to automatically log a viewer in when the app first renders and the cookie is available.

  • We’ll take an additional step in this lesson to prevent Cross-Site Request Forgery attacks. We'll see how we can have the client pass a CSRF token with every request and where the server can use the token to verify the identity of the viewer making the request.

  • 07Module 5 Summary
    Sneak Peek00:04:09

    This lesson is a summary of the work we've done in Module 5.0.

Module 7

Building the User Page

7 Lessons1 Hours 48 Minutes

Module 8

Building the Listing Page

7 Lessons1 Hours 35 Minutes

  • 01Introduction to Module 7
    Sneak Peek00:00:33

    This is an introduction to the work we'll be doing in Module 7.0.

  • In this module, we begin building the server and client implementation that will help allow us to retrieve and display information for listings in our application. We'll begin by brainstorming the GraphQL fields we'll need to query listing data.

  • With the root-level listing field prepared in our GraphQL API, we'll construct the resolver function for this field to attempt to query for the appropriate listing from the "listings" collection in our database.

  • With our listing query now prepared and available in our GraphQL API, we'll begin building the page shown in the /listing/:id route of our client app.

  • In this lesson, we'll continue to build the listing page in our client application by looking to prepare the <ListingDetails /> and <ListingBookings /> components.

  • In this lesson, we'll finish up our client update for the listing page by creating the component where a user will eventually use to book for a listing.

  • 07Module 7 Summary
    Sneak Peek00:04:47

    This lesson is a summary of the work we've done in Module 7.0.

Module 9

Building the Home Page

6 Lessons1 Hours 3 Minutes

  • 01Introduction to Module 8
    Sneak Peek00:00:45

    This is an introduction to the work we'll be doing in Module 8.0.

  • 02Listings GraphQL Fields
    Sneak Peek00:02:59

    In the homepage of our application, we hope to display a small list of the most premium listings available. In this module, we begin building the server and client implementation that will help allow us to retrieve and display listings information for the homepage of our application. We'll begin by brainstorming the GraphQL fields we'll need to query a list of listings from our API.

  • With the root-level listings field prepared in our GraphQL API, we'll construct the resolver function for this field to attempt to query for a list of listings from the "listings" collection in our database.

  • The homepage of TinyHouse is to be to mostly presentational and aims to serve the purpose of telling the user what our app does as well as provide useful links to direct them elsewhere. In this lesson, we focus on building the presentational UI of the homepage.

  • Our homepage is mostly prepared except for displaying the most premium (i.e. highest price) listings. In this lesson, we'll look to make the query we'll need to retrieve the highest priced listings from our server and display that information on our homepage.

  • 06Module 8 Summary
    Sneak Peek00:03:13

    This lesson is a summary of the work we've done in Module 8.0.

Module 10

Searching for listings with Google's Geocoding API

9 Lessons2 Hours 4 Minutes

  • 01Module 9 Introduction
    Sneak Peek00:01:04

    This is an introduction to the work we'll be doing in Module 9.0.

  • We've managed to create the capability for users to query for a list of listings that can be sorted based on listing price. In this module, we'll focus on the functionality that will allow our users to search for listings based on location. We'll begin the investigation for this by discussing the API we intend to use to help us - Google's Geocoding API.

  • In this lesson, we'll address the gameplan we have in mind in how we want to conduct location-based searching in our app.

  • In this lesson, we'll begin to write the code in our server project to help allow a user to search for listings in a certain location. To achieve this, we'll first modify the existing listings GraphQL query field to accept an optional location argument that when provided will return the listings that pertain only to that location.

  • With our listings field in our GraphQL API prepared to accept a location argument, we'll begin to work on the client app to build the /listings/:location? page for where certain listings can be shown for specific locations.

  • At this point, we have a page displayed in the /listings/location? route that surfaces up to eight different listing cards for listings that exist in certain locations. In this lesson, we'll create the capability for a user to filter and paginate the information presented to them in the listings page.

  • In this lesson, we'll work on something slightly related to the /listings/:location? page and is a big factor of our app. We'll be working on the search input that we'll place in the app header that will allow users to search for listings in a location while within any part of our app.

  • At this moment in time, we've introduced the capability to have our client application query for listing documents for different locations. In this lesson, we'll investigate and discuss indexes within MongoDB and see how can index location-based data from the "listings" collection in our database.

  • 09Module 9 Summary
    Sneak Peek00:03:28

    This lesson is a summary of the work we've done in Module 9.0.

Module 11

Connecting with Stripe

8 Lessons1 Hours 29 Minutes

  • 01Module 10 Introduction
    Sneak Peek00:00:56

    This is an introduction to the work we'll be doing in Module 10.0.

  • It's finally time we talk about payments! The business model of TinyHouse is an online marketplace where users can host and book listings. In this lesson, we'll learn about how we intend to have TinyHouse be a marketplace by using the third-party payment platform - Stripe.

  • When a user in our application plans to host a listing, we'll need to ensure they've connected to their own Stripe account through our Stripe platform account. This is to leverage Stripe Connect's capability to pay the users who have listings in our app when a booking is made. In this lesson, we'll set up the credentials we'll need from Stripe and save them as environment variables for both our server and client projects.

  • We'll begin creating the GraphQL fields that we'll need to help us establish Stripe Connect OAuth in our application.

  • We'll continue to update the GraphQL resolver functions we've prepared to allow users to connect & disconnect from Stripe in our application.

  • We'll switch over to work in our React application and have it communicate with the server to allow a user to connect with their Stripe account on our platform.

  • We've managed to create the functionality to have a logged-in user in our app connect with Stripe. In this lesson, we'll look to visually indicate that the user is in the connected state and have an action responsible for allowing the user to disconnect from Stripe.

  • 08Module 10 Summary
    Sneak Peek00:04:17

    This lesson is a summary of the work we've done in Module 10.0.

Module 12

Hosting new listings

6 Lessons1 Hours 30 Minutes

  • 01Module 11 Introduction
    Sneak Peek00:00:36

    This is an introduction to the work we'll be doing in Module 11.0.

  • 02HostListing GraphQL Fields
    Sneak Peek00:02:43

    For users in our application to add listings (i.e. host listings) in the TinyHouse application, we'll need to create the functionality where users can upload and insert new listing data into our database. In this lesson, we'll establish the GraphQL fields in our API that will help achieve this.

  • We'll continue from what we've done in the previous lesson by having the hostListing resolver function we've created receive an input with new listing information which will then be added to the "listings" collection in our database.

  • We'll now begin to work on the form on the client application where a user can create (i.e. host) a new listing. The form we'll build will essentially be the UI of the /host route of our application.

  • The majority of the work we've needed to do for the form shown in the /host page was completed in the last lesson. In this lesson, we collect the values a user is to enter in the form and when the user decides to submit the form, we'll trigger the hostListing mutation we have in our API and pass the relevant input along.

  • 06Module 11 Summary
    Sneak Peek00:05:05

    This lesson is a summary of the work we've done in Module 11.0.

Module 13

Cloudinary & Image Storage

3 Lessons 16 Minutes

  • 01Module 12 Introduction
    Sneak Peek00:00:41

    This is an introduction to the work we'll be doing in Module 12.0.

  • In this lesson and module, we'll investigate to see if there's a better way of storing the newly created images for listings in our database. We'll discuss and investigate cloud-based image and video management services and see how we can use Cloudinary for our application.

  • In this lesson, we'll pick up from what we've done in the previous lesson by modifying our server code to utilize Cloudinary to host listing images for our TinyHouse application.

Module 14

Booking listings

9 Lessons2 Hours 34 Minutes

  • 01Module 13 Introduction
    Sneak Peek00:01:04

    This is an introduction to the work we'll be doing in Module 13.0.

  • 02CreateBooking GraphQL Fields
    Sneak Peek00:02:51

    For users to book a listing in our app, we'll need functionality to handle this as well as the capability to process transactions between the tenant and host. In this lesson, we'll establish the GraphQL fields in our API that will help achieve this.

  • Before we begin to implement the createBooking mutation resolver, we'll first create the utility function that will facilitate a Stripe charge with the help of Stripe's API.

  • In this lesson, we'll continue from the previous lesson and look to see how we can update the bookingsIndex of a listing document with the dates that have recently been booked by a tenant.

  • In this lesson, we'll begin to work on the client-side to facilitate the booking of a listing. We'll begin by first disabling any dates in the listing page datepickers that have been previously booked by other users.

  • In this lesson, we'll look to prepare the confirmation modal that gets displayed to the user when the users requests to make a booking.

  • We'll continue from what we've done in the previous lesson by looking to capture a user's credit or debit card information when a booking is to be made, with the help of the React Stripe Elements library.

  • In this lesson, we'll wrap-up what we've done in the last few lessons by now collecting all relevant information and triggering the createBooking mutation when a user is ready to confirm their booking.

  • 09Module 13 Summary
    Sneak Peek00:09:01

    This lesson is a summary of the work we've done in Module 13.0.

Module 15

Deploying with Heroku

4 Lessons1 Hours 2 Minutes

  • 01Module 14 Introduction
    Sneak Peek00:00:28

    This is an introduction to the work we'll be doing in Module 14.0.

  • We've finished building the application that we've wanted so we'll now focus on deployment. There's no use in having a great app if we can't deploy it for others to use! Before we dive into what form of deployment we're going to conduct, we'll talk about cloud computing and its importance when it comes to the world of deployment.

  • Heroku is a platform as a service (PaaS) that's been around since June 2007 and supports the deployment of several programming languages. In this lesson, we'll use Heroku to help deploy our TinyHouse application on to the cloud!

  • 04Walkthrough of Deployed App
    Sneak Peek00:10:25

    For the last core lesson of the course, we'll take a walkthrough of our deployed app to ensure everything works as intended. By the end of this lesson, we'll also spend a little time quickly summarizing what we've done to have our application be deployed.

Module 16

Bonus Module

7 Lessons1 Hours 4 Minutes

Module 17

Part Two Conclusion

1 Lesson 40 Seconds

Module 18

PostgreSQL & TypeORM

5 Lessons1 Hours 1 Minutes

Module 19

Unit Testing (Client)

8 Lessons2 Hours 21 Minutes

Module 20

Package Updates

1 Lesson