Skip to Content
ReportsReports

Reports

Feature: Monthly performance reports per tenant · Status: [Live]

Reports are AI-written or DM-uploaded performance summaries that clients can read and download. They appear in both the Dashboard (client portal, :3000) and the DM Portal (:3002).


Contents

DocWhat it covers
ScreensList page + Detail page — layout, fields, actions
ArchitectureData model, BullMQ worker, API endpoints, Agent Chat tool

Report Sources

Three sources are merged and sorted by createdAt desc on both list pages:

sourceHow it’s createdcreatedBy shown
agentActivity planner creates a monthly_report activity; when the activity status reaches done, it appears in Reports”Report Agent”
dm_uploadDM manually uploads a PDF or Markdown file via the Upload modaluploadedByName
ai_generatedUser submits a prompt + date range; BullMQ custom-report-writer worker generates itrequestedByName

Portals

PortalURLCan generate AI reportCan uploadCan view
Dashboard/reportsYesNoYes
DM Portal/reportsYesYesYes

PDF Export

Markdown reports (both agent and ai_generated) can be downloaded as a branded PDF from the detail page. The export uses marked.parse() → branded HTML cover + TOC + content + footer → window.open()window.print(). PDF reports (dm_upload with contentType=pdf) link directly to the DigitalOcean Spaces URL.

© 2026 Leadmetrics — Internal use only