MarketingOS
Multi-tenant AI software that writes, moderates and publishes a small business's social posts.
- Role
- Sole engineer
- Year
- 2026
- Stack
- Next.js 16, Supabase Postgres and RLS, pg_cron, Claude, fal.ai, Remotion (built, dormant), Satori, Stripe, Model Context Protocol
marketingos.studio
- API route handlersCounted in the repo · source
- 74
- Row Level Security policy statements across 31 migrationsCounted in the repo · source
- 44
- MCP tools that let an outside model drive an account through the same gatesCounted in the repo · source
- 6
The problem
A small business needs a steady stream of on-brand posts and has no one to write them. Tools that generate content will publish anything, including an off-brand or risky post the owner never saw.
What I built
- 01An autonomy policy engine as a pure function, modeled on Claude Code's permission system: blocking guardrails first, then approval-forcing ones, then the most cautious matching policy wins.
- 02One publish path with an atomic claim, so overlapping cron runs or retries can never double-publish.
- 03A reserve, commit and refund credit ledger in atomic Postgres functions, with the Stripe webhook as the source of truth and an idempotent de-dupe table.
- 04A security audit shipped as a migration: a policy with no WITH CHECK that let a user move into another organization, and credit functions any signed-in user could call.
- 05Moderation that fails safe: any classifier error returns 'flagged' so a person looks at it.
- 06An MCP server with hashed per-organization keys, so Claude or any MCP client can run the account through the same autonomy and credit gates.
- 07Brand media rendered from code: Remotion reels driven by model-written JSON and Satori graphics for posts and carousels.
More screens



marketingos.studio
marketingos.studio

Decisions
Publishing behind a provider interface
The app depends only on a PublishingProvider with a mock default. Per-profile fees from some publishing vendors, about $15 per customer a month, would have taken more than 30% of the $49 Starter plan it was first priced against, and about half of today's $29 Starter. So the vendor has to be swappable.
Autonomy is what the plans price
Basic AI is available on every tier. Higher tiers allow more autonomy, because that is the part a business pays to trust.
Not claimed
- Only Instagram publishing was verified end to end. Other networks are not claimed.
- No customers or revenue yet. Stripe runs in live mode.
- Video reels are built and dormant until render keys are set.
- Scheduling for a future date is built. In production only publish-now is verified.
- The held posts in these screens are seeded. Approving one runs the real publish path against the mock provider, so nothing is posted.