Skip to content

DeepSeek as Architect: Autoposting and Section Migration on Joomla

Cover: DeepSeek as architect of autoposting and migration

In brief

The Claude account was blocked. Data was restored from a previously exported archive: ChatGPT parsed the contents, a plan was outlined with it, and implementation was handed over to DeepSeek. DeepSeek designed autoposting for two Joomla sites and prepared the migration of a five-page service section, calling translation and publishing services via API.

Technology Stack

Technology Role
DeepSeek Design, translation via API
Python Migration and publishing scripts
Joomla Web Services Publishing articles and menus via REST
MySQL Reading source and destination databases
4SEO SEO meta tags
Cherry Studio Interface for assistants
.env Configuration and secrets

Context and Task

Two sites on Joomla are in operation:

Site Language Role
Source site Russian content source
Destination site English publishing migrated content

There are two tasks, and they are interconnected:

  1. Autoposting. Regular writing and publishing of blog articles. Before automation, the cycle was performed manually: topic → text → layout in the admin panel → meta tags.
  2. Section migration. Moving a five-page service section about GEO promotion from the Russian-language site to the English-language one: translation, publishing, menu setup, and SEO meta tags.

Data Recovery

The Claude account was blocked, and access to the web version was closed. The data was not lost, however: an export archive with project files had been downloaded earlier.

The archive was parsed by ChatGPT: it restored the context of recent autoposting work. A plan for further actions was outlined with ChatGPT. Implementation was handed over to DeepSeek.

This case established an important rule: an account block does not mean data loss. Exports and local copies are a reliable source of recovery.

Why DeepSeek

The role of architect is a property of the task specification. With a strict task specification, the model designs and implements the process regardless of the service used.

DeepSeek designed both processes: autoposting and migration. It analyzed database structures, wrote scripts, proposed solutions, and stopped at the boundary of "read → start changing," flagging contentious points for approval.

Architecture: Model as Orchestrator

The central idea of the project: the LLM works not as a chat but as an orchestrator. The model generates Python scripts that call external APIs. Scripts run locally. The model is the brain that decides what to do; scripts are the hands that execute.

flowchart TB
    DS["DeepSeek — designs, writes scripts, makes decisions"]
    DSA["DeepSeek API — translation and content generation"]
    JW["Joomla Web Services — REST API"]
    DB["MySQL — reading databases"]
    F4["4SEO — meta tags"]

    DS -->|"call_deepseek()"| DSA
    DS -->|"POST/PATCH /content/articles"| JW
    DS -->|"SELECT, read-only"| DB
    DS -->|"INSERT/UPDATE meta"| F4

Configuration: .env

All addresses, credentials, and tokens are placed in the .env file:

SRC_DB_HOST=...
SRC_DB_NAME=...
SRC_DB_USER=...
SRC_DB_PASSWORD=...

DST_DB_HOST=...
DST_DB_NAME=...
DST_DB_USER=...
DST_DB_PASSWORD=...

DST_SITE_URL=...
DST_API_TOKEN=...

DEEPSEEK_API_KEY=...
DEEPSEEK_API_URL=...
DEEPSEEK_MODEL=...

Rules:

  • .env is not published, committed, or forwarded in plain text;
  • the source is available read-only — even on error, the script will not modify the source site;
  • tokens and passwords are not hardcoded.

Calling the DeepSeek API for Translation

Content translation goes through the DeepSeek API, not the chat:

import os
import requests

def call_deepseek(system_prompt: str, user_text: str) -> str:
    resp = requests.post(
        os.environ["DEEPSEEK_API_URL"],
        headers={"Authorization": f"Bearer {os.environ['DEEPSEEK_API_KEY']}"},
        json={
            "model": os.environ["DEEPSEEK_MODEL"],
            "messages": [
                {"role": "system", "content": system_prompt},
                {"role": "user", "content": user_text},
            ],
            "temperature": 0.2,
        },
        timeout=120,
    )
    resp.raise_for_status()
    return resp.json()["choices"][0]["message"]["content"]

One model instance designs and generates code, another translates content via API.

Publishing via Joomla Web Services

Publishing is done through Joomla's built-in REST API, without manual work in the admin panel:

# Check that the API responds
GET  {DST_SITE_URL}/api/index.php/v1/content/articles
Headers: X-Joomla-Token: {DST_API_TOKEN}

# Create an article
POST {DST_SITE_URL}/api/index.php/v1/content/articles
Body: {"title": "...", "articletext": "...", "catid": 2, "language": "*"}

# Update an existing article
PATCH {DST_SITE_URL}/api/index.php/v1/content/articles/{ID}
Body: {"title": "...", "alias": "...", "state": 1}

The /menus/site/items endpoints are used for menu management.

Migration Toolkit

A set of Python scripts is used for content migration. Each handles one step:

Step Purpose
Database connection Unified access module for source and destination databases
Export Reading articles from the source database
Translation Translating title, alias, HTML, and meta tags via DeepSeek API
API check Verifying Joomla Web Services availability
Publishing Creating articles via POST /content/articles
4SEO reconnaissance Studying the plugin's table structure
Meta tags Writing meta tags to 4SEO directly in the database
Internal links Fixing links after migration

Two read-only inventory scripts were added to the base set: they only read databases and change nothing.

Autoposting

flowchart LR
    T["Topic list"] --> W["Writer assistant"]
    W -->|"drafts"| A["Publisher assistant"]
    A -->|"article creation"| J["Joomla REST API"]
    A -->|"meta tags"| M["4SEO"]

Writer Prompt

Style and structure rules are placed in the system prompt:

  • do not invent facts;
  • do not add unnecessary HTML tags, lists, or classes;
  • forbid service tags [citation] and [cite];
  • write in the specified structure;
  • save the finished article to a separate drafts folder.

[citation] Check

The model sometimes inserts service fragments like [citation:...] into the text. Requests in the prompt do not always help: a model that inserted a tag may not notice it during self-check.

Therefore, a deterministic check is performed before publishing:

Select-String -Path "drafts\*.html" -Pattern "\[citation|\[cite|【|†"

If a pattern is found, publishing stops. This is a layer of protection independent of the model.

Double Publishing to Telegram

After the first run, a post in Telegram was published twice. Reason: the send trigger fired both when the article was published and again when meta tags were updated. Both steps independently triggered the distribution.

Conclusion: every side effect must fire exactly once. Distribution should either be decoupled or protected by idempotency.

Section Migration

Read-only Inventory

Before any changes, an inventory of the source and destination was performed. The section turned out to be not a category but a menu section of five articles: a parent page and four child pages, each linked to its own menu item.

The source's 4SEO plugin stored Russian meta tags for all five pages. Internal links in the HTML were of mixed format: some in SEF, some in the old non-SEF format. This was taken into account during migration.

Destination Audit

On the target site, service articles reside in a common category; there is no separate category for the section.

Findings:

  • one of the section's pages already existed on the target site — unpublished, with Russian content. It was a clone of the source page. It was reused via PATCH instead of creating a duplicate;
  • one of the menu items also existed — unpublished, at the menu root. It was moved under the new parent instead of creating a new one;
  • some identifiers on the target site are occupied by other articles. New pages received new identifiers issued by Joomla.

Dry-run: Plan Without Writing

A plan was formed before writing:

# Page Action
1 Parent Create new
2 Child 1 Reuse existing
3 Child 2 Create new
4 Child 3 Create new
5 Child 4 Create new

Clean English aliases were chosen for the English-language site instead of transliterating the originals: this is clearer for both humans and search engines.

Meta Tags

Drafts of English meta tags — title and description — were prepared for all five pages. Final wording was approved separately, before writing.

Checkpoints

The model stops at the boundary of "read → start changing" and flags contentious points for approval:

flowchart TD
    A["Read-only inventory"] --> B["Dry-run: plan without writing"]
    B --> C["Preview: translation and meta tags for review"]
    C --> D{"Approval"}
    D -->|"no"| C
    D -->|"yes"| E["Writing articles and menu"]
    E --> F["4SEO and internal links"]
    F --> G["Report with object IDs"]

At the approval stage, the model formulated four questions:

  1. Scope: are we migrating exactly five pages?
  2. Alias scheme: clean English or 1:1 with the source?
  3. Reuse: is reusing the existing article and menu item approved?
  4. Contentious links: what to do with broken internal links?

Task Specification Rules

Explicit boundaries were embedded in the task:

  • Read-only inventory and dry-run I approve.
  • No changes on the destination site until a separate OK. Do not modify the source.
  • When translating, do not invent new content: preserve the structure, meaning, HTML structure, lists, tables, links, and CTAs of the source.
  • After OK, first write articles and menu, then 4SEO and internal links. After each stage, a report with IDs of created and modified objects.
  • Do not perform mass UPDATEs outside the approved scope.

Result

  1. Work was restored after the Claude block without losing tasks: context was extracted from the export, and the pipeline was rebuilt on DeepSeek.
  2. Autoposting is live: articles are written according to the system prompt, published via the Joomla REST API, and meta tags are set in 4SEO. The [citation] check filters out service junk.
  3. Section migration is prepared: full read-only inventory, dry-run plan, drafts of English meta tags. A duplicate was found and reused instead of creating a new one.

The main result: the model became a replaceable component of the pipeline. The value lies in files, scripts, and process rules, not in a specific chat.

Conclusions

  1. An account block does not mean data loss. The export preserved the content, and access was restored at the process level.
  2. The model is a replaceable component. The result is determined by the task specification and process, not by a specific service.
  3. Read-only audit before writing helps avoid duplicates and structural errors.
  4. The model can orchestrate external services through generated code: translation via API, publishing via REST, meta tags in the database.
  5. Deterministic checks are more reliable than prompt requests: service tags are filtered out by code, not by persuasion.
  6. Checkpoints are mandatory: the model stops before writing and flags contentious points for approval.

See Also