mirror of
https://github.com/nomadkaraoke/karaoke-gen.git
synced 2026-11-20 13:07:57 +09:00
## Summary - **Local stack:** `scripts/local-stack.sh up --frontend` runs the **real** backend on the Firestore + GCS emulators with `FAKE_WORKERS=1`. In-process fake workers move jobs through their real states in seconds, using tiny real media, so web Playwright and mobile Maestro full-journey tests can run offline against the same endpoints. - **Email-code sign-in** (nomad-mobile spec §4.1): `POST /api/users/auth/send-code` + `verify-code`. The code logic is shared with kjbox via `LoginCodeStore`, and sends are throttled per email and per IP. - **Bug fix found by the new suite:** `confirm-duration` moved jobs to `separating_stage1`, from which they can never reach review. It now resumes at `downloading`. No prod job had taken this path yet. ## Changes - `backend/services/fake_workers/`: dispatch seam in `WorkerService.trigger_*`, plus fake search, download, checkout and outbox, scenarios, and per-user config. The real stem upload, transcode, backing-vocals analysis and preview render are reused. Every check is strict (`is True`), so a MagicMock settings object never enables the fakes, and startup **refuses FAKE_WORKERS in production**. - `/api/test/*` router (mounted only in that mode): `status`, `scenario`, `fake-config`, `emails`, `reset`, plus the fake Stripe checkout page. Paying it runs the real webhook handler. - `frontend/e2e/local-stack/` (9 specs, ~50s): - sign-up → make → review → instrumental → download - buy and cancel credits - duration confirm, failed, complete and review states - code sign-in and lockout - New required CI job `local-stack-e2e`. - Docs: TESTING.md § Local stack, DEVELOPMENT.md, API.md, README, LESSONS-LEARNED. - `MAX_SIGNUPS_PER_IP` can now be set by env. Only the local stack raises it; production keeps the default of 2. ## Testing - [x] Backend unit: 6175 passed - [x] Emulator: 152 passed - [x] Frontend Jest: 1706 passed - [x] Local-stack Playwright: 9/9 passed (CI mode) ## Review - [x] CodeRabbit CLI review completed locally. 1 minor finding declined: it suggested swallowing infrastructure errors in send-code as fake "sent" responses, which would hide real outages from users. @coderabbitai ignore --- 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01AGuxtgoscF6RJGtpjHPg3W --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
121 lines
4.5 KiB
JSON
121 lines
4.5 KiB
JSON
{
|
|
"name": "karaoke-gen-frontend",
|
|
"version": "0.86.0",
|
|
"private": true,
|
|
"scripts": {
|
|
"prebuild": "node scripts/write-version.mjs",
|
|
"build": "next build && node scripts/spa-redirect-404.js",
|
|
"dev": "next dev",
|
|
"dev:with-lyrics": "concurrently -n karaoke,lyrics -c blue,green \"npm run dev\" \"npm run dev:lyrics\"",
|
|
"dev:lyrics": "cd ../lyrics_transcriber_temp/lyrics_transcriber/frontend && npm run dev",
|
|
"lint": "eslint .",
|
|
"start": "next start",
|
|
"test": "jest --watch",
|
|
"test:unit": "jest --ci --maxWorkers=2",
|
|
"test:ci": "jest --ci --coverage --maxWorkers=2",
|
|
"test:coverage": "jest --coverage",
|
|
"test:e2e": "playwright test",
|
|
"test:e2e:ui": "playwright test --ui",
|
|
"test:e2e:debug": "playwright test --debug",
|
|
"test:e2e:headed": "playwright test --headed",
|
|
"test:e2e:ci": "playwright test --reporter=list",
|
|
"test:e2e:record": "playwright test --config=playwright.record.config.ts",
|
|
"test:e2e:prod": "playwright test --config=playwright.production.config.ts",
|
|
"test:e2e:local-stack": "playwright test --config=playwright.local-stack.config.ts",
|
|
"test:e2e:prod:headed": "playwright test --config=playwright.production.config.ts --headed",
|
|
"test:e2e:prod:debug": "playwright test --config=playwright.production.config.ts --debug",
|
|
"test:e2e:demo": "playwright test --config=playwright.demo.config.ts",
|
|
"test:e2e:demo:headed": "playwright test --config=playwright.demo.config.ts --headed",
|
|
"demo:create-video": "node scripts/create-demo-video.mjs",
|
|
"test:all": "npm run test:unit && npm run test:e2e",
|
|
"fixtures:review": "npx ts-node e2e/fixtures/review-cli.ts",
|
|
"fixtures:review-ui": "playwright test --config=playwright.review.config.ts --headed"
|
|
},
|
|
"dependencies": {
|
|
"@fingerprintjs/fingerprintjs": "^5.1.0",
|
|
"@hookform/resolvers": "^3.10.0",
|
|
"@radix-ui/react-accordion": "1.2.2",
|
|
"@radix-ui/react-alert-dialog": "1.1.4",
|
|
"@radix-ui/react-aspect-ratio": "1.1.1",
|
|
"@radix-ui/react-avatar": "1.1.2",
|
|
"@radix-ui/react-checkbox": "1.1.3",
|
|
"@radix-ui/react-collapsible": "1.1.2",
|
|
"@radix-ui/react-context-menu": "2.2.4",
|
|
"@radix-ui/react-dialog": "1.1.4",
|
|
"@radix-ui/react-dropdown-menu": "2.1.4",
|
|
"@radix-ui/react-hover-card": "1.1.4",
|
|
"@radix-ui/react-label": "2.1.1",
|
|
"@radix-ui/react-menubar": "1.1.4",
|
|
"@radix-ui/react-navigation-menu": "1.2.3",
|
|
"@radix-ui/react-popover": "1.1.4",
|
|
"@radix-ui/react-progress": "1.1.1",
|
|
"@radix-ui/react-radio-group": "1.2.2",
|
|
"@radix-ui/react-scroll-area": "1.2.2",
|
|
"@radix-ui/react-select": "2.1.4",
|
|
"@radix-ui/react-separator": "1.1.1",
|
|
"@radix-ui/react-slider": "1.2.2",
|
|
"@radix-ui/react-slot": "1.1.1",
|
|
"@radix-ui/react-switch": "1.1.2",
|
|
"@radix-ui/react-tabs": "1.1.2",
|
|
"@radix-ui/react-toast": "1.2.4",
|
|
"@radix-ui/react-toggle": "1.1.1",
|
|
"@radix-ui/react-toggle-group": "1.1.1",
|
|
"@radix-ui/react-tooltip": "1.1.6",
|
|
"@testing-library/dom": "^10.4.1",
|
|
"@vercel/analytics": "latest",
|
|
"autoprefixer": "^10.4.20",
|
|
"class-variance-authority": "^0.7.1",
|
|
"clsx": "^2.1.1",
|
|
"cmdk": "1.0.4",
|
|
"date-fns": "4.1.0",
|
|
"embla-carousel-react": "8.5.1",
|
|
"html-to-image": "^1.11.13",
|
|
"immer": "latest",
|
|
"input-otp": "1.4.1",
|
|
"jspdf": "^4.2.1",
|
|
"lucide-react": "^0.454.0",
|
|
"next": "16.0.7",
|
|
"next-intl": "^4.9.0",
|
|
"next-themes": "^0.4.6",
|
|
"qr-code-styling": "^1.9.2",
|
|
"react": "19.2.0",
|
|
"react-day-picker": "9.8.0",
|
|
"react-dom": "19.2.0",
|
|
"react-hook-form": "^7.60.0",
|
|
"react-resizable-panels": "^2.1.7",
|
|
"recharts": "2.15.4",
|
|
"sonner": "^1.7.4",
|
|
"tailwind-merge": "^2.5.5",
|
|
"tailwindcss-animate": "^1.0.7",
|
|
"use-sync-external-store": "latest",
|
|
"vaul": "^1.1.2",
|
|
"zod": "3.25.76",
|
|
"zustand": "latest"
|
|
},
|
|
"devDependencies": {
|
|
"@eslint/eslintrc": "^3",
|
|
"@google/genai": "^2.27.0",
|
|
"@playwright/test": "^1.57.0",
|
|
"@tailwindcss/postcss": "^4.1.9",
|
|
"@testing-library/jest-dom": "^6.9.1",
|
|
"@testing-library/react": "^16.3.1",
|
|
"@testing-library/user-event": "^14.5.1",
|
|
"@types/jest": "^29.5.11",
|
|
"@types/node": "^22",
|
|
"@types/react": "^19",
|
|
"@types/react-dom": "^19",
|
|
"concurrently": "^9.2.1",
|
|
"eslint": "^9",
|
|
"eslint-config-next": "^15",
|
|
"eslint-plugin-react-hooks": "^5",
|
|
"jest": "^29.7.0",
|
|
"jest-environment-jsdom": "^29.7.0",
|
|
"playwright": "^1.57.0",
|
|
"postcss": "^8.5",
|
|
"tailwindcss": "^4.1.9",
|
|
"ts-node": "^10.9.2",
|
|
"tw-animate-css": "1.3.3",
|
|
"typescript": "^5"
|
|
}
|
|
}
|