AI Content Generation for CMS

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.
Development and maintenance of all types of websites:
Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Our competencies:
Development stages
Latest works
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1161
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1041
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    822
  • image_crm_chasseurs_493_0.webp
    CRM development for Chasseurs
    847
  • image_website-sbh_0.png
    Website development for SBH Partners
    999
  • image_website-_0.png
    Website development for Red Pear
    451

Implementing AI Content Generation for Website CMS

AI content generation in CMS is not a "write article button". It's assistant tools for editors: draft from brief, rephrase paragraph, SEO meta-tag optimization, translation, headline variants. Integrated directly in editor without context switching.

What to Implement in CMS

  • Generate article draft from title and keywords
  • Rephrase selected text (make shorter / formal / simpler)
  • Generate SEO meta: title, description, OG-tags
  • Headline variants (5 options to choose from)
  • Auto alt-text for images
  • Generate excerpt from article body

Server API for Generation

// api/ai-content.js
import OpenAI from 'openai';

const openai = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });

const BRAND_VOICE = `
Brand style: professional, no fluff, concrete facts.
Forbidden: words "unique", "innovative", "revolutionary".
Target audience: tech specialists 25-45 years old.
`;

export async function POST(request) {
  const { action, content, options = {} } = await request.json();

  const handlers = {
    draft: generateDraft,
    rephrase: rephraseText,
    seo_meta: generateSeoMeta,
    headlines: generateHeadlines,
    excerpt: generateExcerpt,
    alt_text: generateAltText,
  };

  const handler = handlers[action];
  if (!handler) return Response.json({ error: 'Unknown action' }, { status: 400 });

  const stream = await handler(content, options);
  return new Response(stream);
}

async function generateDraft(data, options) {
  const { title, keywords, outline, wordCount = 800 } = data;

  return openai.chat.completions.create({
    model: 'gpt-4o',
    stream: true,
    messages: [
      {
        role: 'system',
        content: `${BRAND_VOICE}\nGenerate content in Markdown. Use H2, H3, lists, bold text.`,
      },
      {
        role: 'user',
        content: `Write an article (~${wordCount} words).
Title: ${title}
Keywords: ${keywords?.join(', ')}
${outline ? `Structure:\n${outline}` : ''}`,
      },
    ],
  }).then(s => s.toReadableStream());
}

async function rephraseText(data, options) {
  const { text, tone } = data; // tone: shorter|formal|casual|simpler

  const toneInstructions = {
    shorter: 'Cut text in half, preserve meaning.',
    formal: 'Rewrite in formal business style.',
    casual: 'Rewrite in conversational, friendly style.',
    simpler: 'Simplify text, replace complex terms with clear ones.',
  };

  return openai.chat.completions.create({
    model: 'gpt-4o-mini',
    stream: true,
    messages: [
      { role: 'system', content: toneInstructions[tone] || 'Rephrase the text.' },
      { role: 'user', content: text },
    ],
    max_tokens: 500,
  }).then(s => s.toReadableStream());
}

async function generateSeoMeta(data) {
  const { title, body } = data;

  const response = await openai.chat.completions.create({
    model: 'gpt-4o-mini',
    response_format: { type: 'json_object' },
    messages: [
      {
        role: 'system',
        content: 'Return JSON: { meta_title: string (up to 60 chars), meta_description: string (up to 160 chars), og_title: string, og_description: string, focus_keyword: string }',
      },
      {
        role: 'user',
        content: `Generate SEO for article:\nTitle: ${title}\nBody:\n${body.slice(0, 1000)}...`,
      },
    ],
  });

  return JSON.parse(response.choices[0].message.content);
}

async function generateHeadlines(data) {
  const { body, count = 5 } = data;

  const response = await openai.chat.completions.create({
    model: 'gpt-4o-mini',
    response_format: { type: 'json_object' },
    messages: [
      {
        role: 'system',
        content: 'Return JSON: { headlines: [ { title: string, reason: string } ] }',
      },
      {
        role: 'user',
        content: `Generate ${count} alternative headlines for:\n${body.slice(0, 500)}`,
      },
    ],
  });

  return JSON.parse(response.choices[0].message.content).headlines;
}

Editor Integration

function AIContentTools() {
  const { text, setText } = useEditor();
  const [loading, setLoading] = useState(false);

  async function callAPI(action, data) {
    setLoading(true);
    const response = await fetch('/api/ai-content', {
      method: 'POST',
      body: JSON.stringify({ action, content: data }),
    });

    const reader = response.body.getReader();
    let result = '';

    while (true) {
      const { done, value } = await reader.read();
      if (done) break;
      result += new TextDecoder().decode(value);
    }

    setLoading(false);
    return result;
  }

  return (
    <div className="ai-tools">
      <button onClick={() => callAPI('rephrase', { text, tone: 'shorter' })}>
        Make shorter
      </button>
      <button onClick={() => callAPI('seo_meta', { title: text, body: text })}>
        Generate SEO
      </button>
      <button onClick={() => callAPI('headlines', { body: text })}>
        Alternative titles
      </button>
    </div>
  );
}

Timeline

  • Basic draft generation + rephrase — 2–3 days
  • SEO meta + headline variants — plus 1–2 days
  • Alt-text generation for images — plus 1 day
  • Multi-language support — plus 2–3 days
  • Full integration with editor UI + A/B testing — 2–3 weeks