A full-stack web application that uses OpenAI's GPT API to generate SEO-optimized blog posts with real-time editing capabilities.
SmartBlog AI - AI-Powered Blog Generation Platform
- 🔐 User Authentication (Register/Login/JWT)
- 🧠 AI Blog Generator with customizable parameters (GPT-4)
- 📊 SEO Analysis with readability scores and keyword density
- 🎨 Modern UI with Tailwind CSS and responsive design
- 🛡️ Security with rate limiting, CORS, and input validation
- 📱 Dashboard with AI generation and blog management
- ✍️ Rich Text Editor (Quill.js integration)
- 📚 Blog Management (Full CRUD interface)
- 🔍 Advanced SEO Tools (Visual analysis and suggestions)
- 📤 Export Features (TXT, MD, HTML formats)
- 👤 Profile Management (Settings and password change)
- 🔄 Version Control (Blog revision history)
- Frontend: React.js + Tailwind CSS + React Router + React Query
- Backend: Node.js + Express.js + MongoDB + Mongoose
- Authentication: JWT + bcrypt
- AI: OpenAI GPT-4 API
- Development: VS Code tasks, nodemon, ESLint
- Node.js (v16+)
- MongoDB (local or Atlas)
- OpenAI API key
# Clone the repository
git clone <repository-url>
cd SmartBlog AI
# Install backend dependencies
cd backend
npm install
# Install frontend dependencies
cd ../frontend
npm installCreate .env files in both backend and frontend directories:
Backend (.env)
NODE_ENV=development
PORT=5000
MONGODB_URI=mongodb://localhost:27017/smartblog-ai
JWT_SECRET=your_super_secret_jwt_key_here
OPENAI_API_KEY=your_openai_api_key_here
CLIENT_URL=http://localhost:3000Frontend (.env)
REACT_APP_API_URL=http://localhost:5000/api
REACT_APP_APP_NAME=SmartBlog AIOption A: VS Code Tasks (Recommended)
- Open in VS Code
- Press
Ctrl+Shift+P→ "Tasks: Run Task" → "Start Full Stack"
Option B: Manual
# Terminal 1 - Backend
cd backend
npm run dev
# Terminal 2 - Frontend
cd frontend
npm start- Frontend: http://localhost:3000
- Backend API: http://localhost:5000/api
- Health Check: http://localhost:5000/api/health
For comprehensive setup instructions, environment configuration, and troubleshooting, see SETUP.md.
- Register/Login to create an account
- Generate blogs using the AI-powered form:
- Enter your topic or keywords
- Choose tone (professional, casual, witty, etc.)
- Set word count (500-2000 words)
- Add specific keywords
- Click "Generate Blog"
- Save and edit generated content
- Analyze SEO performance with built-in tools
SmartBlog AI/
├── backend/ # Node.js Express API
│ ├── models/ # MongoDB schemas (User, Blog)
│ ├── routes/ # API endpoints (auth, blogs, ai, seo)
│ ├── middleware/ # Auth, validation, error handling
│ └── server.js # Express server configuration
├── frontend/ # React application
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ ├── pages/ # Page components
│ │ ├── contexts/ # React context (Auth)
│ │ ├── utils/ # API utilities
│ │ └── index.css # Tailwind styles
│ └── public/ # Static assets
└── .vscode/
└── tasks.json # Development tasks
POST /api/auth/register- User registrationPOST /api/auth/login- User loginGET /api/auth/me- Get user profilePUT /api/auth/profile- Update profilePOST /api/auth/change-password- Change password
GET /api/blogs- Get blogs (with filtering)GET /api/blogs/:id- Get single blogPOST /api/blogs- Create new blogPUT /api/blogs/:id- Update blogDELETE /api/blogs/:id- Delete blogGET /api/blogs/:id/export- Export blog
POST /api/ai/generate- Generate blog contentPOST /api/ai/improve- Improve existing contentPOST /api/ai/title-suggestions- Get title suggestionsGET /api/ai/usage- Get usage statistics
POST /api/seo/analyze- Analyze content for SEOPOST /api/seo/keywords- Extract keywordsGET /api/seo/readability-guide- Get readability guide
Phase 1 Complete ✅
- Full authentication system
- AI blog generation working
- SEO analysis functional
- Modern responsive UI
- Secure API with rate limiting
Ready for Phase 2 🚧
- Rich text editor integration
- Advanced blog management
- Enhanced SEO tools
- Export functionality
- Visit the landing page
- Register a new account
- Try the AI blog generator with different parameters
- Check the generated content quality
- Test authentication flow
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License.
For issues, questions, or feature requests:
- Check the SETUP.md guide
- Review the API documentation above
- Create an issue in the repository
Built with ❤️ for content creators everywhere.
