DEV Community

Nandawula Kabali-Kagwa
Nandawula Kabali-Kagwa

Posted on

Why I Built an Automated Marketing Desk Inside My Monorepo

As developers, we love building the product. The database schema, the API routes, the buttery-smooth UI transitions, that is our playground. But once you ship eight production apps and run a registered software studio from East London, you realize a brutal truth: code that nobody sees solves no problems.

Instead of hiring out or getting sucked into daily manual social media loops, I decided to engineer my way out of the problem. This week inside JarvisOS, I shipped a complete marketing department into the codebase.

Here is what the stack looks like now:

  • B2 Weekly Auto-Plan: A deterministic slot planner executing on a Sunday cron at 18:00.
  • B3 Generators: Reading directly from our internal markdown corpus slots.
  • B4 Command Center: A full API and UI for dispatching content.
  • B5 Account Portfolio: Tracking roles, strategies, streaks, and best-performing posts per account.
  • CF1 Cloudflare Browser Run: Offloading PNG/PDF renders to the edge with a local Chrome fallback.

One of the most satisfying engineering moments this week was fixing our corpus reading pipelines. An unanchored gitignore rule had silently hidden any new src/**/corpus file, and a silent 1,000-row cap was truncating our corpus database stats. We also tackled UTF-8 mojibake across 27 files where special characters had turned into cryptographic-looking garbage during early AI prompt generation.

// Ensuring honest corpuses: paged corpus reads and strict URL hardening
export async function readPagedCorpus(cursor: string, limit = 100) {
  const slice = await db.corpus.findMany({
    take: limit,
    skip: cursor ? 1 : 0,
    cursor: cursor ? { id: cursor } : undefined,
  });
  return slice;
}
Enter fullscreen mode Exit fullscreen mode

We also built read-only Instagram and Facebook historical graph importers that backfill likes and comments onto existing posts idempotently across a 180-day window, and hardened our wing-insight URLs to prevent token-leaking query parameters.

When your tooling lives inside your monorepo, marketing stops feeling like a distraction and starts feeling like an extension of your compiler.

How do you balance writing code with getting it into the hands of users?

Top comments (0)