← Back to projects
Product & SaaSAI & Automation

Social Media Ops Automation

The internal platform that runs a marketing agency’s social media operation: client onboarding, brand kits validated down to the database, AI-written copy, a template engine with 13 design families and a client approval cycle that gates art production. Supabase, Next.js and n8n.

Social Media Ops Automation
Type
Product & SaaS · AI & Automation
Stack
Next.jsSupabasen8nAI

The result in one sentence

An agency that onboarded clients through scattered docs, created WhatsApp groups by hand and produced art without a standard now has a single panel where a signed contract becomes a group in seconds and a brief becomes a full quarter of content ready for the client to approve.

  • Client: iOBEE, a marketing and social media agency
    • My role: specification, architecture, database, frontend, automations and deployment
      • Timeline: the first real run, from brief to the first generated image, happened 3 days after the first commit
        • Key result: the client's WhatsApp group is created automatically in seconds, with zero manual steps after the contract is signed

        The context

        A social media agency sells consistency: the client's brand has to look the same in every post, every month. But the whole operation depended on people remembering to do things, and that does not scale past a handful of clients.

        The problem

        Onboarding lived in loose documents, WhatsApp groups were created by hand, brand files were scattered and art production had no pipeline. Worse, art was produced before the copy was approved, so work and image credits were thrown away every time the client changed their mind. Off-palette colors, wrong fonts or unreadable contrast were only noticed after publishing.

        The approach

        • The spec as a contract: I wrote three versioned specs before the code and worked one phase at a time, each closed with an acceptance checklist recorded in the repository. Code is validated against the spec, not against the memory of a conversation.
          • One source of truth per fact: structured data in Postgres, files in Storage, and the database stores only paths. The panel writes straight to the database, protected by Auth, RLS and constraints.
            • Automation only for side effects: n8n reacts to database changes through webhooks and is never in the user's write path. If it goes down, data entry keeps working and side effects catch up. Everything it does is logged to an events table.
              • Three validation layers: UI, RLS policies and constraints. A color that breaks the brand rule is rejected by the database even if someone bypasses the interface.

              The solution

              Onboarding that fires on its own. The team registers the client and, when the status changes to contract signed, a workflow creates the WhatsApp group with the right people, fills the description with the responsible team, sets the logo as the picture and sends the welcome message. A brand kit from the website. The panel reads the client's site and extracts colors, fonts and logos in a few seconds for review. Fonts can be an uploaded file or a Google Fonts family, and a minimum 4.5:1 contrast between background and text is enforced in the panel and in the database. From brief to quarter. With a complete brief, a single "Generate everything" writes the bio, the highlights with story scripts and the quarter's carousels as editable drafts. The Profile tab shows it all as the client's Instagram, with in-place editing. A template engine. A catalogue of 13 design families and 39 models, each family with its own structure, not only its own colors. Each client is locked to one family, so the feed stays consistent and two clients never end up with the same silhouette. Approval before production. A team member sends the client a deck with the quarter's copy, records the answer in the panel, and change requests become a checklist attached to the posts. Art generation is unlocked only when the cycle is approved. Social Media Ops architecture: dashboard, database, automation and human approval

              Under the hood

              Next.js 16 with App Router, Tailwind v4 and shadcn/ui in the panel; Supabase (Postgres, Auth, Storage, Database Webhooks) with CLI-versioned migrations and database tests; n8n for side effects and Evolution API for WhatsApp, treated as an unreliable API (no blind retries that could create duplicate groups). State machines live in Postgres itself, with transition functions and triggers that refuse out-of-order steps and refuse to activate a client without complete onboarding, brief and generation. Text generation goes through a provider configured server-side, with a mock mode for offline runs. A verification harness against the live project covers the whole database and passed 187 of 187 checks.

              Results

              • A signed contract becomes a configured WhatsApp group in seconds, with no human in the loop
                • Brand identity extracted from the client's website in about 5 seconds
                  • A full quarter of content generated as drafts from a single brief
                    • No art produced before the copy is approved, cutting rework and wasted image credits
                      • Brand rules guaranteed by the database, not by the attention of whoever is producing

                      What I take from this project

                      Writing the spec first, closing every phase with a checklist and putting business rules inside the database is what made it possible to move fast without breaking what was already done. Speed came from discipline, not from shortcuts.

Facing a similar challenge?

Tell me what you need to build, whether it is a product, an automation, or an AI system, and I will show you the shortest path to production.

More projects