A full-stack AI-powered blog application with content generation capabilities, admin dashboard, and modern responsive design.
- Live Demo: https://ai-blog-app-two.vercel.app/
- AI Content Generation - Generate blog content using Google Gemini AI
- Rich Text Editor - Quill.js for professional content creation
- Image Management - Upload and optimize images with ImageKit
- Admin Dashboard - Complete admin panel with analytics
- Comment System - User engagement with admin moderation
- Responsive Design - Mobile-first approach with Tailwind CSS
- Real-time Notifications - Toast notifications for user feedback
- Secure Authentication - JWT-based admin authentication
- React 19 + Vite 6
- Tailwind CSS 4
- React Router DOM
- Quill.js (Rich Text Editor)
- Axios + React Hot Toast
- Node.js + Express.js
- MongoDB + Mongoose
- Google Generative AI (Gemini)
- ImageKit (Image Storage)
- JWT Authentication + Multer
ai-blog-app/
βββ frontend/ # React application
β βββ src/
β β βββ components/ # Reusable UI components
β β βββ pages/ # Page components
β β β βββ admin/ # Admin dashboard pages
β β β βββ Blog.jsx # Individual blog page
β β β βββ Home.jsx # Homepage
β β βββ context/ # React Context
β β βββ assets/ # Static files
β βββ package.json
β βββ README.md
βββ backend/ # Node.js API
β βββ config/ # Database & API configurations
β βββ controller/ # Route controllers
β βββ middleware/ # Authentication & file upload
β βββ models/ # MongoDB schemas
β βββ routes/ # API routes
β βββ package.json
β βββ README.md
βββ README.md # This file
- Node.js (v18+)
- MongoDB database
- Google Gemini API key
- ImageKit account
git clone <repository-url>
cd ai-blog-appcd backend
npm installCreate backend/.env:
PORT=3000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret_key
# Admin Credentials
ADMIN_EMAIL=admin@gmail.com
ADMIN_PASSWORD=admin123
# ImageKit Credentials
IMAGE_KIT_PUBLIC_KEY=your_imagekit_public_key
IMAGE_KIT_PRIVATE_KEY=your_imagekit_private_key
IMAGE_KIT_URL_ENDPOINT=your_imagekit_url_endpoint
# Gemini API Key
GEMINI_API_KEY=your_gemini_api_keyStart backend:
npm run server # Development
npm start # Productioncd ../frontend
npm installCreate frontend/.env:
VITE_API_URL=http://localhost:3000Start frontend:
npm run dev # Development
npm run build # Production build# Set production environment variables
NODE_ENV=production
PORT=3000
MONGO_URI=your_production_mongodb_uri
# ... other variables
# Deploy
npm install
npm startcd frontend
npm run build
vercel --prodcd frontend
npm run build
# Upload dist/ folder to Netlifynpm run server # Development with nodemon
npm start # Production servernpm run dev # Development server
npm run build # Production build
npm run preview # Preview build
npm run lint # Run linterPORT=3000
MONGO_URI=mongodb://localhost:27017/ai-blog
JWT_SECRET=your_secret_key
ADMIN_EMAIL=admin@gmail.com
ADMIN_PASSWORD=admin123
IMAGE_KIT_PUBLIC_KEY=your_key
IMAGE_KIT_PRIVATE_KEY=your_key
IMAGE_KIT_URL_ENDPOINT=your_endpoint
GEMINI_API_KEY=your_gemini_keyVITE_API_URL=http://localhost:3000- Create blogs with rich text editor
- AI-powered content generation
- Image upload with optimization
- Category and publish management
- Responsive design for all devices
- Fast loading with modern tech stack
- Real-time notifications
- Intuitive admin interface
- JWT authentication
- File upload handling
- AI integration
- Image optimization
- Comment moderation
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open Pull Request
- Open an issue for bugs or questions
- Check individual README files for detailed setup
- Review common troubleshooting steps above
Built using React, Node.js