AI Content & Marketing
AI Social Media Publishing Platform
Architecture for a platform where users generate social content and images with AI agents, then preview, schedule, and publish across multiple platforms from one dashboard.
Overview
Designed the architecture for an AI-powered content generation and publishing platform that enables users to generate social media content through AI agents, create images, preview posts, and publish or schedule them across multiple platforms from a single interface.
Problem
Producing on-brand social content and getting it live across multiple platforms are two separate jobs — writing/design tools don't publish, and publishing tools don't generate — forcing teams to stitch several point solutions together by hand.
Business Goal
Give a user one interface to generate content and imagery with AI, preview exactly what will be posted, and publish or schedule it across platforms — collapsing the content and distribution steps into one workflow.
Architecture
System design
A Next.js dashboard backed by Convex handles auth, scheduling state, and user-provided API keys. AI agents generate copy variations per platform; Replicate/FLUX generates accompanying imagery; the Late API handles multi-platform publishing and scheduling through OAuth-connected accounts, with a preview layer showing exactly how each post will render before it goes live.
Challenges
What made this hard
Each social platform has different content constraints (length, image ratio, formatting) for the same underlying post.
Content generation is platform-aware from the start — the AI agent produces per-platform variants rather than one post force-fit into every format, with the preview layer catching mismatches before publishing.
Letting users bring their own API keys means the architecture can't assume a single shared provider account.
Designed a per-user credential layer so API keys and connected accounts are scoped to the user, keeping usage and cost attribution correct.
Business Impact
What it changed
Created a scalable architecture for managing AI-generated marketing content across multiple social networks from one centralized platform, rather than juggling separate generation and publishing tools.
Lessons Learned
- Designing the preview layer early forced good decisions about platform-specific formatting that would have been painful to retrofit.
- Treating scheduling and publishing as a first-class backend concern (not a UI afterthought) made multi-platform support far more tractable.
Future Improvements
- Add analytics feedback so AI content generation can learn from what actually performs per platform.
- Support team accounts with shared content calendars and approval steps.
Related