Files
route-commerce/package.json
T
Nora 826f554ae1 chore(infra): auth fast-path, pg pool tuning, react-doctor devdep
Three coordinated changes that improve CI/build ergonomics and dev-mode
performance. None change database schema; all are reversible by env var.

src/lib/auth.ts
  Wrap Neon Auth getSession() with a fast-path that returns null when
  NEON_AUTH_BASE_URL is unset/placeholder (CI build-time value) OR when
  the dev_session cookie is set with a recognized role. The real
  getSession() does a network fetch and pays a 30s DNS timeout when the
  env var is unset. Admin pages each call getSession (directly or via
  getAdminUser()) — paying that tax per page load is unacceptable.

src/lib/db.ts + db/client.ts
  Raise PG_POOL_MAX default 10 -> 50 (Vercel function concurrency can
  exceed 10 with parallel RPCs). Lower PG_POOL_CONN_TIMEOUT_MS default
  30s -> 5s in src/lib/db.ts and 10s -> 5s in db/client.ts so a bad
  Neon branch fails fast instead of hanging requests.

src/lib/admin-permissions.ts + src/proxy.ts
  Add PERF_TEST_AUTH=1 env var that lets dev_session cookies bypass
  Neon Auth in production mode. Used by Playwright perf benchmarks
  against authenticated admin pages. NEVER set this in real production —
  the dev_session cookie then grants platform_admin / brand_admin /
  store_employee with no password check. The middleware guard in
  proxy.ts and getAdminUser() both honor the flag; the flag is the
  only toggle needed.

package.json
  Add react-doctor ^0.5.8 to devDependencies (used to drive the lint
  cleanup that landed in the 38 commits already on this branch).
2026-06-26 17:08:22 -06:00

83 lines
2.4 KiB
JSON

{
"name": "route-commerce-platform",
"version": "2.0.0",
"private": true,
"scripts": {
"dev": "node fix-agents.js && next dev --webpack -H 0.0.0.0 -p 4000",
"build": "next build --webpack",
"start": "next start",
"lint": "eslint",
"lint:fix": "eslint --fix",
"migrate": "node scripts/migrate.js",
"migrate:one": "node scripts/migrate.js",
"db:migrate": "node scripts/migrate.js",
"db:seed": "tsx db/seed.ts",
"db:seed:tour": "node scripts/seed-tuxedo-2026.js",
"db:reset": "node scripts/db-reset.js",
"db:studio": "drizzle-kit studio",
"type-check": "npx tsc --noEmit",
"test": "vitest run",
"test:watch": "vitest",
"test:ui": "vitest --ui",
"test:e2e": "playwright test --project=local",
"test:e2e:prod": "PLAYWRIGHT_PROD=1 playwright test",
"format": "prettier --write \"src/**/*.{ts,tsx}\""
},
"dependencies": {
"@anthropic-ai/sdk": "^0.96.0",
"@aws-sdk/client-s3": "^3.1064.0",
"@aws-sdk/s3-request-presigner": "^3.1064.0",
"@google/generative-ai": "^0.24.1",
"@neondatabase/auth": "^0.4.2-beta",
"@neondatabase/serverless": "^1.1.0",
"@sentry/nextjs": "^10.55.0",
"@stripe/react-stripe-js": "^6.6.0",
"@stripe/stripe-js": "^9.7.0",
"@supabase/supabase-js": "^2.105.3",
"drizzle-orm": "^0.36.4",
"exceljs": "^4.4.0",
"framer-motion": "^12.40.0",
"gsap": "^3.15.0",
"idb": "^8.0.3",
"lucide-react": "^1.17.0",
"next": "^16.2.6",
"next-themes": "^0.4.6",
"openai": "^6.37.0",
"papaparse": "^5.5.3",
"pdf-lib": "^1.17.1",
"qrcode": "^1.5.4",
"react": "19.2.4",
"react-dom": "19.2.4",
"server-only": "^0.0.1",
"stripe": "^22.1.1",
"uuid": "^11.1.1",
"zod": "^4.4.3"
},
"devDependencies": {
"@playwright/test": "^1.60.0",
"@tailwindcss/postcss": "^4",
"@types/node": "^20",
"@types/papaparse": "^5.5.2",
"@types/pg": "^8.20.0",
"@types/qrcode": "^1.5.6",
"@types/react": "^19",
"@types/react-dom": "^19",
"@types/uuid": "^11.0.0",
"@vitejs/plugin-react": "^4.7.0",
"dotenv": "^17.4.2",
"drizzle-kit": "^0.30.6",
"eslint": "^9",
"eslint-config-next": "16.2.5",
"fake-indexeddb": "^6.2.5",
"jsdom": "^25.0.1",
"pg": "^8.20.0",
"playwright": "^1.59.1",
"react-doctor": "^0.5.8",
"tailwindcss": "^4",
"tsx": "^4.22.4",
"typescript": "^5",
"vitest": "^4.1.9"
},
"overrides": "{}"
}