Skip to content

venkideshVenu/QuickBlog-AI-Powered-Blog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

QuickBlog - AI-Powered Blog Platform

QuickBlog MERN Stack React Node.js MongoDB Tailwind CSS

QuickBlog is a modern, full-stack blogging platform built with the MERN stack, featuring AI-powered content generation using Google's Gemini AI, advanced image management with ImageKit, and a comprehensive admin dashboard for content management.

πŸš€ Features

🎯 Core Features

  • AI-Powered Content Generation: Leverage Google Gemini AI for intelligent blog content creation
  • Rich Text Editor: Integrated Quill.js editor for beautiful blog writing experience
  • Image Management: Advanced image handling with ImageKit for optimization and CDN delivery
  • Responsive Design: Mobile-first design with Tailwind CSS
  • Real-time Notifications: Toast notifications for user feedback

πŸ‘€ User Features

  • Browse and read blog posts
  • View blog posts by categories
  • Comment on blog posts
  • Search and filter functionality
  • Newsletter subscription
  • Mobile-responsive interface

πŸ”§ Admin Features

  • Dashboard: Comprehensive analytics and overview
  • Blog Management: Create, edit, delete, and publish/unpublish blogs
  • Comment Moderation: Approve or delete user comments
  • Content Generation: AI-assisted blog content creation
  • Image Upload: Drag-and-drop image uploads with optimization
  • Authentication: Secure JWT-based admin authentication

🎨 Technical Features

  • Server-Side Rendering: Optimized for SEO
  • Image Optimization: Automatic WebP conversion and responsive images
  • Performance: Code splitting and lazy loading
  • Security: Protected admin routes and data validation
  • Deployment Ready: Configured for Vercel deployment

πŸ› οΈ Tech Stack

Frontend

  • React 19.1.0 - Modern UI library with latest features
  • Vite - Lightning-fast build tool and dev server
  • React Router DOM - Client-side routing
  • Tailwind CSS 4.1.8 - Utility-first CSS framework
  • Quill.js - Rich text editor for blog content
  • Axios - HTTP client for API calls
  • React Hot Toast - Beautiful notifications
  • Marked - Markdown parser for content rendering
  • Moment.js - Date and time handling
  • Motion - Animation library

Backend

  • Node.js - JavaScript runtime
  • Express.js 5.1.0 - Web application framework
  • MongoDB - NoSQL database with Mongoose ODM
  • JWT - JSON Web Tokens for authentication
  • Multer - File upload middleware
  • CORS - Cross-origin resource sharing
  • dotenv - Environment variable management

AI & External Services

  • Google Gemini AI - AI content generation
  • ImageKit - Image optimization and CDN
  • Vercel - Deployment platform

πŸ“ Project Structure

QuickBlog/
β”œβ”€β”€ client/                 # Frontend React application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/     # Reusable UI components
β”‚   β”‚   β”‚   β”œβ”€β”€ admin/      # Admin-specific components
β”‚   β”‚   β”‚   β”œβ”€β”€ BlogCard.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ BlogList.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Footer.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Header.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Navbar.jsx
β”‚   β”‚   β”‚   └── Newsletter.jsx
β”‚   β”‚   β”œβ”€β”€ pages/          # Page components
β”‚   β”‚   β”‚   β”œβ”€β”€ admin/      # Admin dashboard pages
β”‚   β”‚   β”‚   β”œβ”€β”€ Blog.jsx    # Individual blog page
β”‚   β”‚   β”‚   └── Home.jsx    # Landing page
β”‚   β”‚   β”œβ”€β”€ assets/         # Static assets and images
β”‚   β”‚   β”œβ”€β”€ context/        # React Context for state management
β”‚   β”‚   β”œβ”€β”€ App.jsx         # Main application component
β”‚   β”‚   └── main.jsx        # Application entry point
β”‚   β”œβ”€β”€ package.json        # Frontend dependencies
β”‚   β”œβ”€β”€ vite.config.js      # Vite configuration
β”‚   β”œβ”€β”€ vercel.json         # Vercel deployment config
β”‚   └── eslint.config.js    # ESLint configuration
β”œβ”€β”€ server/                 # Backend Node.js application
β”‚   β”œβ”€β”€ configs/            # Configuration files
β”‚   β”‚   β”œβ”€β”€ db.js           # MongoDB connection
β”‚   β”‚   β”œβ”€β”€ gemini.js       # Google Gemini AI setup
β”‚   β”‚   └── imageKit.js     # ImageKit configuration
β”‚   β”œβ”€β”€ controllers/        # Business logic
β”‚   β”‚   β”œβ”€β”€ adminController.js
β”‚   β”‚   └── blogController.js
β”‚   β”œβ”€β”€ middleware/         # Custom middleware
β”‚   β”‚   β”œβ”€β”€ auth.js         # JWT authentication
β”‚   β”‚   └── multer.js       # File upload handling
β”‚   β”œβ”€β”€ models/             # MongoDB data models
β”‚   β”‚   β”œβ”€β”€ Blog.js         # Blog schema
β”‚   β”‚   └── Comment.js      # Comment schema
β”‚   β”œβ”€β”€ routes/             # API route definitions
β”‚   β”‚   β”œβ”€β”€ adminRouter.js  # Admin routes
β”‚   β”‚   └── blogRouter.js   # Blog routes
β”‚   β”œβ”€β”€ server.js           # Server entry point
β”‚   β”œβ”€β”€ package.json        # Backend dependencies
β”‚   └── vercel.json         # Vercel deployment config
└── README.md               # Project documentation

πŸš€ Installation & Setup

Prerequisites

  • Node.js (v16 or higher)
  • MongoDB (local or Atlas)
  • Google Gemini API key
  • ImageKit account

Environment Variables

Create .env files in both client and server directories:

Server (.env)

PORT=3000
MONGODB_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret_key
ADMIN_EMAIL=admin@example.com
ADMIN_PASSWORD=your_admin_password

# Google Gemini AI
GEMINI_API_KEY=your_gemini_api_key

# ImageKit Configuration
IMAGEKIT_PUBLIC_KEY=your_imagekit_public_key
IMAGEKIT_PRIVATE_KEY=your_imagekit_private_key
IMAGEKIT_URL_ENDPOINT=your_imagekit_url_endpoint

Client (.env)

VITE_BASE_URL=http://localhost:3000

Installation Steps

  1. Clone the repository

    git clone https://github.com/venkideshVenu/QuickBlog-AI-Powered-Blog.git
    cd QuickBlog
  2. Install server dependencies

    cd server
    npm install
  3. Install client dependencies

    cd ../client
    npm install
  4. Start the development servers

    Backend server:

    cd server
    npm run server

    Frontend development server:

    cd client
    npm run dev
  5. Access the application

    • Frontend: http://localhost:5173
    • Backend API: http://localhost:3000
    • Admin Dashboard: http://localhost:5173/admin

πŸ“š API Documentation

Public Endpoints

Blogs

  • GET /api/blog/all - Get all published blogs
  • GET /api/blog/:blogId - Get specific blog by ID
  • POST /api/blog/comments - Get comments for a blog
  • POST /api/blog/add-comment - Add a comment to a blog

Protected Admin Endpoints (Require JWT)

Authentication

  • POST /api/admin/login - Admin login

Blog Management

  • POST /api/blog/add - Create new blog (with image upload)
  • POST /api/blog/delete - Delete blog by ID
  • POST /api/blog/toggle-publish - Toggle blog publish status
  • POST /api/blog/generate - Generate AI content with Gemini

Admin Dashboard

  • GET /api/admin/dashboard - Get dashboard statistics
  • GET /api/admin/blogs - Get all blogs (including unpublished)
  • GET /api/admin/comments - Get all comments
  • POST /api/admin/approve-comment - Approve a comment
  • POST /api/admin/delete-comment - Delete a comment

🎨 Key Components

Frontend Components

  • BlogCard: Displays blog preview with image, title, and excerpt
  • BlogList: Grid layout for blog cards with pagination
  • Header: Site navigation and branding
  • Footer: Site footer with links and information
  • Newsletter: Email subscription component
  • Admin Components: Dashboard, blog management, and comment moderation

Backend Models

Blog Model

{
  title: String (required),
  subTitle: String,
  description: String (required),
  category: String (required),
  image: String (required),
  isPublished: Boolean (default: false),
  timestamps: true
}

Comment Model

{
  blog: ObjectId (ref: Blog, required),
  name: String (required),
  content: String (required),
  isApproved: Boolean (default: false),
  timestamps: true
}

πŸ”§ Configuration

Vite Configuration

The frontend uses Vite with React and Tailwind CSS plugins for optimal development experience and build performance.

Vercel Deployment

Both client and server are configured for seamless Vercel deployment with proper routing and build settings.

Image Optimization

ImageKit integration provides:

  • Automatic WebP conversion
  • Responsive image generation
  • CDN delivery
  • Real-time image transformations

πŸš€ Deployment

Frontend (Vercel)

  1. Connect your GitHub repository to Vercel
  2. Set build command: npm run build
  3. Set output directory: dist
  4. Add environment variables

Backend (Vercel)

  1. Deploy server directory to Vercel
  2. Configure vercel.json for proper routing
  3. Add all environment variables
  4. Ensure MongoDB Atlas connectivity

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Google Gemini AI for intelligent content generation
  • ImageKit for powerful image management
  • Vercel for seamless deployment
  • MongoDB for flexible data storage
  • React and Tailwind CSS for modern UI development

πŸ“ž Support

For support, email support@quickblog.com or join our Slack channel.


Built with ❀️ by the QuickBlog Team

Making blogging intelligent and effortless with AI-powered content creation.

About

QuickBlog is an AI-powered blogging platform that helps writers create, publish, and share engaging content with ease. Our advanced tools support content generation, smart recommendations, and seamless publishing workflows to elevate your writing experience.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors