Hands-On Full-Stack React

Welcome to the Repository for the Hands-On Full-Stack React class! I have broken the project into progress steps.

Week 1

In this lesson we will create a full-stack application locally on our machines. We will go through folders 1 through 3.

Week 1 Assignment

Using React, Redux Toolkit, ExpressJS, and Mongodb, create a full-stack application locally on your machine.

For help, reference the repository. You are also encouraged to use other resources whenever needed!

Week 2

In this lesson we will deploy our application to EC2, then we will make our API scalable using Lambdas, API Gateway, and AWS Amplify, and finally we will deploy the front-end to Netlify.

Week 2 Assignment

Create an application that fulfills the following requirements:

  • Uses MongoDB running on EC2
  • Uses AWS Amplify to run an Express API on AWS Lambdas
  • Uses Netlify for front-end hosting

For help, reference the repository. You are also encouraged to use other resources whenever needed!

There was a request to map out the back end deployment flow.

Deployment flow

The set up I am showing here is a bit strange, so lets walk through the steps to deploy the back end.

1. Build back-end with babel:

cd back-end && yarn babel src -d lib

2. Copy back-end into the Amplify folder:

cd back-end
cp -r lib ../front-end/amplify/backend/function/blogapi/src/lib
cp index.js ../front-end/amplify/backend/function/blogapi/src/index.js
cp -r node_modules ../front-end/amplify/backend/function/blogapi/src/node_modules

The build command in the back-package.json handles steps 1 and 2.

"build": "yarn install && babel src -d ../front-end/amplify/backend/function/blogapi/src/lib && cp index.js ../front-end/amplify/backend/function/blogapi/src/index.js&& cp -r node_modules ../front-end/amplify/backend/function/blogapi/src/node_modules",

3. Deploy Amplify

cd front-end && amplify push

Improving this flow

Options for improvement include

  • Moving Amplify into the outside folder
  • Moving the back-end folder into the front-end folder
  • Creating an outside makefile to orchestrate both builds

Week 3

In this lesson we will add authentication, move to a scalable database, add tests, and continuous integration.