Date: 2026-04-07
App: apps/money-mirror
Schema source of truth: apps/money-mirror/schema.sql
Verdict: APPROVE deployment readiness
- Automated evidence:
npm --prefix apps/money-mirror run buildcompleted successfully. - PM confirmation: Gate 0 manually confirmed by PM in-session (dev server, login/OTP, onboarding write, upload->parse->dashboard journey, no unexpected 500s).
npm --prefix apps/money-mirror run build: PASS.@sentry/nextjslogged non-fatal source-map upload errors in this sandbox (network 403 while tunneling), but Next.js compile/typegen/page generation completed and exited 0.
Code scan: process.env.* under apps/money-mirror/src is fully represented in .env.local.example (no missing keys in the example template).
Required keys from app code:
| Variable | Status |
|---|---|
DATABASE_URL |
FILLED |
NEON_AUTH_BASE_URL |
FILLED |
GEMINI_API_KEY |
FILLED |
RESEND_API_KEY |
FILLED |
POSTHOG_KEY |
FILLED |
POSTHOG_HOST |
FILLED |
NEXT_PUBLIC_APP_URL |
FILLED |
CRON_SECRET |
FILLED |
Non-blocking optional/exception vars:
| Variable | Status | Notes |
|---|---|---|
NEXT_PUBLIC_SENTRY_DSN |
EMPTY | Allowed with PM exception pattern used in prior cycles. |
SENTRY_ORG |
EMPTY | Allowed with PM exception pattern used in prior cycles. |
SENTRY_PROJECT |
EMPTY | Allowed with PM exception pattern used in prior cycles. |
WHATSAPP_API_URL |
MISSING | Explicitly documented optional in .env.local.example (stub mode supported). |
WHATSAPP_API_TOKEN |
MISSING | Explicitly documented optional in .env.local.example (stub mode supported). |
Tables expected from schema.sql:
profilesstatementstransactionsadvisory_feeduser_merchant_aliasesmerchant_label_suggestionsguided_review_outcomes
Verified directly against the configured Neon DB (DATABASE_URL from app .env.local) using information_schema.tables after running:
npm --prefix apps/money-mirror run db:upgrade
Observed tables:
advisory_feedguided_review_outcomesmerchant_label_suggestionsprofilesstatementstransactionsuser_merchant_aliases
Status: PASS.
- PostHog: server + client instrumentation present (
src/lib/posthog.ts,src/lib/posthog-browser.ts,WebVitalsReporter). - Sentry:
@sentry/nextjsinstalled;sentry.client.config.ts,sentry.server.config.ts,sentry.edge.config.tsexist;next.config.tswraps withwithSentryConfig; multiple API handlers useSentry.captureException(...).
- Roll back by promoting a prior Vercel deployment.
- DB changes are additive/idempotent; rollback is deploy-level rather than destructive schema rollback.
- Runtime flags available (
NEXT_PUBLIC_PAYWALL_PROMPT_ENABLED, optional WhatsApp relay envs).
- Root cause found after deploy-check: the Vercel project still had
gitProviderOptions.createDeployments = "enabled"but no active Git link (link: null), so pushes tomaincould not auto-trigger production deployments reliably. - Project state now verified: Vercel project
money-mirroris Git-linked toshadowdevcode/ai-product-os, rooted atapps/money-mirror, and uses production branchmain. - Repo guard:
apps/money-mirror/vercel.jsonnow enforces main-only Git deployments for this app. - Proof deployment: pushing commit
133e62d939445cd95113c8acf7e0d592ee75fab9(docs(money-mirror): note main-only production deploys) created production deploymentmoney-mirror-3so34gj1d-vijay-sehgals-projects.vercel.appautomatically frommain. - Alias verification:
money-mirror-rho.vercel.apppoints at that deployment and returns HTTP 200. - Rollback baseline: prior production deployment remains
money-mirror-o0qjii01m-vijay-sehgals-projects.vercel.app; rollback is still deploy promotion, not schema rollback.
apps/money-mirror/README.md passes the template gate: one-liner, numbered user journey, stack table, complete setup flow, env table, schema section, npm run dev success/failure cues, API endpoints list, analytics event table, and key design decisions.
.env.local.example exists and README is not default Next.js boilerplate.
- Package and config wiring present.
- Env keys are listed in
.env.local.example. - API routes capture exceptions.
- Sentry-related empty vars are non-blocking only if PM exception is explicitly carried for this cycle.
Not attempted in this deploy-check pass. Repo has substantial in-flight changes for issue-012 and prior work; create PR after desired commit slicing/branching strategy is finalized.
Approve Deployment
- Keep current schema state (including
guided_review_outcomes) aligned in production/staging DBs. - When ready to ship code, create a scoped commit/PR from this branch.
Next pipeline command: /postmortem