Nouvelle app Vite/React independante (workspace apps/*), calquee sur apps/web : port 5174, sa propre image Docker (nginx statique), son propre domaine/deploiement. - AdminApiClient (VITE_ADMIN_API_URL, credentials: include) + ApiError. - AdminAuthContext / RequireAdmin : restaure la session admin via GET /admin/auth/me, garde de route (miroir de AuthContext/RequireAuth). - LoginPage (/login) : validation cliente via adminLoginSchema partage, erreurs traduites via ErrorMessageService. - AdminLayout : sidebar (Tableau de bord / Monitoring / Corrections) + deconnexion, rendu une fois autour du groupe RequireAdmin. - Pages Dashboard / Monitoring / Corrections en placeholder (remplies aux PR 3-5). - i18n fr (bloc admin.* + sous-ensemble errors.*), tokens _theme.scss copies de apps/web (extraction en package partage : suivi separe). - Dockerfile multi-stage (node build -> nginx:alpine) + nginx.conf (SPA fallback). Service admin-web dans docker-compose.yml (port ADMIN_WEB_PORT, VITE_ADMIN_API_URL en build arg). - Cypress : login.feature (KO -> message, OK -> dashboard) + admin-layout .cy.ts (redirection /login sans session, nav entre sections, logout). Job "Run admin-web E2E tests" ajoute a ci.yml. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
42 lines
1.2 KiB
JSON
42 lines
1.2 KiB
JSON
{
|
|
"name": "admin-web",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite --host 0.0.0.0 --port 5174",
|
|
"build": "tsc -b && vite build",
|
|
"preview": "vite preview --port 5174",
|
|
"test": "echo \"no unit tests yet\" && exit 0",
|
|
"cy:open": "cypress open",
|
|
"cy:run": "cypress run",
|
|
"e2e": "start-server-and-test dev http://localhost:5174 cy:run"
|
|
},
|
|
"dependencies": {
|
|
"@batch-cooking/date-tools": "workspace:*",
|
|
"@batch-cooking/shared": "workspace:*",
|
|
"i18next": "^26.3.6",
|
|
"lucide-react": "^1.32.0",
|
|
"react": "^18.3.1",
|
|
"react-dom": "^18.3.1",
|
|
"react-i18next": "^17.0.11",
|
|
"react-router-dom": "^7.18.2",
|
|
"recharts": "^2.15.0",
|
|
"zod": "^3.25.76"
|
|
},
|
|
"devDependencies": {
|
|
"@badeball/cypress-cucumber-preprocessor": "22.2.0",
|
|
"@bahmutov/cypress-esbuild-preprocessor": "2.2.8",
|
|
"@cypress/vite-dev-server": "5.2.1",
|
|
"@types/node": "^22.9.0",
|
|
"@types/react": "^18.3.12",
|
|
"@types/react-dom": "^18.3.1",
|
|
"@vitejs/plugin-react": "^4.3.3",
|
|
"cypress": "13.17.0",
|
|
"esbuild": "0.21.5",
|
|
"sass": "^1.102.0",
|
|
"start-server-and-test": "^2.0.8",
|
|
"typescript": "^5.7.2",
|
|
"vite": "^5.4.11"
|
|
}
|
|
}
|