/vivreal-knowledge:vivreal-admin-app-knowledgefrom vivreal-knowledge
Use when working on, walking, deploying or reasoning about the internal admin app (vivreal-hq packages/admin-app), the invite-only, sign-in-only staff hub that holds every staff surface since v7 (outreach CRM, sign-ups, monitoring, errors, tickets, flags, audit, usage, economics, deployed sites, team, staff push), covering where it lives, its own identity pool and session, how it calls the fleet with no active_ctx, the deploy by fast-forwarding deploy/admin-app, its two ops Lambdas, what each page reads, including the dark navy restyle and the Releases, Database, Marketing and Inbound pages. Source of truth: `vivreal-hq` `packages/admin-app/CLAUDE.md` (and the docs it links) at `origin/deploy/admin-app`.
Ships in vivreal-knowledge. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Cross-repo flows, decisions and maps: the vivreal-hq dev docs under ${VIVREAL_REPOS}/vivreal-hq/docs/dev-docs/, starting at 02-architecture/the-admin-app.md; npm run docs:route -- "admin app" from vivreal-hq names the rest. This skill and the repo's CLAUDE.md own the repo's internals.
Source of truth: vivreal-hq packages/admin-app/CLAUDE.md (and the docs it links) at origin/deploy/admin-app.
Last synced: 2026-10-20 (vivreal-hq origin/main 28bb8b4a; deploy/admin-app at 482b746a, an
ancestor of main with no packages/admin-app commits between them)
Source of truth, read in this order: packages/admin-app/CLAUDE.md, the code under
packages/admin-app/src/, then docs/dev-docs/02-architecture/the-admin-app.md (written 2026-10-04;
its page list and its "501 at the deployed ref" status box are older than v7, so trust the code where
they differ). Per page detail: references/pages.md.
AllowAdminCreateUserOnly
(cloudformation/admin-identity.yaml), and the Team page's roster is a fixed list of three
addresses (src/lib/team/operatorState.ts, TEAM_ROSTER). Do not copy those addresses anywhere.active_ctx, no dbKey switch. Every upstream call names its
target groupID in the request.packages/fleet-ops publishes the numbers; this app reads what it
published. A page that starts polling a health endpoint or the database directly is rebuilding a
producer. Every fleet-ops collector still runs from a terminal without this app.The outreach CRM moved out of the portal in v7 (pages under src/app/outreach/, routes under
src/app/api/outreach/). A production problem with admin outreach is fixed forward here (and in
VR_Outreach_API), never by restoring the old portal CRM (owner, 2026-10-20). Only the three
operators use it, so it does not gate a portal release. Admin outreach sequences carry no opt-out
wording by owner decision; portal campaigns keep theirs (see vivreal-knowledge:vivreal-product-rules).
Vivreal-Admin-Identity (cloudformation/admin-identity.yaml): MFA
ON with software TOTP the only factor, admin-created users only, ID and access tokens an hour.
Verify MFA with get-user-pool-mfa-config; describe-user-pool reads its MFA fields back as
null (the template's own comment).src/app/api/auth/signin/route.ts). Every failure at the password step answers one generic
401, so nobody can probe which addresses exist. Outcomes go to the /vivreal/admin-auth log group.
A sign-in form never submits credentials by GET; a stray credential query is redirected to the
clean URL unread (src/proxy.ts, src/app/api/auth/form-fallback/route.ts).admin_session, audience vivreal-admin, keyed from ADMIN_CTX_SECRET,
1-day idle window, 7-day absolute cap (src/lib/adminSession/sessionPolicy.ts, owner ask; the refresh
token cookie lives as long as the absolute cap). src/proxy.ts (Next 16's
replacement for middleware.ts, Node runtime) re-mints it on every request and refreshes the
Cognito ID token near expiry. Cookies set no Domain.ADMIN_EMAILS, which every backend gate reads) is what grants. The landing page makes one gated
read and turns a 403 into a named refusal (src/lib/adminSession/rosterCheck.ts). Adding an
operator means the pool AND the list.src/lib/secrets reads
CTX_SECRET from <secret-prefix>/ctx and the session key plus the pool client secret from
<secret-prefix>/admin-app through the compute role, and logs only a VersionId. Outside production
(vitest, next dev) the environment is the only source.src/lib/upstreamsrc/lib/upstream/index.ts is the only code that calls another service.
active_ctx. The target groupID goes in the body.X-App-Source: vivreal, always, literally. It is a tenant partition, not a client name. Any
other value answers a clean, wrong, empty list instead of an error.src/lib/upstream/csrf.ts), because the
portal's derives from active_ctx.Two credentials ride each call: the admin pool's ID token as a bearer, and an x-user-ctx minted
for exactly the audience called, from a leaf of CTX_SECRET, living 60 seconds. Holding
CTX_SECRET means this app can speak for any group, which is why the pool's MFA is load bearing.
The one exception that also mints x-active-ctx is VR_Outreach_API, which requires one on every
request; it is only ever pointed at the fixed internal cohort group (src/lib/upstream/outreach.ts),
never a customer's.
Secure's admin routes bind to the admin pool's authorizer, and every handler still runs
requireGlobalAdmin against ADMIN_EMAILS. Count Path: /api/admin events in Secure's
cloudformation/ for the current set; never quote a number.
Read before adding a route under src/app/api/:
op, each op looked up in its own table by own key only
(Object.hasOwn), so a write is never reachable by GET and op=constructor is unknown.claims.email from the verified session, never a body field.expected); Outreach writes only while it still holds and answers 409, which the
page turns into "this changed, reload".admin.outreach.change,
admin.suppression.change, admin.push.change): done, refused or failed. A write that landed but
could not be logged says both.The compute role can invoke exactly two functions; everything an operator does to AWS goes through
them (cloudformation/ops-read.yaml, ops-write.yaml; code under lambda/).
overview,
writeAuditLog, deployedSha, costSnapshot and costSnapshotRead, siteHosts,
featureSignals, searchCheckRead, sentryIssues, clickupTasks (lambda/ops-read/src/index.js;
read the dispatch for the current list). Its third-party read tokens live in <secret-prefix>/ops-read
with a rotation table in the package CLAUDE.md. Its log group keeps 400 days on purpose.runAuditor, sendTestAlert,
purgeCdn, each written to /vivreal/ops-write-audit. purgeCdn plans by default and writes
only on an explicit confirm, rebuilding the plan server side.deploy/admin-appmain deploys nothing to this app. An Amplify app builds the
deploy/admin-app branch as production; moving that branch is the deploy. The release step is a
fast-forward of deploy/admin-app to the reviewed main commit, then the build, then a read of
the served app. Never write "merge deploys" in a PR body (v7 runbook U15 did).amplify.yml, scoped with
appRoot: packages/admin-app and a workspace-scoped npm ci. Amplify reads amplify.yml only
from the root; a copy in the package is ignored. PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 is load
bearing (Next 16 pulls playwright as a peer).scripts/assert-artifact-clean.mjs is an allowlist: the build fails if any
output file resolves outside the package. It also runs against scripts/fixtures/dirty-artifact/,
which must fail, or the build fails. This is what keeps packages/leadgen/Data/ and the tracked
media out of every artifact. Re-read it before changing what this package builds.amplify.yml line. An Amplify console variable is
invisible to next build unless the spec copies it into .env.production (#59 did this for the
VAPID public key, without which notifications could not turn on).scripts/deploy-admin-identity.sh and
scripts/deploy-ops-stacks.sh. Prove a stack deploy from stack state, not from the script's exit.npm run test:admin from the repo root (vitest plus the Lambdas' node --test); npm run typecheck in the package. Node 22.next dev with a 500 while next build passed (the minifier dropped the rule). The four
@source not lines in src/styles/globals.css and src/styles/tailwindSourceScan.test.ts keep
that fixed; do not remove them.src/components/UI/);
retoken.test.ts fails on portal-only classes. Adding a dependency on Windows: diff the lockfile
package keys before and after (npm install drops Linux @emnapi/* entries) and prove with npm ci.& or %, which cmd.exe interprets), escape every
typographic single quote, and test the refusals.vivreal-product:qa-walker, whose "Walking the admin app" section covers
the operator sign-in, the head to name in the matrix, and the fix-forward rule.origin/deploy/admin-app 08f2d444, 2026-10-27)PageFrame and PageHead wrap every page.releases, plus the
deployed-SHA and search-check reads. Read-only.action: 'database', which reads CloudWatch
Vivreal/Mongo and atlas-monitor's census lines. Read-only; nothing on it writes.The page list grows; references/pages.md is the table, and git ls-tree origin/deploy/admin-app packages/admin-app/src/app is the check before quoting it.
vivreal-workflow:shared-standards (the vivreal-hq repo row and deploy table),
vivreal-infra:vivreal-notifications (the admin push surface: devices subscribe with
surface: 'admin', staff types go only to admin devices), vivreal-infra:vivreal-observability
(the alarm estate the Monitoring page reads), vivreal-knowledge:vivreal-outreach-api-knowledge
(the routes the outreach pages call).
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub hillbombcreations/vivreal-skills --plugin vivreal-knowledge27 skills in this plugin
/sentry-tracerUse when investigating what happened during a Vivreal user action across the stack, tracing an error end-to-end, validating a deploy, or doing tenant-scoped triage with Sentry. Teaches WHEN to trace cross-stack (frontend spans ↔ backend logs ↔ WebSocket events) and HOW (trace-ID propagation, the standard tag set, request_id fallback, service.* breadcrumbs). Triggers on: "what happened when I did X", "why did this error", trace this request, Sentry issue, deploy validation, "everything's broken for this group", crash, error timeline. For the full investigation agent with Sentry MCP tools wired in, dispatch the `sentry` agent / `/sentry-trace` (both in the `vivreal-sentry` plugin); this skill is the passively-loaded knowledge layer. Also covers the step from a Sentry error to the AWS and Atlas metric that confirms an infrastructure cause (502 with no backend event, Lambda timeout, Mongo connect-hang, throttling, OOM, stalled deploy)./vivreal-accounts-and-writesUse before filming, walking or capturing anything in the Vivreal portal or on vivreal.io, and before any write a capture or walk makes. Carries which login to use for which business (the demo account, the QA scratch owner, the owner session), the eight-step owner-approved write protocol (named approval, snapshot, write through the UI, fresh-process read-back, restore, manifest entry), the never-list (Post, Publish, Schedule, Connect and the rest), and the rules for stills that fill vivreal.io marketing slots (pair by what the slot says, no demo site has its own web address, mask comped plan figures). Shared by footage-recorder, tutorial-maker, help-page-producer, qa-walker and marketing-auditor. Triggers on: which login, demo account, QA scratch-2, test account, switch business, owner-approved write, write protocol, snapshot and restore, mutations, marketing still, screenshot swap, vivreal.io slot, walk harness, write guard, POST allow list, PRO badge./vivreal-agent-knowledgeUse when working on, writing about, or debugging Vivreal AI. The AI offering is connecting an AI agent through the Vivreal MCP server (VR-MCP-Server, plan flag mcpAccess, metered in mcpToolCalls), and nothing else: the in-app assistant is RETIRED (owner 2026-10-07, agentActions 0 on every tier; the global FAB, drawer and /agent page were deleted 2026-09-24) and only dead code survives in the portal (Studio AiRail, EditPlan) and VR_Secure_API's agent Lambda. Covers the copy rule ("AI agent", never assistant or a model name), the real gates, and the retired surface's archaeology. Triggers on: AI agent, MCP, connect an AI agent, AI assistant, AI assistant not showing, agentActions, aiActionsEnabled, aiSiteEditing, aiComponentGen, mcpAccess, mcpToolCalls, AiRail, useAgentAccess, EditPlan, proposeSiteEdits, agent/execute, agentProgress. Sources: VR-MCP-Server, Vivreal-Tier-Quotas src/tierQuotas.ts./vivreal-analytics-knowledgeUse when working on Vivreal's first-party analytics, VR_Analytics_API (the collect→store→rollup pipeline), the Templates SiteBeacon, or the per-site traffic dashboard (VR_Secure_API read route + portal AnalyticsPanel). Covers the CloudFront+WAF → Lambda Function URL ingest chain (X-Origin-Verify, bot filter, Joi, per-IP rate limit, daily-salt visitor hash), the analytics_rollup DynamoDB design, the daily rollup cron into mainDb.site_traffic_daily, the LIVE auto-deploy status (GitHub Actions → CloudFormation) plus the W4 CDN egress meter (runs unconditionally), and where increment 2 lives. Triggers on: analytics, site traffic, beacon, SiteBeacon, visitor stats, page views, unique visitors, analytics_rollup, site_traffic_daily, first-party analytics, per-site dashboard, collect.vivreal.io, visitor hash, rollup cron, CDN egress meter, VR_Analytics_API. Source of truth: `VR_Analytics_API` `CLAUDE.md` (and the docs it links) at `origin/main`./vivreal-blender-knowledgeUse when scripting or rendering in Blender for Vivreal, above all the Vivreal duck mascot in vivreal-hq/brand/mascot/model. Covers headless renders (blender -b -P script.py -- args, --factory-startup, --python-exit-code), bpy data versus ops, bmesh, depsgraph evaluated_get and new_from_object, mathutils transform gotchas, flat toon and NPR rendering in EEVEE (Emission plus the Standard view transform, exact sRGB hex, dither, filter size, transparent film, orthographic framing), outline methods compared (Freestyle, Grease Pencil Line Art, inverted hull, ID-pass edge inking), and the 4.2 to 5.2 API changes that break scripts (EEVEE engine id, blend_method, use_nodes, Grease Pencil v3). Triggers on: Blender, bpy, bmesh, headless render, background render, EEVEE, Workbench, Cycles, toon, cel, NPR, outline, inverted hull, Freestyle, Line Art, Grease Pencil, view transform, AgX, Filmic, mascot, the duck, duck.py, render.py, mascot-artist./vivreal-brand-voiceUse when writing, reviewing, or critiquing Vivreal marketing copy, messaging, or brand content, landing pages, pricing copy, social posts, cold email, ad copy, onboarding/in-app copy, taglines, or any customer-facing words. Teaches the Vivreal voice (the "Approachable Guide" for non-technical SMB founders), the promise ("Create once. Publish everywhere." + easy, phone-first), the hard-banned words/patterns, the framing rules + honesty floor, the competitive frame, an on-voice audit rubric, channel best-practices, and AI prompt scaffolding. Triggers on: brand voice, tone, copy, messaging, marketing content, landing page copy, pricing copy, cold email, social post, ad copy, tagline, headline, value prop, positioning, on-voice, jargon, CTA, social proof, founder-led. The `marketing-auditor` agent grounds in this skill; the content and leadgen agents in vivreal-hq PRODUCE to this voice. Canonical source: ${VIVREAL_REPOS}/vivreal-hq/brand/voice.md (vivreal-content was merged into vivreal-hq on 2026-08-03).