MyCodex

MyCodex

PWA
Navigation
Master IndexIndex
Maintenance TasksOps Infrastructure GuideOwner Action ItemsPending Implementation AuditPRODUCTION TESTING GUIDEPROJECT MEMORY FOR CHATGPT FEATURESPROJECT MEMORY FOR CHATGPT OVERVIEWPROJECT MEMORY FOR CHATGPT TECHNICALPROJECT MEMORY FOR CHATGPTSurface Maturity Index
v2.2 Stablemenulist.ai
docsowner action items

Owner Action Items — Manual Tasks Tracker

Purpose: Centralized tracker for ALL manual tasks the founder must do across every feature. Updated automatically by Cascade after every implementation session, production audit, or feature review.

Rule: This is the SINGLE SOURCE OF TRUTH for "what Danny needs to do manually." Cascade appends here after every session. Danny checks off items when done.


How This File Works

  1. Cascade adds items after every production audit, implementation session, or feature review
  2. Each item has: Feature name, what to do, why, priority, status
  3. Danny marks items done by changing ⬜ to ✅
  4. Cascade never removes items — completed items stay as history (move to Completed section)

Active Items

Public Starter Menu Entry Launch

#TaskWhyPriorityStatus
1Fix or replace the configured Upstash Redis endpointLocal public upload/claim rate-limit checks logged DNS ENOTFOUND; launch needs rate limits to fail closed enough to protect AI/Firebase cost.P0 (before public traffic)⬜
2Confirm Gemini quota/key capacity for public menu extractionThe local verification key returned quota errors; public upload-before-auth depends on reliable extraction capacity or additional rotated keys.P0 (before public traffic)⬜
3Deploy Firestore rules, indexes, and updated Cloud Functions schedulerpublicMenuDrafts must stay server-only, and expired draft images/docs need the public_menu_draft_cleanup scheduler task live.P0 (before public traffic)⬜
4Confirm Razorpay recurring/autopay capability for hosted checkoutSigned webhook processing passed locally, but hosted recurring checkout still depends on merchant/account capability.P0 (before paid launch)⬜
5Run WhatsApp Cloud API sandbox media flow if WhatsApp onboarding is includedThe public web flow is verified; WhatsApp media/webhook delivery still requires real Meta test app credentials and provider callback proof.P1 (before WhatsApp launch)⬜

AI Extraction Monitoring Dashboard

#TaskWhyPriorityStatus
1Enable ENABLE_EXTRACTION_MONITORING_DASHBOARD flag in src/config/features.tsTurns on the extraction pipeline health dashboard at /ops/extraction. Read-only, ~$0.04/month cost.P1 (after first real extractions)⬜
2Verify Firestore indexes for extraction monitoring queriesMay already exist — run firebase deploy --only firestore:indexes to ensure composite indexes are deployed.P1 (before enabling flag)⬜
3P2: Wire Telegram alerts for extraction failure spikesAuto-alerts when failure rate > 5% or quality drops. Infrastructure exists (sendTelegramAlert()), just needs wiring in nightly scheduler.P2 (when extraction volume grows)⬜
4P3: Add HCR (Human Correction Rate) metric from extraction learning loop dataData already collected via menuChangeLog + platformSummary/extractionLearning. Just needs dashboard display.P3 (when enough correction data exists)⬜

Built by Cascade (Mar 13, 2026): JobInspector.tsx (3-tab drawer), CostMonitor.tsx (daily spend panel), retryExtractionJob() (DAL + UI button with max 3 retries + validation)

AI System Layer

#TaskWhyPriorityStatus
1Add 2nd-4th Gemini API keys to Vercel env vars + Firebase SecretsEnables key rotation for higher AI throughput. Single key still works with retry/backoff, but multi-key gives immediate failover on 429 rate limits.Optional (do when hitting rate limits)⬜
2Phase 2: Build aiUsageLog cost tracking collectionGives per-feature, per-tenant AI cost visibility. Currently no cross-feature cost tracking exists.P2 (when you need cost visibility)⬜
3Phase 3: Build knowledge reuse layer (translation memory, description cache)Reduces AI costs ~25-35% by caching repeated operations.P3 (when 1000+ menus)⬜

How to do #1:

# 1. Create 2-3 extra keys at https://aistudio.google.com/apikey
# 2. Add to Firebase Secrets:
firebase functions:secrets:set GEMINI_AI_KEY_2
firebase functions:secrets:set GEMINI_AI_KEY_3
firebase functions:secrets:set GEMINI_AI_KEY_4

# 3. Add same keys to Vercel → Settings → Environment Variables
# 4. Redeploy CF + Vercel

AI Data Extraction — Security Fixes

#TaskWhyPriorityStatus
1Deploy updated Firestore rules: firebase deploy --only firestore:rules3 security fixes: tenant validation on job creation (CRITICAL), AI operations rules, platform admin read override for monitoringP0 (before launch)⬜
2Deploy updated Cloud FunctionsServer-side defense-in-depth: projectId ↔ tId/sId mismatch validation in extraction CFP0 (before launch)⬜

How to do #1 + #2:

# 1. Deploy Firestore rules (3 fixes: V1 tenant validation, V2 AI operations, V3 platform admin read)
firebase deploy --only firestore:rules

# 2. Deploy Cloud Functions (updated processMenuImagesJob.ts with Step 0 tenant validation)
cd functions && npm run deploy

Fixed by Cascade (Mar 13, 2026): Security Surface Audit — 3 vulnerabilities fixed (1 CRITICAL). See __docs__/projects/ai-data-extraction/security-surface-audit-mar13-2026.md

Production Readiness (Monitoring Stack)

#TaskWhyPriorityStatus
1Create Telegram Bot + set secretsRequired for ops alerts (payment failures, publish errors, cost spikes)P0 (before launch)⬜
2Set GCP Budget AlertsAuto-activates SAFE_MODE when cost threshold exceededP0 (before launch)⬜
3Deploy Cloud FunctionsDeploys verifyMenuPublish, alertEscalation, gcpBudgetAlertWebhookP0 (before launch)⬜
4Deploy Firestore indexesRequired for alert escalation queriesP0 (before launch)⬜
5Enable monitoring feature flagsENABLE_COST_PROTECTION, ENABLE_OPS_ALERTS, ENABLE_MENU_HEALTH_MONITORP0 (before launch)⬜
6Setup UptimeRobotExternal uptime monitoring (free)P1 (before launch)⬜
7Setup SMTP for lifecycle messagingEnables billing emails, renewal reminders, suspension warningsP1 (before launch)⬜

Full setup guide: __docs__/production-readiness/launch-prerequisites.md

Dev/Prod Environment Separation

#TaskWhyPriorityStatus
1Create menulist-dev Firebase projectData isolation — dev data must never mix with customer dataP0 (before launch)⬜
2Configure .env.local with dev Firebase credentialsLocal dev points to dev project, Vercel prod points to prod projectP0 (before launch)⬜
3Set all Vercel env vars (production scope) for ecomsai projectEnsures production deployment uses correct Firebase projectP0 (before launch)⬜
4Get Razorpay test mode keys for developmentPrevents real charges during development testingP0 (before launch)⬜
5Deploy Firestore indexes to dev projectfirebase deploy --only firestore:indexes --project menulist-devP0 (after step 1)⬜
6Copy Firestore security rules to dev projectfirebase deploy --only firestore:rules --project menulist-devP0 (after step 1)⬜
7Seed test tenant/store in dev projectNeed test data for developmentP1 (after step 1)⬜
8Enable production feature flags in orderSAFE_MODE first, then Sentry, then OPS_ALERTS, then HEALTH_MONITOR, then LIFECYCLE_MESSAGINGP0 (at launch)⬜

Full guide: __docs__/production-readiness/dev-prod-environment-guide.md

WhatsApp Cloud API / Messaging Onboarding Activation

#TaskWhyPriorityStatus
1Create a founder-controlled Meta login for development/staging with 2FA enabledRequired to use Meta for Developers without tying the setup to a random personal or employee-controlled accountP0 (before WhatsApp testing)⬜
2Create a non-production Meta Developer app and add the WhatsApp productKeeps MenuList dev/staging Cloud API testing separate from future production Meta assetsP0 (before WhatsApp testing)⬜
3Use Meta's test WhatsApp phone number and approved test recipient firstAllows end-to-end webhook, media, and message testing before a real business number is connectedP0 (before WhatsApp testing)⬜
4Generate test credentials for the non-production app onlyProvides the real provider values needed by Firebase Functions without using production tokensP0 (before enabling the feature)⬜
5Set non-production Firebase secrets for the intended Firebase targetThe messaging function needs real secrets; dummy WhatsApp secrets are not allowedP0 (before enabling the feature)⬜
6Register the Meta webhook URL for the non-production functionRequired for inbound WhatsApp messages and media uploads to reach MenuListP0 (before live testing)⬜
7Enable ENABLE_MESSAGING_ONBOARDING=true only after real non-production secrets existPrevents a half-enabled webhook from accepting traffic without valid provider accessP0 (before live testing)⬜
8Run the full test flow: text message, image/PDF upload, preview, approve, publish, replyProves the Cloud API path works before any owner-facing or customer-facing launchP0 (before beta)⬜
9Decide and register the production business entity pathMeta production readiness needs a real business identity before serious launchP0 (before production launch)⬜
10Prepare India business verification documentsLikely required/supporting documents include PAN, GST/Udyam/shop registration, address proof, or bank proofP0 (before production launch)⬜
11Map the live MenuList domain and create domain emailProduction Meta verification and trust should use the real website/domain identityP0 (before production launch)⬜
12Publish production privacy policy and terms pagesRequired for production trust, opt-in clarity, and Meta review readinessP0 (before production launch)⬜
13Get a dedicated unused production WhatsApp numberA Cloud API number cannot remain active in the normal WhatsApp app; never use a founder personal numberP0 (before production launch)⬜
14Create separate production Meta Business Portfolio, app, WABA, and payment setupKeeps production billing, limits, templates, and ownership separate from dev/stagingP0 (before production launch)⬜
15Create and approve utility templates for onboarding messagesRequired for production-initiated WhatsApp messages outside the customer service windowP0 (before production launch)⬜
16Store production WhatsApp secrets separately from dev/staging secretsPrevents test tokens, test phone IDs, or staging webhooks from leaking into productionP0 (before production launch)⬜
17Review current Meta WhatsApp pricing and convert the expected launch cost to INRVendor pricing can change; launch cost planning must be based on current Meta pricingP1 (before paid traffic)⬜

How to do the development/staging setup:

# Set these only with real values from the non-production Meta app.
firebase functions:secrets:set WHATSAPP_PHONE_NUMBER_ID --project <non-production-firebase-project>
firebase functions:secrets:set WHATSAPP_ACCESS_TOKEN --project <non-production-firebase-project>
firebase functions:secrets:set WHATSAPP_APP_SECRET --project <non-production-firebase-project>
firebase functions:secrets:set WHATSAPP_VERIFY_TOKEN --project <non-production-firebase-project>

# Enable only after the real non-production secrets exist.
# Runtime env:
# ENABLE_MESSAGING_ONBOARDING=true
# MESSAGING_ONBOARDING_PROVIDERS=whatsapp

Webhook URL format:

https://us-central1-{firebaseProject}.cloudfunctions.net/messagingOnboarding/whatsapp

Separation rules:

  • Dev/staging uses a non-production Meta app, Meta test phone number, test recipient, and non-production Firebase secrets.
  • Production uses a separate Meta Business Portfolio, app, WABA, dedicated phone number, billing setup, templates, and Firebase secrets.
  • Official Meta WhatsApp Cloud API only. Do not use OpenWA, whatsapp-web.js, Baileys, QR-scanned WhatsApp Web sessions, or browser automation for MenuList onboarding.
  • Do not create dummy WhatsApp secrets. Missing real secrets mean the feature stays disabled.
  • Do not enable owner-facing launch until webhook, media download, preview, approve/publish, outbound confirmation, /ops/messaging-onboarding, indexes, rules, and TTL are verified.

Detailed runbook: __docs__/messaging-onboarding/messaging-onboarding_runbook.md
Enable/test checklist: __docs__/messaging-onboarding/messaging-onboarding_validation.md#to-enable--test
Meta docs: Cloud API Get Started, Webhooks, Messaging Limits, Pricing

Canonica (Multi-Product Setup)

#TaskWhyPriorityStatus
1Create Canonica Firebase project in GCPCanonica runs on separate Firebase projectP0 (before Canonica activation)⬜
2Fill CANONICAFIREBASE* env vars (.env + Vercel)Required for Canonica Firestore accessP0 (before Canonica activation)⬜
3Move Cloud Functions to functions-canonica/Separate deployment for Canonica CFsP0 (before Canonica activation)⬜
4Deploy both function setsMenuList + Canonica CFs deployed separatelyP0 (before Canonica activation)⬜
5Enable Canonica feature flags one by onePhased activation per doctrineP0 (before Canonica activation)⬜

Full setup guide: __docs__/canonica/doctrine/10-implementation-action-items.md


Completed Items

Move items here when done. Keep as history.

<!-- Example: ### Feature Name | # | Task | Completed | Date | |---|------|-----------|------| | 1 | Did the thing | ✅ | 2026-03-15 | -->

Related Files

FileScope
__docs__/production-readiness/launch-prerequisites.mdDetailed monitoring setup guide (Steps 1-9)
__docs__/canonica/doctrine/10-implementation-action-items.mdDetailed Canonica manual setup steps
__docs__/messaging-onboarding/messaging-onboarding_runbook.mdWhatsApp Cloud API provider stance, secrets, monitoring, and non-actions
__docs__/messaging-onboarding/messaging-onboarding_validation.mdMessaging onboarding enable/test checklist

Last Updated: May 17, 2026 Updated By: Codex (WhatsApp Cloud API / Messaging Onboarding Action Items)

On This Page
  • Owner Action Items — Manual Tasks Tracker
  • How This File Works
  • Active Items
  • Public Starter Menu Entry Launch
  • AI Extraction Monitoring Dashboard
  • AI System Layer
  • 1. Create 2-3 extra keys at https://aistudio.google.com/apikey
  • 2. Add to Firebase Secrets:
  • 3. Add same keys to Vercel → Settings → Environment Variables
  • 4. Redeploy CF + Vercel
  • AI Data Extraction — Security Fixes
  • 1. Deploy Firestore rules (3 fixes: V1 tenant validation, V2 AI operations, V3 platform admin read)
  • 2. Deploy Cloud Functions (updated processMenuImagesJob.ts with Step 0 tenant validation)
  • Production Readiness (Monitoring Stack)
  • Dev/Prod Environment Separation
  • WhatsApp Cloud API / Messaging Onboarding Activation
  • Set these only with real values from the non-production Meta app.
  • Enable only after the real non-production secrets exist.
  • Runtime env:
  • ENABLE_MESSAGING_ONBOARDING=true
  • MESSAGING_ONBOARDING_PROVIDERS=whatsapp
  • Canonica (Multi-Product Setup)
  • Completed Items
  • Feature Name
  • Related Files