AI Content Pipeline

From a simple idea to a published article, fully automated.

Prompt Retrieval

Fetches a dynamic, pre-engineered prompt from an external API. This acts as the creative brief for the AI and can be updated without changing the application code.

Article Generation

Sends the prompt to the Google Gemini API, which interprets the instructions and generates a complete, high-quality article in Markdown format.

SEO Metadata

The generated article is sent back to the Gemini API, which extracts key information and returns an SEO-friendly description and relevant tags as structured JSON data.

File Assembly

Assembles the final `.md` file by formatting the SEO metadata into a YAML "frontmatter" block and prepending it to the Markdown article content.

Publishing

The completed file is automatically placed in a Git repository. The script then runs `git add`, `commit`, and `push` to deploy the article to a live website via a hosting service like Vercel.