The Admin portal is the control center of the Ad Management System, built exclusively for platform administrators. Accessible atDocumentation 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.
/admin, it wraps all child routes in a shared layout that renders a persistent sidebar, a top Header bar, and the page content area. Any visitor who is not logged in is intercepted before the layout renders and is shown an access prompt that redirects them to the login page.
Admin Capabilities
User Management
View all registered Advertisers and Creators in two role-split tables. Inspect names, email addresses, and membership history at a glance.
Campaign Oversight
The Manage panel is planned to surface every campaign across all advertiser accounts, with API support for status updates and deletion already in place.
System Settings
The Settings panel is planned to expose platform-wide configuration controls. Currently, all configuration is managed through environment variables.
Finances
The Finances panel is planned to aggregate campaign budget data across all advertisers. The underlying campaign API that powers this view is already functional.
Sidebar Navigation
The admin layout renders a persistent sidebar using the sharedSidebar component populated with the adminMenu array from lib/menu.ts. Each entry maps a label and icon to a protected route:
| Menu Item | Route | Icon |
|---|---|---|
| Dashboard | /admin | LayoutGrid |
| Users | /admin/users | UserRoundCog |
| Manage | /admin/manage | FolderKanban |
| System Settings | /admin/settings | Settings |
| Finances | /admin/finances | Landmark |
router.push(menu.link) and marks the item as active via the useActive hook, which applies the bg-graydark dark:bg-meta-4 highlight class to the selected entry.
Access Control
The admin layout (app/admin/layout.tsx) checks the Zustand useUser store on every render. If isLoggedIn is false, it returns the AuthGuard component immediately — no sidebar or content area is rendered.
The AuthGuard component (app/admin/_components/authGaurd.tsx) displays a centered message showing the path the user tried to access, a prompt to log in, and a link to the login page. Simultaneously, a useEffect inside AuthGuard calls router.push(LOGIN_ROUTE) — which resolves to / — as soon as the component mounts, so unauthenticated visitors are automatically redirected to the login page.
Dashboard Page
The Dashboard page at/admin currently renders a minimal placeholder: