Skip to content

About

PromptStream is an AI-powered content orchestration tool that converts a blog URL into platform-ready social media posts. It scrapes and analyzes article content, detects category and tone, and generates tailored outputs optimized for Twitter, LinkedIn and Instagram saving creators time and ensuring platform-appropriate messaging.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

Repository files navigation

🚀 PromptStream

An AI-Powered Automated Content Orchestration Agent

PromptStream is a full-stack AI application designed to transform long-form blog posts into platform-optimized social media content using advanced prompt engineering and Large Language Models (LLMs). It automates the tedious process of content atomization by extracting web content, analyzing its context, and generating tailored posts for Twitter, LinkedIn, and Instagram simultaneously.


🎯 Project Overview & Objective

Content creators and marketing teams often spend hours manually repurposing blog posts into platform-specific snippets. PromptStream solves this bottleneck by acting as an intelligent linguistic translator. By simply providing a URL, the application scrapes the article, detects its tone and category, and synthesizes ready-to-publish, format-specific social media content.


🛠️ Tech Stack & Technologies Used

This project leverages a modern, modular Python stack to ensure high performance, maintainability, and seamless AI integration:

  • Backend Framework: FastAPI & Uvicorn (for high-performance REST APIs)
  • Frontend Interface: Streamlit (for a reactive, data-driven web UI)
  • Web Scraping & Data Extraction: BeautifulSoup4 & Requests
  • AI / LLM Integration: Groq API (Llama 3 Models) & Google Generative AI (Gemini Models)
  • Configuration Management: Pydantic & python-dotenv
  • Language: Python 3.11

💡 Applied Skills

Building PromptStream demonstrated proficiency in several key areas of software engineering and artificial intelligence:

  • Full-Stack Python Development: Architecting a decoupled system with a FastAPI backend and a Streamlit frontend.
  • Applied AI & Prompt Engineering: Designing complex, zero-shot system prompts to enforce specific personas (e.g., Thread Architect for Twitter, Professional Curator for LinkedIn, Visual Narrator for Instagram).
  • Web Scraping & DOM Parsing: Building robust web scrapers capable of extracting meaningful content from raw HTML while filtering out noise.
  • RESTful API Design: Creating modular and well-documented API endpoints that handle cross-origin requests and asynchronous processing.
  • Third-Party API Integration: Seamlessly integrating and switching between leading LLM providers (Groq and Google Gemini) based on configuration.
  • Software Architecture: Implementing a clean, component-based architecture separating concerns (Scraper $\rightarrow$ Category Detector $\rightarrow$ Orchestrator).

🤖 AI Integration & Capabilities

PromptStream integrates state-of-the-art Large Language Models (LLMs) to drive its core logic.

  • Models Used: Supports Groq's high-speed inference (defaulting to llama-3.3-70b-versatile) and Google's gemini-1.5-flash.
  • Category & Context Detection: The AI first acts as an analyzer, reading the scraped text to determine the category, tone, themes, target audience, and key insights.
  • Multi-Persona Generation: Using the gathered context, the LLM is prompted via dynamically constructed instructions to generate three distinct outputs simultaneously, ensuring each post adheres strictly to the character limits, formatting rules, and stylistic nuances of its target platform.

🖥️ User Interface

PromptStream offers two distinct interfaces to cater to different user needs:

  1. Web Interface (Streamlit): A polished, interactive web application where users can paste a blog URL, select target platforms via a sleek UI, and view the AI's analysis alongside the generated markdown-formatted posts in expandable panels.
  2. REST API (FastAPI): A programmatic interface exposing a /api/generate endpoint, allowing developers to integrate the orchestration pipeline into their own automated workflows.

📂 Project Structure

The repository is organized into a clean, decoupled architecture:

PromptStream/
├── backend/                        # Core backend logic and APIs
│   ├── main.py                     # FastAPI application entry point
│   ├── scraper.py                  # BeautifulSoup web scraping logic
│   ├── category_detector.py        # LLM-based context and tone analysis
│   ├── orchestrator.py             # Pipeline coordinator (Scrape -> Analyze -> Generate)
│   ├── prompts.py                  # Platform-specific system prompts
│   └── routes/api.py               # REST endpoints
├── frontend/                       # User Interface
│   └── app.py                      # Streamlit web application
├── config/                         # Application configuration
│   └── settings.py                 # Pydantic environment validation
└── requirements.txt                # Project dependencies

🚀 Getting Started

(Briefly explain how to run the project locally. Example below:)

  1. Clone the repository.
  2. Install dependencies: pip install -r requirements.txt
  3. Configure your API keys in a .env file (GROQ_API_KEY or GEMINI_API_KEY).
  4. Start the backend: uvicorn backend.main:app --reload
  5. Start the frontend: streamlit run frontend/app.py

📄 License

This project is licensed under the MIT License.

About

PromptStream is an AI-powered content orchestration tool that converts a blog URL into platform-ready social media posts. It scrapes and analyzes article content, detects category and tone, and generates tailored outputs optimized for Twitter, LinkedIn and Instagram saving creators time and ensuring platform-appropriate messaging.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages