> For the complete documentation index, see [llms.txt](https://ashutosh-3.gitbook.io/blog-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ashutosh-3.gitbook.io/blog-api/readme.md).

# Introduction

Welcome to the comprehensive documentation for the Blog API! This is a production-ready RESTful API designed for managing blog posts, users, comments, and engagement features.

## 🚀 Getting Started

**Live API**: `https://blog-api-dc2g.onrender.com/api/v1`

New to the API? Start here:

1. [**Quick Start Guide**](/blog-api/api-reference/quick-start.md) - Get up and running in minutes
2. [**Authentication**](/blog-api/api-reference/authentication.md) - Understand the security model
3. [**API Reference**](/blog-api/api-reference/api-reference.md) - Complete endpoint documentation

## 📋 API Overview

* **Version**: 1.0.0
* **Authentication**: JWT Bearer tokens with refresh token support
* **Authorization**: Role-based access control (admin/user)
* **Rate Limiting**: 60 requests per minute per IP address
* **Content Format**: JSON with multipart/form-data for file uploads
* **Security**: HTTPS, HTTP-only cookies, CORS enabled

## 🔧 Core Features

### 🔐 **Authentication & Users**

* User registration and login
* JWT access tokens with automatic refresh
* Role-based permissions (admin/user)
* User profile management
* Social media links support

### 📝 **Blog Management**

* Rich HTML content support
* Image banner uploads (Cloudinary integration)
* Draft and published status
* SEO-friendly URL slugs
* View tracking and analytics

### 💬 **Engagement Features**

* Comment system with moderation
* Like/unlike functionality
* Real-time engagement metrics
* User interaction tracking

### 🛡️ **Security & Performance**

* Rate limiting protection
* Input validation and sanitization
* Error handling with detailed responses
* Optimized for production deployment

## 📚 Documentation Structure

### API Reference

* [**Overview**](/blog-api/api-reference/api-reference.md) - API introduction and navigation
* [**Quick Start**](/blog-api/api-reference/quick-start.md) - Get started in 5 minutes
* [**Authentication**](/blog-api/api-reference/authentication.md) - JWT tokens and auth flows
* [**Users**](/blog-api/api-reference/users.md) - User management endpoints
* [**Blogs**](/blog-api/api-reference/blogs.md) - Blog post CRUD operations
* [**Comments**](/blog-api/api-reference/comments.md) - Comment system features
* [**Likes**](/blog-api/api-reference/likes.md) - Engagement and likes management
* [**Data Models**](/blog-api/api-reference/data-models.md) - Complete schema definitions
* [**Error Responses**](/blog-api/api-reference/error-responses.md) - Error handling guide

### Guides

* [**Rate Limiting**](/blog-api/guides/rate-limiting.md) - API usage limits and headers
* [**Error Handling**](/blog-api/guides/error-handling.md) - Common errors and solutions

## 🎯 Use Cases

### For Developers

* **Frontend Applications**: Build web or mobile blog readers
* **Content Management**: Create admin dashboards for blog management
* **Integrations**: Connect with existing systems and workflows
* **Learning Projects**: Practice API integration and authentication

### For Content Creators

* **Blog Platforms**: Power your own blogging platform
* **Portfolio Sites**: Showcase articles and writing
* **Community Platforms**: Enable user-generated content
* **Educational Content**: Manage courses and tutorials

## 🛠️ Technology Stack

### Backend Architecture

* **Runtime**: Node.js with Express.js
* **Database**: MongoDB with Mongoose ODM
* **Authentication**: JWT with bcrypt password hashing
* **File Storage**: Cloudinary for image management
* **Validation**: express-validator for input validation
* **Security**: Helmet.js, CORS, rate limiting

### Infrastructure

* **Hosting**: Render.com deployment
* **CDN**: Cloudinary for image delivery
* **Monitoring**: Built-in logging and error tracking
* **Documentation**: GitBook integration

## 🚦 API Status

Check the API health status:

```bash
curl https://blog-api-dc2g.onrender.com/api/v1/
```

Response:

```json
{
  "message": "API is live",
  "status": "ok",
  "version": "1.0.0",
  "docs": "https://ashutosh-3.gitbook.io/blog-api/"
}
```

## 🔗 Quick Links

* [**Live API**](https://blog-api-dc2g.onrender.com/api/v1) - Production endpoint
* [**GitBook Documentation**](https://ashutosh-3.gitbook.io/blog-api/) - Interactive docs
* [**GitHub Repository**](https://github.com/darksword7/blog-api) - Source code
* [**OpenAPI Specification**](https://github.com/DarkSword7/blog-api-docs/blob/main/openapi.yaml) - Machine-readable API spec

## 📞 Support

Need help or found an issue?

* 📖 **Documentation**: Check the relevant sections in this documentation
* 🐛 **Bug Reports**: Create an issue on GitHub
* 💡 **Feature Requests**: Suggest improvements via GitHub issues
* 📧 **Contact**: Reach out to the development team

## 📄 License

This project is licensed under the Apache License 2.0. See the [LICENSE](https://github.com/DarkSword7/blog-api-docs/blob/main/LICENSE/README.md) file for details.

***

**Ready to start building?** Head over to the [**Quick Start Guide**](/blog-api/api-reference/quick-start.md) and create your first API integration in minutes!
