Skip to content

GhostWriter is an AI-powered content generation system built with LangGraph that automates the creation, curation, and publishing of articles to Ghost CMS

License

Notifications You must be signed in to change notification settings

kreddys/ghostwriter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 Ghostwriter

An AI-powered content generation and publishing platform that automates article creation while ensuring uniqueness and relevance.

🌟 Features

  • 🔍 Multi-engine web search (Google, Tavily, SERP, YouTube)
  • 🧠 AI-powered content generation using LangGraph
  • ✨ Content uniqueness verification via Pinecone embeddings
  • 📝 Automated publishing to Ghost CMS
  • 🔔 Slack notifications for generation updates
  • 🐳 Docker containerization support

🏗️ Architecture

graph TD
    A[User Input / Slack Trigger] -->|Manual or Scheduled| B[FastAPI Backend]
    B --> C[Query Generator]
    C --> D[Multi-Engine Search]
    D --> E[Content Scraper]
    E --> F[Uniqueness Verifier]
    F --> G[Article Generator]
    G --> H[Content Formatter]
    H --> I[Ghost CMS Publisher]
    I --> J[Slack Notifier]

    style A fill:#4682B4,stroke:#2F4F4F
    style B fill:#5F9EA0,stroke:#2F4F4F
    style C fill:#8FBC8F,stroke:#2F4F4F
    style D fill:#8FBC8F,stroke:#2F4F4F
    style E fill:#8FBC8F,stroke:#2F4F4F
    style F fill:#CD5C5C,stroke:#2F4F4F
    style G fill:#8FBC8F,stroke:#2F4F4F
    style H fill:#8FBC8F,stroke:#2F4F4F
    style I fill:#5F9EA0,stroke:#2F4F4F
    style J fill:#DAA520,stroke:#2F4F4F
Loading

🛠️ Technology Stack

  • Backend: FastAPI
  • Frontend: Streamlit
  • Orchestration: LangGraph
  • Database: PostgreSQL with pgvector
  • Vector Store: Pinecone
  • CMS: Ghost
  • Containerization: Docker
  • Authentication: Google OAuth

📋 Prerequisites

  • Python 3.11+
  • Docker and Docker Compose
  • PostgreSQL 14+
  • Pinecone API account
  • Ghost CMS instance
  • Google Cloud Platform account
  • Slack webhook (optional)

🚀 Quick Start

Clone the repository

git clone https://github.com/your-username/ghostwriter.git
cd ghostwriter

Set up environment variables

cp .env.example .env
# Edit .env with your credentials

Build and run with Docker

docker-compose up --build

Access the application

⚙️ Configuration

Key Environment Variables

PINECONE_API_KEY=your_key
GHOST_API_URL=https://your-ghost-cms.com
GHOST_API_KEY=your_key
OPENAI_API_KEY=your_key
SLACK_WEBHOOK_URL=your_webhook_url

Runtime Parameters

Parameter Description Default
search_engines Active search engines ["google", "tavily"]
max_search_results Results per query 10
similarity_threshold Content uniqueness threshold 0.85
use_query_generator Enable smart query generation true

🔄 Workflow

Input Processing

  1. User provides topic or URL
  2. Query generator creates optimal search queries
  3. Flow can be triggered manually from Slack or scheduled automatically

Content Discovery

  1. Multi-engine search execution
  2. Content scraping and cleaning

Verification

  1. Uniqueness checking via embeddings
  2. Relevance verification

Content Generation

  1. AI-powered article writing
  2. HTML formatting and structuring

Publishing

  1. Automatic Ghost CMS publishing
  2. Slack notifications

🧪 Testing

# Install test dependencies
pip install -r requirements-dev.txt

# Run tests
pytest tests/

📚 API Documentation

Detailed API documentation is available at /docs when running the FastAPI server.

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • LangGraph team for the orchestration framework
  • Ghost CMS team for the publishing platform
  • All contributors who have helped shape this project

For more information or support, please open an issue or contact the maintainers.

About

GhostWriter is an AI-powered content generation system built with LangGraph that automates the creation, curation, and publishing of articles to Ghost CMS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •