The Finances panel 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/finances is the planned administrative view for monitoring all monetary activity on the Ad Management System. In its current state the route renders a placeholder. Budget data for every campaign is already stored in MongoDB and is accessible through the existing GET /api/campaign endpoint, which will power this panel once the front-end is built.
Route
Current Implementation
The page component currently renders a single placeholder element:Planned Financial Metrics
The following metrics are planned for the Finances panel, derived from fields already present on every campaign document:Total Ad Spend
The sum of all
budget values across every campaign in the database, regardless of status.Per-Advertiser Breakdown
Budget totals grouped by the
user reference on each campaign, showing allocation across each advertiser’s portfolio.Budget by Campaign Status
Distribution of total budget split across
Active, Live, and End campaigns.Platform Earnings Overview
A high-level revenue summary derived from campaign budget data to support platform-level financial reporting.
Relevant Campaign Data Model Fields
The financial metrics above will be computed from fields on the campaign schema inmodels/campaign.ts:
| Field | Type | Description |
|---|---|---|
budget | String | The allocated budget for the campaign |
status | String | Active, Live, End, or Deleted — determines spend state |
user | ObjectId | Reference to the User document who owns the campaign |
duration | String | Campaign duration, used to contextualize spend over time |
Aggregating Budget Data
Budget figures can be derived from the existingGET /api/campaign endpoint without a dedicated financial endpoint. The pattern below shows how total platform spend can be computed from the response:
The Finances page (
/admin/finances) currently renders a placeholder. All budget data needed to power the financial metrics above is available through GET /api/campaign and is ready to be consumed once the front-end build is complete.