pedrojimenez.dev
All work
Automation · AI2026 · in production

Social Command Center

Telegram bot that turns a photo or a one-line idea into ready-to-publish social posts — per-platform copy, AI images with correct on-image text, and one-tap publishing to Instagram, LinkedIn, Facebook, and X.

Social Command Center
Social Command Center — // what shipped 1Social Command Center — // what shipped 2Social Command Center — // what shipped 3
// the problem

Posting the same promotion to four platforms is four rounds of rewriting, resizing, and reformatting, and it is the first task a small business drops when the week gets busy. The obvious fix — an AI image generator — usually makes it worse: ask most models for a "30% OFF" banner and you get confident gibberish, which is unusable for anything commercial.

// the build

A single Telegram chat as the whole interface, with the model choice treated as a routing decision rather than a fixed dependency.

Send a photo with a caption, or /dream an idea from scratch, and the bot writes copy tuned per platform, generates or edits the image, and returns one preview with Publish / regenerate image / regenerate text / tweak-by-reply buttons.
Typography routing is where the money is: requests without on-image text go to a cheap fast model at less than a cent, and only requests that actually need legible lettering go to the character-validated model at about nine cents. Cost tracks intent instead of volume.
Layered fallbacks at every external call — copy generation falls from OpenRouter to Claude Haiku to DeepSeek direct, and an on-image text edit falls back to a deterministic SVG banner. A provider outage degrades the output rather than breaking the bot.
Models, prompts, brand style, aspect ratio, and API keys are all runtime settings in SQLite, editable from an admin console with a live health strip. Switching image engines or retuning brand voice is a form submission, not a redeploy.
Cost controls built in rather than monitored after the fact: a daily generation cap per chat bounds the worst case, every image call is pinned to 1K resolution, and a failed publish retries against the already-generated media so it costs nothing extra.
Publishing is isolated behind one module — it is the only code that knows which publishing platform is in use — and a chat allowlist means messages from anyone else are ignored outright.
// what shipped

Running in production on a single droplet under systemd. A four-platform promo post goes from idea to published in one Telegram exchange, at roughly nine cents when it needs designed text on the image and about a penny when it does not — around $15 to $20 a month all in, including the server.

← PreviousC21 PerdomoNext →MoneyGuard