Skip to content

ankit1324/Blogify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Name: Blogify

Blogging Site with Full JWT Auth and MongoDB Database

Table of Contents:

  • Introduction
  • Installation
  • Usage
  • Authentication
  • MongoDB Integration
  • Adding a Blog Post
  • Adding a Comment
  • Conclusion

1. Introduction:

This project is a simple yet powerful blogging site with full JWT (JSON Web Token) authentication and MongoDB integration. It allows users to create accounts, log in securely, create blog posts, and comment on existing posts. The use of JWT ensures that user authentication is secure, and MongoDB provides a flexible and scalable database solution for storing user data, blog posts, and comments.

2. Installation:

To get started with the project, follow these steps:

Clone the repository from GitHub: [link] Install the necessary dependencies using npm or yarn: npm install or yarn install Configure your MongoDB connection settings in the .env file Start the server: npm start or yarn start

3. Usage:

Once the server is running, users can access the blogging site through their web browsers. They can sign up for a new account, log in securely using JWT authentication, create new blog posts, and comment on existing posts. The site provides a user-friendly interface for managing blog content.

4. Authentication:

Authentication in this project is handled using JWT. When users sign up or log in, they receive a JWT token that is stored securely in their browser's local storage. This token is then included in subsequent requests to the server to authenticate the user. JWT provides a secure and efficient way to manage user authentication without the need for sessions or cookies.

5. MongoDB Integration:

MongoDB is used as the database backend for this project. It stores user data, blog posts, and comments in a flexible and scalable NoSQL database. The MongoDB connection settings can be configured in the .env file to connect to a local or remote MongoDB instance. Mongoose.js is used as the ODM (Object-Document Mapper) to interact with MongoDB from Node.js.

6. Adding a Blog Post:

To add a new blog post, users can navigate to the "New Post" page and fill out the required fields, including the title, content, and any relevant tags. Once the post is submitted, it is stored in the MongoDB database and displayed on the main blog page for other users to read.

7. Adding a Comment:

Users can add comments to existing blog posts by navigating to the post's page and filling out the comment form. Comments are stored in the MongoDB database along with the user's information and the timestamp of the comment. Comments are displayed below the blog post for other users to view and interact with.

8. Conclusion:

In conclusion, this project provides a robust and secure platform for users to create and share blog posts. With JWT authentication and MongoDB integration, it offers a modern and scalable solution for building blogging sites. Developers can further extend the functionality of the site by adding features such as user profiles, likes, and notifications.

About

Blogging Site with Full JWT Auth and MongoDB Database

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published