Postprism
A social media content management SaaS — compose, adapt, schedule, and publish across 8 platforms from a single AI-powered editor
Role
Full-Stack Engineer — Architecture, AI integration, publishing pipeline
Tech Stack
Next.js 16, React 19, TypeScript, Supabase, BullMQ, TailwindCSS
Tools
Figma, GitHub, Vercel, Upstash Redis, QStash
Focus
SaaS, AI, Social Media Automation
Status
Ongoing
Intro.
Postprism is a private SaaS platform for creators and social media teams. It provides a single unified editor where posts can be composed once and automatically adapted for each platform's constraints — character limits, media rules, hashtag conventions — and then scheduled or published immediately. The platform supports Twitter/X, LinkedIn, Instagram, Facebook, TikTok, Pinterest, YouTube Shorts, and Threads.
The Problem.
Managing content across 8 social media platforms typically requires either a team of coordinators or constant context-switching between native apps. Each platform has its own content format rules, API authentication flows, rate limits, and publishing mechanics.
Coordinating scheduled posts, tracking publication status, and adapting a single piece of content into 8 platform-specific variants manually is not a workflow — it is busywork. Teams also struggle with approval handoffs across tools that were never designed to work together. Postprism eliminates that layer entirely.
AI-Powered Content Adaptation.
At the core of Postprism is an AI content engine built on the Vercel AI SDK, supporting Anthropic Claude, OpenAI GPT-4, and Google Gemini interchangeably. Rather than generating content from scratch, the engine takes a base piece of writing and adapts it to each platform's specific requirements — compressing LinkedIn posts, adding hashtags for Instagram, threading long-form content for Twitter, adjusting tone for TikTok.
Provider-agnostic
Claude 3.5 Sonnet handles nuanced tone rewriting. GPT-4o handles high-volume throughput. Gemini 1.5 Pro handles multimodal tasks. Switching providers requires zero code changes in the calling layer.
Platform templates
Each platform has a defined prompt template encoding its constraints — LinkedIn's professional tone, Twitter's 280-character hard limit, Instagram's hashtag density. The AI adapts the canonical post to each template while preserving the creator's voice.
Voice preservation
AI acts as an accelerator rather than a replacement. The engine adapts format and structure; the creator's voice, opinions, and facts remain unchanged across all platform variants.
Conversational Scheduling Assistant.
A multi-turn AI scheduling assistant lets users describe what they want to post in plain language — “Post this on LinkedIn and Twitter next Tuesday at 9am and again on Friday” — and get back a structured set of scheduled posts ready to confirm.
The assistant uses streamText from the Vercel AI SDK to stream responses in real time, maintaining conversation history across turns so users can refine their schedule naturally. Partial rows from previous turns are embedded into the next prompt so the model updates rather than duplicates.
The response uses a structured plain-text protocol (---JSON--- separator) that the client parses, keeping the server completely stateless. No session storage, no WebSocket — just a standard HTTPS request with the full conversation embedded.
Background Publishing Pipeline.
Publishing to 8 platforms reliably at scale required a dedicated background job architecture. Vercel's serverless model is not suited for long-running cron jobs or reliable delayed task execution, so the platform uses a three-layer job architecture that runs cleanly on the Hobby tier.
Manages the in-memory queue and retry logic. Each publisher is an isolated module handling its platform's authentication, media upload, and error surface — a Twitter outage does not block a LinkedIn post.
Provides the durable queue backend that persists across cold starts. Failed jobs are captured per-platform with structured error metadata, enabling targeted retries without re-queuing the entire batch.
Replaces Vercel Cron on the Hobby plan — two scheduled webhooks fire every 1 and 5 minutes respectively, triggering the scheduler and worker via HTTPS callbacks to Vercel serverless functions.
Monorepo & Shared Entitlements.
The project is structured as a pnpm workspace monorepo with the main Studio app, a marketing site, and a shared @postprism/shared package. The shared package is the single source of truth for plan limits, entitlements, and rate-limiting logic — canUseAI, canPublishPost, canConnectPlatform — consumed by both apps without duplication.
This eliminates the common bug where the frontend and backend hold inconsistent definitions of what each plan includes. Plan definitions are committed once and imported everywhere. Supabase handles auth, PostgreSQL storage, and file storage, with Row Level Security enforcing data isolation at the database layer — no user can read or write another workspace's data regardless of the application layer.
Plan-Based Access Control.
Three subscription tiers — Solo, Freelancer, and Agency — gate publishing volume, AI usage, platform connections, and analytics exports. Entitlement checks are not just UI hints; they are enforced at every action boundary.
Four enforcement boundaries
- ▹UI — controls are disabled before the user attempts the action
- ▹API route handler — first server-side gate on every request
- ▹Supabase RLS policy — database-layer enforcement regardless of calling layer
- ▹Background job processor — checked again before each job executes
Graceful degradation
AI rate limits are enforced per user per month, with usage counters stored in Supabase and checked before each operation. When a limit is reached, the API returns a structured response the UI handles cleanly — no crashes, no silent failures, no re-entrancy bugs. Users see exactly what they've used and what's left.
Content Pipeline & Collaboration.
Beyond publishing, Postprism includes a full content lifecycle management layer. Posts move through a Kanban board with Draft, Review, Approved, Scheduled, Published, and Failed columns — so teams have visibility into where every piece of content sits at any moment.
A calendar view shows the scheduled publishing queue across a 30-day window per platform. A shared media library with drag-and-drop upload stores assets in Supabase Storage with CDN delivery, reusable across any post in the workspace.
Bulk import supports CSV, XLSX, JSON, and plain text so teams can migrate existing content plans without manual re-entry. Team roles (Editor, Manager, Admin) gate what each member can create, approve, or publish — and who can manage seats and billing.