Configures both previously-empty test runners (vitest.config.ts, playwright.config.ts) and adds the typed lib/api client layer (axios + interceptors), the session-cookie plumbing (lib/auth), TanStack Query infrastructure (lib/query, providers), and a real sign-in flow consuming supporthub-api's own login (010-identity-auth) - the true foundation every other user story in this feature depends on. Two structural fixes to the existing scaffold, both found only by running the app rather than by inspection: middleware.ts belongs at src/middleware.ts under this project's src/ layout, not the repo root; and next.config.mjs's output:'export' is incompatible with Next.js Middleware outright (the dev server refuses to start it), so this app now runs as a standard Next.js server - confirmed with the user before making that deployment-mode change. Verified end-to-end with a real, locally-running supporthub-api: all 5 Playwright scenarios (unauthenticated redirect, sign-in, wrong-password generic error, non-admin role gating, sign-out) pass against a live backend, not a mock. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
55 lines
1.5 KiB
JSON
55 lines
1.5 KiB
JSON
{
|
|
"name": "supporthub-web",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"engines": {
|
|
"node": ">=22 <23"
|
|
},
|
|
"scripts": {
|
|
"dev": "next dev -p 3000",
|
|
"build": "next build",
|
|
"build:dev": "npx dotenv-cli -o -e .env.development -- next build",
|
|
"build:test": "npx dotenv-cli -o -e .env.test -- next build",
|
|
"build:prod": "npx dotenv-cli -o -e .env.production -- next build",
|
|
"start": "next start -p 3000",
|
|
"lint": "next lint",
|
|
"typecheck": "tsc --noEmit",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"test:e2e": "playwright test"
|
|
},
|
|
"dependencies": {
|
|
"@tanstack/react-query": "^5.51.15",
|
|
"axios": "^1.7.2",
|
|
"clsx": "^2.1.1",
|
|
"jose": "^6.2.12",
|
|
"js-cookie": "^3.0.8",
|
|
"lucide-react": "^0.417.0",
|
|
"next": "^14.2.5",
|
|
"react": "^18.3.1",
|
|
"react-dom": "^18.3.1",
|
|
"tailwind-merge": "^2.4.0",
|
|
"zod": "^3.25.76"
|
|
},
|
|
"devDependencies": {
|
|
"@playwright/test": "^1.45.3",
|
|
"@testing-library/jest-dom": "^7.0.1",
|
|
"@testing-library/react": "^16.3.3",
|
|
"@testing-library/user-event": "^14.6.7",
|
|
"@types/js-cookie": "^3.0.6",
|
|
"@types/node": "^20.14.12",
|
|
"@types/react": "^18.3.3",
|
|
"@types/react-dom": "^18.3.0",
|
|
"@vitejs/plugin-react": "^4.7.0",
|
|
"autoprefixer": "^10.4.20",
|
|
"dotenv-cli": "^7.4.2",
|
|
"eslint": "^8.57.0",
|
|
"eslint-config-next": "^14.2.5",
|
|
"jsdom": "^29.1.1",
|
|
"postcss": "^8.4.40",
|
|
"tailwindcss": "^3.4.7",
|
|
"typescript": "^5.5.4",
|
|
"vitest": "^2.0.4"
|
|
}
|
|
}
|