From df3dbb63c4f4d41e240c54c6580f7e2081c435e6 Mon Sep 17 00:00:00 2001 From: metatroncubeswdev Date: Tue, 27 Oct 2026 00:48:32 -0400 Subject: [PATCH] Visual reports and client Screenshots tab - Reports: mc: blocks (score, KPIs, reach, funnel, followers, formats, rhythm, top posts, actions, screenshots, callouts) drawn as SVG from stored account data, frozen per report; same page in PDF and preview - Audit/weekly-report runs refresh account numbers first - Screenshots tab: monthly shot list, uploads, examples; audit reads them Co-Authored-By: Claude Opus 5.5 --- .claude/skills/account-audit/SKILL.md | 20 +- .../skills/account-audit/example-client.md | 87 ++++++ branding/report.css | 145 ++++++++++ dashboard/server/docs.js | 6 +- dashboard/server/index.js | 10 + dashboard/server/jobs.js | 6 + dashboard/server/screenshots.js | 113 ++++++++ dashboard/web/src/pages/Client.jsx | 7 +- dashboard/web/src/pages/Screenshots.jsx | 142 ++++++++++ tools/report-pdf/blocks.mjs | 268 ++++++++++++++++++ tools/report-pdf/build.mjs | 12 +- 11 files changed, 800 insertions(+), 16 deletions(-) create mode 100644 .claude/skills/account-audit/example-client.md create mode 100644 dashboard/server/screenshots.js create mode 100644 dashboard/web/src/pages/Screenshots.jsx create mode 100644 tools/report-pdf/blocks.mjs diff --git a/.claude/skills/account-audit/SKILL.md b/.claude/skills/account-audit/SKILL.md index 5e8218e..1ecf815 100644 --- a/.claude/skills/account-audit/SKILL.md +++ b/.claude/skills/account-audit/SKILL.md @@ -7,12 +7,12 @@ description: Audit one client's Instagram and Facebook using live data and write 2. Pull data with the social-manager tools: - `instagram_insights` (28 days), `instagram_recent_posts` (limit 20) - `facebook_page_insights` (28 days), `facebook_recent_posts` (limit 10) - - If a `profile-check-YYYY-MM.md` or `screenshots/` exists for the client, read it. It overrides anything guessed from the API (bio link, highlights, visuals, Page buttons, reviews). + - Screenshots: the team uploads them in the dashboard (client → Screenshots) to `clients//screenshots/YYYY-MM/`, one file per shot: `ig-profile`, `ig-grid`, `ig-reels`, `fb-page`, `fb-reviews`, `gbp`, `gbp-reviews`, `bio-link` (.png/.jpg/.webp). Read every image in the newest month folder (and `profile-check-YYYY-MM.md` if present). They override anything guessed from the API (bio link, highlights, visuals, Page buttons, reviews). List missing required shots (`ig-profile`, `ig-grid`, `fb-page`, `gbp`) under open questions instead of guessing. 3. Analyse against `playbooks/instagram.md` and `playbooks/facebook.md`: - Posting frequency and gaps; format mix (Reels vs carousel vs static). - Top 3 and bottom 3 posts by reach and by shares+saves — what do the winners have in common? - Reach vs followers (is content leaving the follower bubble?). - - Profile: bio, link, highlights, consistency of visuals (ask the user for a screenshot if needed). + - Profile: bio, link, highlights, consistency of visuals (from the screenshots; if missing, note it rather than asking mid-run). 4. Write **two** reports for the month: **a) `clients//audit-YYYY-MM-internal.md`**: for the agency team only. @@ -28,20 +28,24 @@ description: Audit one client's Instagram and Facebook using live data and write - The PDF carries Metatroncube branding (it's our private deliverable to the client). Inside the text, never mention other clients, team members, tools/APIs or internal file names. Write as "we". - Structure: **Summary** (3–4 sentences) → **Your numbers this month** (short table, 5–7 metrics) → **What's working** → **What we're changing** (3–5 points framed as the plan, not blame) → **Next 30 days** → **What we need from you** (checklist). - Leave out: raw data caveats, internal compliance doubts (turn them into neutral questions in "What we need from you"), mistakes we're fixing quietly, cross-client notes, budgets we haven't discussed with them. - - Keep it to roughly one page. Before saving, check it doesn't contradict the internal version. - - **Front matter for the branded PDF:** start each report file with front matter. The PDF builder turns it into the dark title block and 4 headline-number cards, so don't add a `#` H1: + - Short text, mostly visuals: 3–4 PDF pages. Before saving, check it doesn't contradict the internal version. + - **Front matter:** start each file with it (no `#` H1; the builder draws the title block): ``` --- client: report: · period: accounts: Instagram @handle · Facebook Page - prepared: - kpis: - - |