import express from 'express'; import OpenAI from 'openai'; import { db } from './db'; import { settings } from './db/schema'; import { eq } from 'drizzle-orm'; const router = express.Router(); // System prompt that defines how the AI should generate articles const SYSTEM_PROMPT = `You are an expert content writer creating high-quality blog articles for Ghost CMS. CRITICAL REQUIREMENTS: 1. Generate production-ready HTML content that can be published directly to Ghost 2. Use semantic HTML5 tags:

,

,

,