{
  "id": 14382196,
  "title": "How I Built AdCampaignManager A Production-Ready MERN Stack Generative AI Advertising SaaS Platform",
  "url": "https://urgent.news/2026/10/14/how-i-built-adcampaignmanager-a-production-ready-mern-stack",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-14T06:03:28.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/rishabhpandey/how-i-built-adcampaignmanager-a-production-ready-mern-stack-generative-ai-advertising-saas-platform-4970"
  },
  "original_language": "en",
  "account": "In the world of advertising campaign management, existing tools often fall short for small agencies and freelancers who find them either too expensive or too complex. The solution lies in AdCampaignManager, a full-stack advertising campaign management platform that integrates real-time data with generative AI.\n\nThe platform utilizes a robust tech stack, including React.js with Vite and Tailwind CSS v4 for the frontend, Node.js and Express.js for the backend, MongoDB and Mongoose for the database, Socket.IO for real-time communication, Groq LLM (openai/gpt-oss-120b) for the AI layer, Cloudinary for image uploads, Nodemailer for email, Node-Cron for scheduled tasks, JWT and Bcrypt for authentication, and OTP for additional security measures.\n\nAdCampaignManager boasts ten core modules. The dashboard presents real-time KPI cards for impressions, clicks, conversions, revenue, CTR, CPC, ROI, and CVR, all fetched live from MongoDB aggregation pipelines. The authentication system uses JWT with access and refresh tokens, stored in localStorage, alongside email OTP verification and 2FA. Campaign management allows full CRUD operations with status transitions from draft to scheduled, running, paused, completed, cancelled, duplicate, compare, audience management, analytics and insights, subscription plans, reviews and moderation, team collaboration, support tickets, AI insights, and support.\n\nThe AI layer is present in every module, with each AI service powered by the Groq LLM. Specific AI services include analytics AI, campaign AI, audience AI, plan AI, review AI, insights AI, and support AI. Each service is designed to generate insights, advise, forecast, write, detect anomalies, and more.\n\nKey engineering decisions include using JSON mode for all AI prompts to prevent parsing errors and broken UI, a cleanValue helper to sanitize placeholder values returned by the AI, and post-processing to filter arrays after every AI response. Real-time team chat was achieved through Socket.IO room-based subscriptions, allowing clients to join only the rooms they need to keep bandwidth low and updates instant.\n\nChallenges faced during development included ensuring AI output reliability, implementing real-time team chat, achieving fast analytics queries, managing multi-role permissions, and handling campaign lifecycle transitions. These challenges were tackled by forcing JSON mode at the API level, sanitizing values with the cleanValue helper, filtering arrays during post-processing, using Socket.IO for real-time chat, implementing a daily snapshot cron job for analytics aggregation, checking for owner and admin roles, and managing campaign states with auto transitions.",
  "summary": "Existing advertising campaign tools are either too expensive or too complex. Most small agencies and freelancers still manage campaigns in spreadsheets. There is no middle ground. So I Built AdCampaignManager — A Full-Stack Advertising Campaign Management Platform That Combines Real-Time Data With Generative AI. Here Is The Complete Breakdown Of How It Works. ━━━━━━━━━━━━━━━━━━ 🛠️ The Tech Stack…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}