Skip to content

This API serves as the backend for a simple yet powerful blog application.

Notifications You must be signed in to change notification settings

Paula-Refaat/blog-app-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blog-App

project-image

Introduction:

Welcome to the Blog App API! This API serves as the backend for a simple yet powerful blog application. It enables users to seamlessly create, read, update, and delete blog posts. Whether you're building a personal blog, a collaborative writing platform, or experimenting with backend development, this API provides a solid foundation.

💻Technologies

Technologies and tools used in the project:

  • Node.js
  • express
  • MongoDB
  • mongoose
  • bcryptjs
  • dotenv
  • express-async-handler
  • express-validator
  • jsonwebtoken
  • morgan
  • multer
  • nodemailer
  • slugify
  • cloudinary

🧐 Features

Here're some of the project's best features:

  • Authentication: The authentication feature enables users to create an account, login, and manage their credentials securely. It includes functionalities such as user registration, login, password reset, and authentication token management. Users can access protected resources and perform actions based on their authorization level..

  • User Management: The user management feature allows administrators to manage user accounts, roles, and permissions. It includes functionalities such as creating user profiles, updating user information, enabling or disabling user accounts, and assigning appropriate roles and permissions.

  • Listing Posts: Retrieve a list of all existing blog posts, offering users an overview of their content library. This feature supports pagination, allowing users to navigate through large sets of posts.

  • Detailed Post Information:- Obtain detailed information about a specific blog post by querying its unique identifier. This includes the post's title, content, creation timestamp, and any other relevant metadata.

  • Updating Posts: Modify the content of existing blog posts, allowing users to keep their articles current and relevant. Developers can implement secure update mechanisms, ensuring that only authorized users can make changes.

  • Deleting Posts: Remove unwanted or outdated blog posts with ease. This feature includes robust validation and authorization checks to prevent unauthorized deletion and maintain data integrity. Adding Comments: Users can easily add comments to blog posts, allowing them to share their opinions, ask questions, or contribute to discussions. This feature encourages community engagement and user interaction.

  • Viewing Comments: Retrieve a list of comments associated with a specific blog post, providing users with a comprehensive view of the discussions surrounding the content. This feature supports pagination for efficient navigation through a potentially large number of comments.

  • Comment Details: Obtain detailed information about a specific comment, including the commenter's name, timestamp, and the comment text. This information enhances transparency and helps users understand the context of each comment.

  • Editing Comments: Allow users to edit their own comments, providing flexibility in case of typos or the need for clarifications. Implement secure update mechanisms to ensure that only the comment author can make modifications.

  • Deleting Comments: Users with the necessary permissions can delete their own comments, fostering a sense of control over the content they contribute. Implement authorization checks to prevent unauthorized deletion.

  • Error Handling: The error handling feature ensures that the API handles errors gracefully by providing appropriate error messages and responses. It includes handling validation errors, authentication errors, database errors, and other exceptional scenarios. Meaningful error messages are returned to users, facilitating troubleshooting and improving the user experience.

  • Validation: The validation feature ensures that user input and data received by the API are validated against predefined rules and constraints using Joi. It includes input validation for various fields, such as checking for required fields, data types, length restrictions, and format validations. By leveraging the power of Joi, the Blog-App API project ensures data integrity, enhances security, and improves the overall reliability of the system by validating user input..

  • Pagination: The pagination feature allows users to retrieve a subset of data from large collections. It enables efficient data retrieval by dividing the results into pages and providing mechanisms to navigate through the pages. Pagination enhances performance and user experience, especially when dealing with a large number of products or search results.

🛠️ Installation Steps:

  1. node.js
npm init
  1. express
npm install express

3. mongoose

npm install mongoose

4. bcryptjs

npm install bcryptjs

5. jsonwebtoken

npm install jsonwebtoken

6. express-validator

npm install express-validator

7. express-async-handler

npm install express-async-handler

8. morgan

npm install morgan

9. nodemailer

npm install nodemailer

10. multer

npm install multer

11. dotenv

npm install dotenv

12. mrgan

npm install morgan

13. slugify

npm install slugify

14. cloudinary

npm install cloudinary

Contributing

If you are interested in contributing to the Blog App platform, please feel free to submit a pull request. We welcome all contributions!

Contact

If you have any questions or feedback, please feel free to contact us at [poularefaat86@gmail.com].

Releases

No releases published

Packages

No packages published