- Add internal/adminui with a SPA handler: index fallback for client routes, immutable caching for hashed assets, 404 for missing assets, security headers - Answer 503 with a hint when the UI has not been built, so go build always works - Mount the UI at / and the API at /api/ on the same listener, no CORS needed - Scaffold admin/ with Vite, React, TypeScript, Tailwind v4, shadcn/ui and Vitest
47 lines
1.2 KiB
JSON
47 lines
1.2 KiB
JSON
{
|
|
"name": "admin",
|
|
"private": true,
|
|
"version": "0.0.0",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"build": "node scripts/clean.mjs && tsc -b && vite build",
|
|
"lint": "oxlint",
|
|
"preview": "vite preview",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest"
|
|
},
|
|
"dependencies": {
|
|
"@base-ui/react": "^1.9.0",
|
|
"@fontsource-variable/geist": "^5.3.0",
|
|
"@tailwindcss/vite": "^4.3.5",
|
|
"@tanstack/react-query": "^5.107.1",
|
|
"class-variance-authority": "^0.7.1",
|
|
"clsx": "^2.1.1",
|
|
"lucide-react": "^1.70.0",
|
|
"next-themes": "^0.4.6",
|
|
"react": "^19.3.1",
|
|
"react-dom": "^19.3.1",
|
|
"react-router": "^8.5.1",
|
|
"shadcn": "^4.23.0",
|
|
"sonner": "^2.0.8",
|
|
"tailwind-merge": "^3.7.0",
|
|
"tailwindcss": "^4.3.5",
|
|
"tw-animate-css": "^1.4.0"
|
|
},
|
|
"devDependencies": {
|
|
"@testing-library/dom": "^10.4.2",
|
|
"@testing-library/jest-dom": "^7.0.1",
|
|
"@testing-library/react": "^16.3.3",
|
|
"@testing-library/user-event": "^14.6.8",
|
|
"@types/node": "^24.19.2",
|
|
"@types/react": "^19.3.0",
|
|
"@types/react-dom": "^19.3.0",
|
|
"@vitejs/plugin-react": "^6.1.2",
|
|
"jsdom": "^31.0.0",
|
|
"oxlint": "^1.90.0",
|
|
"typescript": "~7.0.2",
|
|
"vite": "^8.3.6",
|
|
"vitest": "^5.1.0"
|
|
}
|
|
}
|