Build a Diary Web App using the MERN Stack! - Coding Tutorials by Umar Khan

Publié le: 26 mai 2023
sur la chaîne: Coding Tutorials by Umar Khan
8,651
299

In this video you, will learn to build a full stack web application and deploy it to Render, a hosting service. This means your application can be used from anywhere with an internet connection!

Our tech stack for this project will consist of MongoDB for the database, Express.js as the web server framework, React on the frontend, and Node.js as the server environment (MERN).

We'll be using Visual Studio Code, MongoDB Compass, and Postman to help us build the application. And we'll learn how to set up a backend API including routes, controllers, and middleware, as well as a frontend, where we will get practice creating custom hooks, global state using the React Context API, and much more.

Thanks for watching; please like and subscribe!

** Note: please excuse the blank screen toward the end of the video...that was an editing error on my part. **

#reactjs, #mernstack , #mongodb, #nodejs, #expressjs, #webdevelopment

------------------------
Timestamps:

INTRODUCTION
0:00 Introduction

BACKEND - Posts
3:05 project setup and folder structure
4:51 MongoDB Atlas & MongoDB Compass setup
7:42 Node.js backend initialization, install express and mongoose
9:49 create server.js file
12:27 install nodemon
13:41 install dotenv, setup environment variables, and connect to MongoDB
19:51 create mongoose models for users and diary posts
23:04 set up and test API routes to get, create, update, and delete posts
44:45 initialize git repository and push backend to github

FRONTEND - User Interface
51:00 setup react app frontend and create index.js, App.jsx, Layout.jsx, and NavBar.jsx
56:13 set up routing in App.jsx with useRoutes hook
57:46 set up sass for styling with css modules
1:00:57 create Home page and PostHead component and access backend from frontend
1:10:40 create DiaryPost page to display individual posts
1:15:02 create PostForm component to handle user inputs
1:21:02 implement React Context API to manage global posts state

BACKEND - User authentication logic
1:32:34 implement user authentication and user routes (install bcrypt, jsonwebtoken, validator)
1:45:55 create middleware to protect routes that require authentication

FRONTEND - Authenticate users on front end
1:52:00 create user context to manage global user state
2:01:26 create Login and Signup pages
2:08:05 apply authentication context (authContext) to access protected routes

BACKEND/FRONTEND - Associate posts with users
2:09:54 modify Post model
2:11:36 edit components to display only those posts created by the logged in user
2:14:13 use date-fns package to display the date in a more readable format

DEPLOYMENT:
2:16:01 push all backend code to github
2:17:04 create frontend repository and push frontend code to github
2:18:00 deploy application to render
2:23:30 add a spinner to the Home page and push code to github again

CONCLUSION:
2:25:35 concluding remarks

------------------------
Links to files:

Backend Repository:
https://github.com/u-khan-dev/diary-api

Frontend Repository:
https://github.com/u-khan-dev/diary


Sur cette page du site, vous pouvez voir la vidéo en ligne Build a Diary Web App using the MERN Stack! - Coding Tutorials by Umar Khan durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Coding Tutorials by Umar Khan 26 mai 2023, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 8,651 fois et il a aimé 299 téléspectateurs. Bon visionnage!