A RESTful Blogging API built with Node.js, Express, and MongoDB.
This project showcases backend development, authentication, authorization, and CRUD operations with Postman-tested APIs.
- π Features
- π Tech Stack
- π Database Models
- π API Endpoints
- π Security
- π Setup & Run
- β Sample Response
- π₯ Demo
- π₯ Contributors
- π€ Author Management
- Create authors with validation & unique emails
- π Blog Management
- Create blogs for registered authors
- Get all published & non-deleted blogs
- Filter blogs by author, category, tags, subcategories
- Update blogs (title, body, tags, subcategories, publish status)
- Soft delete blogs (by ID or query filters)
- π JWT Authentication (login with email & password)
- π‘ Protected Routes (secured with middleware)
- β Authorization (only blog owners can edit/delete their blogs)
- Backend: Node.js, Express.js
- Database: MongoDB with Mongoose
- Authentication: JWT (JSON Web Tokens)
- Other Tools: bcrypt (password hashing), Postman (API testing)
{
fname: { type: String, required: true },
lname: { type: String, required: true },
title: { type: String, enum: ["Mr", "Mrs", "Miss"], required: true },
email: { type: String, required: true, unique: true },
password: { type: String, required: true }
}