An AI-powered blog writing workspace that researches, plans, writes, and illustrates complete Markdown blogs, built with Streamlit and LangGraph.
· Features · How It Works · Quick Start · Troubleshooting
Writing a good technical blog means researching, outlining, drafting, and creating visuals. BlogBolt AI automates that entire pipeline. Enter a topic, pick the audience and tone, and a multi-stage LangGraph workflow produces a publish-ready article with sources and AI-generated diagrams.
Generation
- 🧠 Structured blog planning and writing with Google Gemini
- 🔀 Smart routing: the app decides if a topic is closed-book, hybrid, or needs current information
- 🌐 Optional web research with Tavily, with sources included in the output
- ⚙️ Parallel section writing through LangGraph workers, merged by a reducer
Visuals
- 🎨 AI-generated technical images via Pollinations
- 🔤 Exact text labels on images using Pillow, so no garbled AI text
Workspace
- 📊 Live workflow progress and event logs
- 🗂️ Tabs for Article Preview, Markdown Source, Plan, Evidence, Images, and Logs
- 🕘 Recent blogs in the sidebar
- 📥 Export as
.mdor as a.zipbundle (blog + images)
flowchart LR
A[Topic + Audience + Tone] --> B{Router}
B -->|Needs research| C[Research<br/>Tavily]
B -->|Closed-book| D[Orchestrator<br/>Blog Plan]
C --> D
D --> E1[Worker 1]
D --> E2[Worker 2]
D --> E3[Worker N]
E1 --> F[Reducer<br/>Merge Sections]
E2 --> F
E3 --> F
F --> G{Visuals useful?}
G -->|Yes| H[Pollinations + Pillow]
G -->|No| I[Final Blog]
H --> I
- Input: enter a topic, target audience, and tone.
- Route: the router decides whether current web research is needed.
- Research: Tavily gathers evidence when required.
- Plan: Gemini creates a structured outline.
- Write: workers generate individual sections.
- Merge: the reducer assembles the full Markdown article.
- Illustrate: if visuals help, Pollinations generates art and Pillow adds exact labels.
- Deliver: article, sources, images, and logs appear in the workspace.
| Layer | Technology |
|---|---|
| Language | Python 3.10+ |
| UI | Streamlit |
| Orchestration | LangGraph, LangChain |
| LLM | Google Gemini |
| Web research | Tavily Search |
| Image generation | Pollinations |
| Image processing | Pillow |
| Data / validation | Pydantic, Pandas |
Blog_App/
├── backend.py # LangGraph workflow and AI generation logic
├── frontend.py # Streamlit application UI
├── requirements.txt # Python dependencies
├── images/ # Generated and saved blog visuals
├── *.md # Generated blog files
└── .env # Local API keys (never commit this file)
- Python 3.10+
- Google AI API key (required)
- Tavily API key (optional, for web research)
- Pollinations API key (required for image generation)
# 1. Clone the repository
git clone https://github.com/<your-username>/<your-repository>.git
cd Blog_App
# 2. Create a virtual environment
python -m venv .venv
# 3. Activate it
# Windows PowerShell:
.\.venv\Scripts\Activate.ps1
# macOS / Linux:
source .venv/bin/activate
# 4. Install dependencies
pip install -r requirements.txtCreate a .env file in the project root:
GOOGLE_API_KEY=your_google_api_key
TAVILY_API_KEY=your_tavily_api_key
POLLINATIONS_API_KEY=your_pollinations_api_key| Variable | Required | Used for |
|---|---|---|
GOOGLE_API_KEY |
✅ | Gemini-powered planning and writing |
TAVILY_API_KEY |
➖ Optional | Web research (skipped if missing) |
POLLINATIONS_API_KEY |
✅ for images | AI image generation |
⚠️ Never commit your.envfile. Make sure.envis listed in.gitignore.
streamlit run frontend.pyOpen http://localhost:8501 if the browser doesn't launch automatically.
Input
| Field | Value |
|---|---|
| Topic | How Transformers Understand Text: Tokens, Embeddings, and Self-Attention Explained |
| Audience | Beginners |
| Tone | Friendly and clear |
Output: a complete Markdown article with sections, diagrams, and cited sources, saved as a .md file plus an images/ folder, ready to publish on your blog, Medium, or Dev.to.
- Blog Markdown files are saved in the project root.
- Generated images are saved in
images/. - The UI provides Markdown and ZIP download buttons.
ModuleNotFoundError
Make sure the virtual environment is active and dependencies are installed:
pip install -r requirements.txtAPI key errors
Confirm .env is in the same directory as backend.py and contains valid keys. Restart Streamlit after changing environment variables.
Images are not generated
Check that POLLINATIONS_API_KEY is set and that the images/ directory is writable.
No research or sources in the output
If TAVILY_API_KEY is missing, the research step is skipped. Add the key and restart the app.
- Multi-language blog generation (Hindi / Hinglish)
- SEO score and meta description generator
- One-click publishing to Medium / Dev.to / Hashnode
- Support for additional LLM providers
- Docker support and cloud deployment guide
- Never commit
.envor any API key. - Use environment variables or a secrets manager in production.
- Review generated content and citations before publishing.
Contributions are welcome!
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature - Commit your changes:
git commit -m "Add your feature" - Push the branch:
git push origin feature/your-feature - Open a Pull Request
Distributed under the MIT License. See LICENSE for details.
(Replace with the license that matches your intended use.)
Streamlit · LangGraph · LangChain · Google Gemini · Tavily · Pollinations · Pillow
Built by Sumit Jaiswal · If you like this project, give it a ⭐