Version: 4.1.2
Platform: React 19 / Express 5 / Vite 8 / Neon Serverless PostgreSQL
Document Purpose: Centralized operational guide and single source of truth for development, migrations, 3D assets, deployments, and incident rollbacks.
-
Verify Source First: Always confirm file paths and export shapes before adding imports.
-
Execute Invariant Checks: Ensure all changes adhere to React 19 standards (raw
ref,<form action={fn}>, noforwardRef). -
Run Pre-Commit Verification:
npm run check:apply npm run check npm test
-
Pre-Migration Snapshot: Always create a point-in-time branch snapshot before applying schema changes:
npm run neon:snapshot
-
Execute Migration:
npm run migrate:deploy
-
Verify Fixtures & Egress:
npm run verify:clean-seed npm run verify:egress
-
Target Budget: All 3D GLB models must be
$\le 1.5$ MB with Draco compression. -
Fallback Strategy: When 3D rendering is unavailable or WebGL context is lost, components must gracefully fallback to
/images/placeholders/product-placeholder.webp. -
Viewer Standard: Use
LazyUnifiedModelViewerwith dynamic Level of Detail (LOD) and 200ms recovery gates.
-
Quality Gates Check: Run Protocol 0 validation:
npm run verify:tech-integrity
-
Build Verification:
npm run verify:build
-
Container Build & Deploy: Cloud Run deployment with native Google Cloud Tasks for async webhooks.
-
Traffic Rollback: Instant traffic diversion to previous known healthy revision in Google Cloud Run.
-
Database Point-in-Time Recovery (PITR): Reset branch state or restore from snapshot:
neon branches reset <branch-id> --parent main
-
Cache Flush: Trigger automated cache invalidation across memory and Postgres L1 tiers.