Dependency-free report formatting helpers for AdPages exports.
This package is intentionally separate from @a1local/adpages-audit-core. It accepts plain audit-like objects and checklist-like rows, so browser extensions, the CLI, GitHub Actions, Google Sheets, WordPress, and later paid report surfaces can reuse the same export helpers without pulling in a specific audit engine.
- CSV escaping and row formatting for spreadsheet-safe checklist exports.
- Checklist CSV rows from generic result objects with fields like
id,category,status,impact,title,summary,recommendation,evidence, andweight. - Client report metadata normalization for extension, CLI, GitHub Action, Sheets, WordPress, and paid report sources.
- A simple JSON artifact wrapper for storing audit payloads, metadata, summaries, results, and report notes.
- Report surface notes that mark current free exports and planned paid report formats.
import {
createClientReportMetadata,
createJsonArtifact,
createReportNotes,
renderChecklistCsv
} from "@a1local/adpages-reporting";
const metadata = createClientReportMetadata({
clientName: "Example Plumbing",
projectName: "Emergency plumber landing page",
url: "https://example.com/emergency-plumber/",
source: "extension"
});
const csv = renderChecklistCsv(audit.results);
const artifact = createJsonArtifact({
metadata,
report: audit,
notes: createReportNotes()
});The free reporting surface should stay practical and portable:
- CSV for spreadsheet review and lightweight handoff.
- Markdown for readable local, CLI, GitHub Action, and pull-request comments.
- JSON for extension storage, CLI output, automation artifacts, and integration handoff.
Later paid surfaces can build on the same metadata and normalized artifact:
- branded PDF reports
- batch client reports
- white-label agency reports
- Google Sheets add-on exports
- WordPress admin reports
This package only prepares the shared reporting shape. It does not include PDF rendering, billing, license checks, remote crawling, account syncing, or WordPress/Sheets APIs.
Helpers do not import @a1local/adpages-audit-core. They work with audit-core-like results, for example:
const rows = renderChecklistCsv([
{
id: "cta-phone",
category: "conversion",
status: "warn",
impact: "important",
title: "Phone CTA is hard to find",
summary: "The primary phone CTA appears below the first viewport.",
recommendation: "Move click-to-call into the hero."
}
]);