AI-powered content creation assistant built with the MERN stack, Google's Gemini AI, and Google Trends API.
This application helps e-commerce businesses generate high-quality, trend-driven content including text drafts, content modifications, and image prompts. The system uses real-time Google Trends data to ensure content relevance and market alignment.
- βοΈ Content Drafting - Generate new content from scratch using trending keywords and market insights
- π Content Modification - Transform existing content (elaborate, summarize, rephrase)
- π¨ Image Prompt Generation - Create detailed prompts for AI image generation tools
- π Real-time Trends - Integration with Google Trends API for current market data
- π Global Targeting - Support for 12+ countries and multiple languages
- π·οΈ Category Optimization - Specialized content for various e-commerce categories
- π Project Management - Track and organize all content creation projects
- π Analytics Dashboard - Monitor content performance and creation statistics
- π User Authentication - Secure user registration and login system
- π¨βπΌ Admin Panel - User management for administrators
- π± Responsive Design - Works seamlessly on desktop and mobile devices
- πΎ Persistent Storage - All projects and content saved to MongoDB
- π AI-Powered - Advanced content generation using Google's Gemini AI
- π¨ Modern UI - Clean and intuitive user interface with Bootstrap
- Node.js (v14 or higher)
- MongoDB database
- Google Gemini API key
- MongoDB URI - Create a database at MongoDB Atlas
- Gemini API Key - Get your API key from Google AI Studio
Note: Google Trends API is used automatically and doesn't require additional authentication.
Rename the .env.example file to .env and add the following:
NODE_ENV=development
PORT=5000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret_key
GEMINI_API_KEY=your_gemini_api_key
SERPAPI_KEY=your_serpapi_key
Important: Replace all placeholder values with your actual credentials.
-
Install backend dependencies:
npm install
-
Install frontend dependencies:
cd frontend npm install
-
Development mode (runs both frontend and backend):
npm run dev
-
Backend only:
npm run server
-
Frontend only:
cd frontend npm start
The application will be available at:
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
-
Seed the database with sample data (optional):
npm run data:import
-
Clear all data (if needed):
npm run data:destroy
Sample Users Created:
- Admin: admin@email.com / admin123
- Demo User: demo@email.com / demo123
- John Doe: john@email.com / user123
- Jane Smith: jane@email.com / user123
# Create production build
npm run build- Register/Login - Create an account or sign in to access the platform
- Choose Content Type - Select from three main content creation options:
- Content Drafting - Create new content from scratch
- Content Modification - Transform existing content
- Image Prompt Generation - Generate AI image prompts
- Fill in project details (title, location, language, tone, category)
- Describe your content intent and desired length
- Click "Generate Content Draft"
- Review generated content with trending keywords integrated
- Provide original content and project configuration
- Choose modification type (elaborate, summarize, or rephrase)
- Generate modified content with improved tone and trending elements
- Compare original vs. modified versions side-by-side
- Input base content and visual style preferences
- Configure project settings for target market
- Generate detailed AI image prompts
- Copy prompts for use in DALL-E, Midjourney, or other AI image tools
- View Projects - Access all your content projects from the dashboard
- Track Progress - Monitor project status and creation timestamps
- Organize Content - Filter projects by type and view detailed analytics
- Manage Content - View, edit, or delete projects as needed
ai-content-creator/
βββ backend/
β βββ config/
β β βββ db.js # MongoDB connection
β βββ controllers/
β β βββ contentController.js # Content creation logic
β β βββ geminiController.js # Gemini AI chat
β β βββ userController.js # User management
β βββ middleware/
β β βββ authMiddleware.js # Authentication
β β βββ errorMiddleware.js # Error handling
β βββ models/
β β βββ contentProjectModel.js # Content projects
β β βββ conversationModel.js # Chat conversations
β β βββ userModel.js # User data
β βββ routes/
β β βββ contentRoutes.js # Content creation endpoints
β β βββ geminiRoutes.js # AI chat endpoints
β β βββ userRoutes.js # User endpoints
β βββ services/
β β βββ trendsService.js # Google Trends integration
β βββ server.js # Express server
βββ frontend/
β βββ src/
β β βββ components/ # Reusable components
β β βββ screens/ # Page components
β β β βββ ContentDraftScreen.jsx
β β β βββ ContentModifyScreen.jsx
β β β βββ ImagePromptScreen.jsx
β β β βββ ProjectsScreen.jsx
β β β βββ ProjectDetailScreen.jsx
β β βββ slices/ # Redux state management
β β βββ App.js # Main app component
β βββ public/
βββ package.json
POST /api/users/register- Register new userPOST /api/users/login- User loginPOST /api/users/logout- User logout
POST /api/content/draft- Create new content draftPOST /api/content/modify- Modify existing contentPOST /api/content/image-prompt- Generate image prompts
GET /api/content/projects- Get user's projectsGET /api/content/projects/:id- Get specific projectDELETE /api/content/projects/:id- Delete project
POST /api/gemini/chat- Send message to AIGET /api/gemini/conversations- Get user's conversationsGET /api/gemini/conversations/:id- Get specific conversationDELETE /api/gemini/conversations/:id- Delete conversation
- Node.js - JavaScript runtime
- Express.js - Web framework
- MongoDB - Database
- Mongoose - MongoDB object modeling
- Google Generative AI - Gemini API integration
- Google Trends API - Market trend data
- JWT - Authentication tokens
- bcryptjs - Password hashing
- CORS - Cross-origin resource sharing
- React - UI library
- Redux Toolkit - State management
- React Router - Navigation
- React Bootstrap - UI components
- React Icons - Icon library
- React Toastify - Notifications
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- All API endpoints are protected with JWT authentication
- Passwords are hashed using bcryptjs
- Environment variables protect sensitive credentials
- CORS is configured for secure cross-origin requests
The MIT License
Copyright (c) 2025 AI Content Creator
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.