Skip to content

suryaprakash0010/Blog_master

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

62 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“ Blog Masters - Modern Blogging Platform

πŸš€ A modern, AI-powered blogging platform built with React, Node.js, and Express. Create, manage, and share your stories with an intuitive admin panel and seamless user experience.

✨ Features

🎯 Core Features

  • πŸ“° Dynamic Blog Creation - Rich text editor with Quill.js
  • πŸ€– AI Content Generation - Powered by Google Gemini AI
  • 🎨 Modern UI/UX - Beautiful, responsive design with Tailwind CSS
  • πŸ“± Mobile-First - Fully responsive across all devices
  • πŸ” Smart Search - Real-time blog search functionality
  • πŸ“‚ Category Management - Organize blogs by categories
  • πŸ’¬ Comment System - User engagement with moderation

πŸ” Admin Panel

  • πŸ›‘οΈ Secure Authentication - JWT-based admin login
  • πŸ“Š Dashboard Analytics - Blog statistics and insights
  • ✏️ Content Management - Create, edit, delete blogs
  • πŸ“‹ Blog List Management - Publish/unpublish functionality
  • πŸ’¬ Comment Moderation - Approve or delete comments
  • πŸ–ΌοΈ Image Upload - ImageKit integration for optimized images

πŸŽͺ User Experience

  • 🏠 Homepage - Featured blogs and categories
  • πŸ“– Blog Reading - Clean, distraction-free reading experience
  • πŸ”— Social Sharing - Share blogs on social platforms
  • πŸ’Œ Newsletter Signup - Stay updated with latest posts
  • ⚑ Fast Loading - Optimized performance

πŸ› οΈ Tech Stack

Frontend

  • βš›οΈ React - Modern UI library
  • 🎨 Tailwind CSS - Utility-first CSS framework
  • 🚦 React Router - Client-side routing
  • πŸ“ Quill.js - Rich text editor
  • 🎭 Framer Motion - Smooth animations
  • πŸ”₯ React Hot Toast - Beautiful notifications
  • ⏰ Moment.js - Date manipulation

Backend

  • 🟒 Node.js - JavaScript runtime
  • πŸš€ Express.js - Web application framework
  • πŸƒ MongoDB - NoSQL database with Mongoose ODM
  • πŸ” JWT - JSON Web Tokens for authentication
  • 🌐 CORS - Cross-origin resource sharing
  • πŸ“ Multer - File upload handling

AI & Services

  • πŸ€– Google Gemini AI - Content generation
  • πŸ–ΌοΈ ImageKit - Image optimization and CDN
  • ☁️ Vercel - Deployment platform

πŸš€ Getting Started

Prerequisites

  • πŸ“¦ Node.js (v16 or higher)
  • πŸƒ MongoDB database
  • πŸ”‘ Environment variables setup

Installation

  1. Setup Frontend

    cd client
    npm install
  2. Setup Backend

    cd server
    npm install

Environment Variables

Create .env files in both server and client directories:

Server (.env)

PORT=3000
MONGODB_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret_key
ADMIN_EMAIL=[email protected]
ADMIN_PASSWORD=your_admin_password
GEMINI_API_KEY=your_gemini_api_key
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

Running the Application

  1. Start the frontend development server

    cd client
    npm run dev
  2. Start the backend server

    cd server
    npm start
  3. Open your browser and navigate to http://localhost:5173

πŸ“ Project Structure

Blog_Master/
β”œβ”€β”€ πŸ“‚ client/                 # Frontend React application
β”‚   β”œβ”€β”€ πŸ“‚ public/            # Static assets
β”‚   β”œβ”€β”€ πŸ“‚ src/
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ components/    # Reusable components
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ pages/         # Page components
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ context/       # React context
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ assets/        # Images and static files
β”‚   β”‚   └── πŸ“„ main.jsx       # App entry point
β”‚   └── πŸ“„ package.json
β”œβ”€β”€ πŸ“‚ server/                # Backend Node.js application
β”‚   β”œβ”€β”€ πŸ“‚ configs/           # Database and service configs
β”‚   β”œβ”€β”€ πŸ“‚ controllers/       # Route controllers
β”‚   β”œβ”€β”€ πŸ“‚ middleware/        # Custom middleware
β”‚   β”œβ”€β”€ πŸ“‚ models/            # MongoDB models
β”‚   β”œβ”€β”€ πŸ“‚ routes/            # API routes
β”‚   └── πŸ“„ server.js          # Server entry point
└── πŸ“„ README.md

🎯 API Endpoints

πŸ“ Blog Routes

  • GET /api/blog/all - Get all published blogs
  • GET /api/blog/:blogId - Get single blog
  • POST /api/blog/add - Add new blog (Admin)
  • POST /api/blog/delete - Delete blog (Admin)
  • POST /api/blog/toggle-publish - Toggle publish status (Admin)
  • POST /api/blog/add-comment - Add comment to blog
  • POST /api/blog/comments - Get blog comments
  • POST /api/blog/generate - Generate AI content (Admin)

πŸ” Admin Routes

  • POST /api/admin/login - Admin login
  • GET /api/admin/blogs - Get all blogs (Admin)
  • GET /api/admin/comments - Get all comments (Admin)
  • GET /api/admin/dashboard - Get dashboard data (Admin)
  • POST /api/admin/approve-comment - Approve comment (Admin)
  • POST /api/admin/delete-comment - Delete comment (Admin)

🎨 Features Showcase

πŸ€– AI-Powered Content Generation

Blog Masters integrates with Google Gemini AI to help content creators:

  • Generate blog content from titles
  • Create engaging descriptions
  • Enhance writing productivity

πŸ–ΌοΈ Image Optimization

  • Automatic image compression
  • WebP format conversion
  • CDN delivery via ImageKit
  • Responsive image loading

πŸ’¬ Comment System

  • Real-time comment submission
  • Admin moderation panel
  • Approval workflow
  • User engagement tracking

πŸš€ Deployment

Frontend (Vercel)

  1. Connect your GitHub repository to Vercel
  2. Set environment variables in Vercel dashboard
  3. Deploy with automatic CI/CD

Backend (Vercel)

  1. Add vercel.json configuration
  2. Set environment variables
  3. Deploy via Vercel CLI or GitHub integration

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

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

πŸ“§ Contact

Surya Prakash Kahar

πŸ™ Acknowledgments

  • 🎨 Design inspiration from modern blogging platforms
  • πŸ€– Google Gemini AI for content generation capabilities
  • πŸ–ΌοΈ ImageKit for image optimization services
  • πŸ“š Open source community for amazing libraries and tools

⭐ Star this repo if you found it helpful!

Made with ❀️ by Surya Prakash Kahar

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published