Admin Runbook
The admin console lives under /admin and is protected by ProtectedRoute, gating access to signed-in staff accounts. The sidebar (src/components/admin/AdminSidebar.tsx) is the map of every section; this runbook explains what each route is for and what to check day-to-day.
Route-by-route guide
/admin — Overview
The landing dashboard (AdminOverview). Gives a snapshot of account activity — new signups, trial states, and headline metrics — so an operator can spot anything unusual before drilling into a specific section.
/admin/users — Users & Signups
Lists customer accounts and incomplete signups. Use this to look up a specific account, check plan/trial status, and investigate access issues. This is the first stop for "a customer says they can't log in" or "a customer says their plan is wrong" tickets.
/admin/plans — Plans & Pricing
Manages the subscription plan catalogue (pricing tiers, limits, features shown on the pricing page). Changes here affect what customers can buy and what their accounts are entitled to, so treat it as a production configuration screen, not a test area.
/admin/discount-codes — Discount Codes
AdminDiscountCodes manages promotional and partner discount codes — creation, expiry, and redemption limits. Check here when a customer reports a code "not working" or when a campaign needs a new code issuing.
/admin/leads — Demo Leads
AdminLeads shows leads captured from the marketing site (demo requests, contact forms) before they become paying customers. Sales and marketing use this list; it also feeds the weekly Mailchimp blog campaign (see email-system.md).
/admin/support-tickets — Support Tickets
AdminSupportTickets is the queue for customer support requests submitted through the app. Tickets trigger support-acknowledgement and support-reply emails (see the email system doc). Check this daily — it is the primary channel for customer-reported issues.
/admin/conversations — Chat Conversations
AdminConversations shows in-app chat/AI assistant conversations, including any that were handed over to a human (triggering the chat-handover email). Use it to audit assistant behaviour and follow up on escalated conversations.
/admin/discount-codes, /admin/challenges, /admin/managed, /admin/onpage-editor, /admin/self-seo, /admin/seo-check
These sit alongside the core sections in the sidebar and cover product-specific tooling (managed-service accounts, gamified challenges, on-page content editing, and the site's own self-SEO autopilot/checks). They are operationally important but outside the scope of this runbook's core checks — see in-app tooltips and page headers for details.
/admin/cron-jobs — Cron Jobs
AdminCronJobs renders the job catalogue defined in src/lib/cron/schedules.ts (see scheduled-jobs.md for the full list) so staff can see what is scheduled to run and when, without reading source code.
/admin/cron-status — Cron Status
AdminCronStatus queries the underlying pg_cron job/run tables and shows, per job: whether it is active, the last run's start/end time and status, and a short history of recent runs. This is the fastest way to confirm a scheduled job actually fired and succeeded, or to find the error message from a failed run.
/admin/audit-logs — Audit Logs
AdminAuditLogs is the append-only record of sensitive admin actions (e.g. plan changes, user edits, discount code changes). Use it to answer "who changed this and when" during an incident review or a customer dispute.
/admin/email-engagement — Email Engagement
AdminEmailEngagement reports on outbound email performance by combining email_send_log (what was sent) with email_events (opens/clicks, recorded via the tracking pixel/link endpoints — see email-system.md). It currently focuses on the winback template family; use the day-range selector (7/30/90 days) to review send volume and engagement trends.
/admin/dev-agent — Dev Agent
AdminDevAgent is an internal AI coding/reasoning assistant chat, built on useChat/ai-sdk, used by staff to investigate the codebase, draft fixes, or explore data. It keeps a thread history (/admin/dev-agent/:threadId) so past investigations can be revisited. Treat it as an internal tool — not customer-facing.
/admin/integrity — Integrity Sentinel
AdminIntegritySentinel shows automated findings from a background integrity-checking process: each finding has a category, severity (low/medium/high/critical), a fingerprint (for de-duplication), and a fix_hint. Findings are grouped into runs with started_at/finished_at/status. Use this page to triage data or system anomalies flagged automatically, mark issues resolved once fixed, and re-run checks with the refresh control.
Daily operator checks
- Support Tickets: clear or triage any new tickets; confirm acknowledgement emails went out.
- Cron Status: scan for any job whose last run status is not a success, especially the daily jobs (rank checks, trial expiry, trial nudges, nurture emails).
- Integrity Sentinel: review any new
high/criticalfindings raised since the last check. - Users & Signups: spot-check any support-flagged accounts for plan/trial mismatches.
- Chat Conversations: check for conversations handed over to a human that haven't been followed up.
Weekly operator checks
- Email Engagement: review 7/30-day trends for the winback sequence; a sharp drop in opens/clicks can indicate a deliverability problem (check the
LOVABLE_API_KEY-backed send pipeline and any recent domain/DNS changes). - Cron Jobs / Cron Status: confirm the weekly jobs fired —
send-weekly-digest(Mondays) andmailchimp-blog-campaign-weekly(Wednesdays) — and thatmailchimp-plan-sync-dailyhas been running cleanly all week (a backfill can be triggered manually if it has drifted). - Audit Logs: review the week's admin actions for anything unexpected, particularly plan or discount code changes.
- Discount Codes: check for codes expiring soon or nearing redemption limits ahead of any planned campaigns.
- Demo Leads: confirm the lead list feeding the Mailchimp blog campaign is being kept current and free of obvious test/duplicate entries.