Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Priyanshu471/ad-management/llms.txt

Use this file to discover all available pages before exploring further.

The Ad Management System is a full-stack web application that streamlines the end-to-end lifecycle of digital advertising — from campaign creation and targeting to performance analytics and media management. Built on Next.js 14 with a MongoDB backend, it provides three distinct role-gated portals for Admins, Advertisers, and Content Creators, each with a purpose-built dashboard tailored to their responsibilities.

What It Is

The Ad Management System connects advertisers who want to run campaigns with content creators who can host or fulfill them, while giving administrators a central control plane over the entire platform. Each user registers with a specific role, and the application automatically routes them to their dedicated portal — /advertiser, /creator, or /admin — after login. There is no shared UI between roles; every dashboard, sidebar menu, and feature set is gated by the authenticated user’s role stored in the Zustand useUser store. The platform handles campaign CRUD operations through a REST API layer built with Next.js App Router API routes, persists all data to MongoDB via Mongoose models, and delivers rich analytics through ApexCharts visualizations. Media assets (images, videos, and logos) are managed through a dedicated Media Library backed by EdgeStore.

Key Features

Role-Based Access Control

Three distinct portals — Admin, Advertiser, and Creator — each with its own layout, sidebar navigation, and guarded routes. Unauthorized access redirects to the login page.

Campaign Creation & Targeting

Advertisers can create campaigns with rich targeting parameters including demographics, interests, location, age range, and income bracket, along with budget and duration settings.

Campaign Management

Full campaign lifecycle tracking with four status states: Active, End, Live, and Deleted. Campaigns can be edited or removed via the campaigns table.

Analytics with ApexCharts

Interactive charts powered by react-apexcharts display key performance metrics including Click-Through Rate (CTR) and audience engagement data for both advertisers and creators.

Media Library

A centralized media library (backed by EdgeStore) lets advertisers and creators upload, organize, and reuse images, videos, and logos across multiple campaigns.

Zustand Global State

Six lightweight Zustand stores manage authentication state, campaign modal state, data-fetching state, image URLs, and UI open/close flags — all without a context provider tree.

MongoDB & Mongoose Persistence

All users and campaigns are stored in MongoDB using strongly-typed Mongoose schemas. The connection helper prevents duplicate connections during Next.js hot reload.

Next.js App Router & API Routes

Built entirely on the Next.js 14 App Router. Server-side REST endpoints under /api/ handle authentication, campaign CRUD, and user listing with full CORS headers configured.

Tech Stack

The following technologies power the Ad Management System:
LayerTechnology
FrameworkNext.js 14 (App Router)
LanguageTypeScript
StylingTailwind CSS
UI Componentsshadcn/ui (Radix UI primitives)
DatabaseMongoDB + Mongoose
State ManagementZustand
ChartsApexCharts (react-apexcharts)
NotificationsSonner
ValidationZod
Media StorageEdgeStore
Password Hashingbcryptjs

Get Started

Ready to run the platform locally? The quickstart guide walks you through cloning the repo, configuring your MongoDB connection, and launching all three role dashboards in minutes.

Quickstart

Clone, configure, and launch the Ad Management System on your local machine in under five minutes.

Build docs developers (and LLMs) love