
Master full-stack development with the mern stack by building a feature-rich blogging platform featuring authentication, profiles, posts, categories, search, likes, comments, and deployment.
Watch a live demo of the MERN blog app, navigate private and public bars, log in, verify accounts, schedule posts, and explore posts with likes, comments, and follows.
Set up the blogify mern stack by creating api and client folders, develop the api first before connecting the client, and use GitHub for version control.
Customize your Visual Studio Code environment for MERN stack blogify project by selecting a theme and icons, enabling better comments, and using the MongoDB extension, then apply a settings.json tweak.
Explore the folder structure for the mern stack blogify project, detailing config, models, controllers, middlewares, routes, and utils, with env handling and the mvc design pattern guiding server.js setup.
Mvc in Node.js separates data and business logic into model, user interface as React view, and an intermediary controller handling routes and requests.
Initialize the project with npm and install express, mongoose, and dotenv to support an MVC design pattern, then set up an http server with Express and process.env.port, defaulting to 9080.
Explore data structure and data modeling for a MERN stack blog app, defining models for posts, comments, categories, and users, and mapping one-to-many and one-to-one relationships.
Create a data modeling branch in the GitHub repository, switch to it, review branches, and prepare to post the data structure code to this branch.
Explore data modeling for a MERN stack blog app by building a user schema in mongoose, including references, profile fields, posts, followers, notifications, and password reset and account verification tokens.
Model post schema in the MERN stack blogify project by adapting the user model to include title, content, author reference, and fields for likes, dislikes, shares, schedule publish, and comments.
Learn to model categories and comments for a mern stack blog app by building category and comment schemas, with title, author, creator, text, and post references.
Learn authentication and authorization in a MERN app by managing user roles (normal user, admin, moderator) with middleware and implementing token-based flows using JSON web tokens in Express.
Explore how json web token (jwt) enables token-based authentication by generating a token at login and validating it with each request, using the client (Postman) and header-based verification.
Learn how json web tokens enable secure claims between a server and user, via header, payload, and signature on jwt.io, signed by a secret and decoded to verify identity.
Explore building a dummy user registration controller in an mvc structure using express. Create a public post endpoint /api/v1/users/register, wire a users router and server.js, and return a json message.
Test the dummy user registration controller using Postman in the MERN blogify project. Configure a register request to localhost:9080/api/v1/register and verify a 200 response.
Create a Database.js file and implement a connect DB function using mongoose to connect to MongoDB, with error handling and server integration.
Create a MongoDB connection string by setting up a free cluster, whitelisting your IP, and connecting a Node.js app to the main block database.
Install nodemon to auto-restart the server on changes and configure a server script, then connect MongoDB for VS Code to visualize and manage collections.
Implement user registration in the MERN stack blogify project by validating input, creating or rejecting users based on existence, and returning 201 with user id, username, and email.
Hash the user password with bcrypt.js before saving, using genSalt(10) to create a salt and store the hashed string instead of the plain password.
Learn to implement login for the Blogify app by validating username and password with bcrypt, handling errors with consistent messages, updating last login, and preparing for token-based authorization.
Generate a secure json web token for a user by building a payload with the user id, signing it with a secret key, and setting an expiry of one hour.
Implement and protect a dummy profile controller to enforce authorization via token verification after login. Use middleware to check the token and secure the get profile endpoint.
Implement a login middleware in the MERN blog project to verify tokens from the header, protect the profile controller, and chain middlewares using next in Express.
Demonstrates passing a token in the request header via Postman, extracting the bearer token from authorization, and using split to obtain the token for JWT verification.
Verify a jwt using the verify method by passing the token and signing key, handle errors, and attach the decoded user id to the request for downstream routes.
Learn to save the logged-in user into the request object via middleware, decoding the token, fetching the user by id, and attaching req.user for controllers.
Improve the get user profile controller by using req.user.id from the authenticated request instead of params, and remove the id parameter from the route for protected access via token.
Implement a global express error handler middleware, wired after routes, to return structured errors with status, message, and stack for graceful server error handling.
This lecture demonstrates installing express-async-handler and refactoring controllers to replace repetitive try-catch blocks, routing errors to the global error handler for clearer 500 internal server errors.
Explore how to implement a not-found middleware in an express app to return json errors for nonexistent routes, using a global error handler and custom messages.
Refactor not found and global error handlers into separate files in the MERN blogify project, and adjust middleware order to pass errors to the next handler.
Learn to implement category creation in the MERN blogify project by validating uniqueness, creating with name and author, and securing the route with isLogin middleware.
Implement delete and update operations for categories using find by id and delete, and find by id and update with the new name from the request body.
Learn to use Postman environments to centralize the base URL and token, streamline authenticated requests, and prepare for securing data with dot env in Node.js.
Secure a Node.js app by using dotenv and process.env to hide sensitive data like database connections and JWT keys, and add a .env file to .gitignore.
Course Title: The MERN Stack Blogify Project: Full Web Development Unleashed
Embark on a journey to become a proficient full-stack developer with our comprehensive MERN Blogify Project Course. This course leverages the power of MongoDB, Express.js, React.js, and Node.js (MERN) to guide you in creating a fully-featured blogging platform from scratch.
Throughout this immersive learning experience, you'll gain hands-on expertise in developing and integrating essential web application features using cutting-edge technologies. These include user authentication, file uploading, social features such as following and unfollowing users, a user blocking system, and post scheduling capabilities.
You'll learn how to build robust user profiles, complete with the ability to update profile information and manage user-to-user relationships. Dive deep into user experience considerations and data security as you implement password reset and account verification functionalities.
In line with the ever-evolving digital world, the course also covers more nuanced features like hiding posts from blocked users and concealing scheduled posts until the predetermined publishing time arrives.
This course not only equips you with the necessary coding skills but also trains you in best practices for development, teaching you to write efficient, maintainable code. You'll learn to troubleshoot and debug your application effectively, handle errors, and understand the intricacies of deploying a MERN stack application to the cloud.
By the end of this course, you will have built a fully-functional, real-world blogging platform and be armed with the skills to create and deploy your own web applications using the MERN stack. Whether you're an aspiring web developer or looking to enhance your full-stack skills, this course is designed to propel you toward your career goals.
Join us in the MERN Blogify Project Course and harness the power of full-stack development to bring your innovative ideas to life!