All right, guys.
So before we get started on our back end, I just want to kind of go over just an overall picture of
how this is going to work, this full stack application workflow.
So we've already started on our client, our front end, right?
This part right here.
So we have a folder called Front End.
That's where React Lives.
That's where we'll be using Redux for our application state.
Anything that has to do with the user interface.
All right.
Now in the next video, we're going to start to create our back end, which is going to be our NodeJS
and Express server.
So that's where we're going to have routes that will do certain actions.
So for instance, we'll have a route at slash API slash products and we'll be able to make different
types of requests.
So for instance, if we want to fetch our products, we can make a get request to API slash products.
If we want to create a new product, we'd make a post request from our client and we'd have some data
in the body, the product data, and we'd make a post request to API products.
If we want to update or delete, we would make a put or a delete request and that would be to API products
slash and then whatever ID of the product that we want to update.
Okay.
So it's going to work like that for products.
It's going to work like that for orders for users and we'll even have a route to create product reviews.
And then we're also going to have authentication.
So with authentication, we're going to use Json web tokens, which I'll explain when we get to it.
But instead of keeping that token on the client in local storage, we're going to keep it in what we
call an Http only cookie on the server so that it can't be read by the client.
It's just a more secure way to store it.
In the first version of this course, we did store it in local storage.
A lot of courses that you watch, a lot of tutorials online, they will store it in local storage and
it can be fine in some cases, but it is safer to keep it on the server.
All right.
So that's what we'll be doing as far as authentication and we'll have some auth middleware that will
then read that token from the Http only cookie and validate the user and then proceed to let the user
do whatever it is they're allowed to do.
All right.
Now regular users are going to be able to obviously purchase, you know, make purchases, create orders
and so on.
And we're also going to have another role, I guess you could call it a role of admin, where admin
users can pretty much do anything.
They can create products, they can update delete products, they can set orders to to delivered, they
can change statuses, they can delete users, all kinds of stuff.
All right.
So there's basically going to be two roles, just regular users that are shoppers and then admin users.
Okay.
Now, as far as data, we're going to be storing our data in MongoDB.
Okay?
We're going to be using MongoDB Atlas, which is the cloud version of MongoDB and to connect to MongoDB
as well as make our queries, we're going to be using Mongoose, which is an object data mapper.
So it gives us an easy way to fetch products and update products and orders and all that good stuff.
All right.
So that's kind of just a very high level overview of what we'll be doing.
I just wanted to kind of get the get this picture in your head moving forward so you know what's going
on.
All right.
So in the next video, we're going to start on our NodeJS and Express server.