A lightweight content generation system that combines AI, web search, and full-stack functionality.
Access the deployed application here:
👉 https://article-generator-iota.vercel.app/login
- Username:
admin - Password:
admin123
- Content Query Input - Accept article topics via user query
- Web Search Integration - Uses LLM with web search grounding for research
- URL Context Support - Optionally provide URLs as additional context
- Structured Article Generation - Produces articles in JSON format
- SEO Metadata Generation - Automatically generates SEO-optimized metadata including Open Graph tags
- HTML Document Production - Creates polished HTML documents with styling
- Authentication - Simple login-based authentication (no sign-up required)
- Protected Routes - Frontend routes protected by authentication
- Article Display - Preview generated HTML with SEO metadata
- HTML Download - Download the generated article as an HTML file
- Rate Limiting Handling - Gracefully handles API rate limits and search throttling
- FastAPI - Modern Python web framework
- OpenRouter - Article generation (uses xiaomi/mimo-v2-flash:free model)
- Google Search - Web search integration (with rate limiting handling)
- JWT - Authentication
- BeautifulSoup - Web scraping
- Requests - HTTP client
- React - UI framework
- Vite - Build tool
- React Router - Routing
- Axios - HTTP client
- Navigate to the backend directory:
cd backend- Install dependencies:
pip install -r requirements.txt- Create environment file:
cp .env.example .env- Edit
.envand add your API key:
SECRET_KEY=your-secret-key-change-in-production
OPENROUTER_API_KEY=your-openrouter-api-key
-
Get an OpenRouter API key from https://openrouter.ai/
-
Start the backend server:
uvicorn main:app --reloadBackend will run at http://localhost:8000
- Navigate to the frontend directory:
cd frontend- Install dependencies:
npm install- Start the development server:
npm run devFrontend will run at http://localhost:5173
- Username: admin
- Password: admin123
- Open
http://localhost:5173in your browser - Login with default credentials
- Enter your article query (e.g., "Write an article about Trump and the Venezuela attack")
- Optionally add a URL for additional context
- Click "Generate Article"
- View the generated article with SEO metadata (including OG tags)
- Download the HTML file if desired
POST /api/login- User loginGET /api/me- Get current user
POST /api/generate-article- Generate article JSONPOST /api/generate-seo- Generate SEO metadataPOST /api/generate-html- Generate HTML documentPOST /api/generate-full-article- Generate all at once
article-generator/
├── backend/
│ ├── main.py # FastAPI application
│ ├── auth.py # Authentication logic
│ ├── config.py # Configuration
│ ├── models.py # Pydantic models
│ ├── article_generator.py # Article generation
│ ├── requirements.txt # Python dependencies
│ └── .env.example # Environment template
└── frontend/
├── src/
│ ├── pages/ # Page components
│ ├── components/ # Reusable components
│ ├── context/ # React Context
│ └── api/ # API service
└── package.json # Node dependencies
- The backend requires a valid OpenRouter API key for article generation
- The application uses OpenRouter with the xiaomi/mimo-v2-flash:free model
- Google Search may be rate-limited; the app handles this gracefully by continuing generation without search context
- In production, change the default
SECRET_KEYin.env - The default user credentials are in
config.py- change for production