Replaces a static SPA that shipped an Airtable PAT in the JS bundle.
The new architecture holds all secrets server-side, fronts the app
behind Apache on optical-dev with the shared-vhost split-build pattern,
and is designed for a later Azure AD/MSAL swap-in.
- backend/ FastAPI + uvicorn, local auth (Azure AD stub), Airtable
proxy with TTL cache, Zoho .xlsx/.csv parser, merge
service for utilisation summaries. 28 pytest tests.
- frontend/ React + Vite + TS + Tailwind + Recharts SPA. Login entry
chunk 12.83 KB gzipped; Recharts lazy-loaded. No tokens
or Airtable URLs in the built bundle.
- deploy/ Idempotent deploy.sh (port auto-pick 8200-8299,
.env-persisted) + split-build Apache include template.
- docker-compose.yml pins name: utilisation-dept and binds 127.0.0.1.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
37 lines
1 KiB
JSON
37 lines
1 KiB
JSON
{
|
|
"name": "utilisation-dept-frontend",
|
|
"private": true,
|
|
"version": "0.1.0",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"build": "tsc -b && vite build",
|
|
"preview": "vite preview",
|
|
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
"typecheck": "tsc --noEmit"
|
|
},
|
|
"dependencies": {
|
|
"@headlessui/react": "^2.0.0",
|
|
"driver.js": "^1.3.0",
|
|
"lucide-react": "^0.400.0",
|
|
"react": "^18.3.0",
|
|
"react-dom": "^18.3.0",
|
|
"react-router-dom": "^6.22.0",
|
|
"recharts": "^2.12.0"
|
|
},
|
|
"devDependencies": {
|
|
"@types/react": "^18.3.0",
|
|
"@types/react-dom": "^18.3.0",
|
|
"@typescript-eslint/eslint-plugin": "^7.16.0",
|
|
"@typescript-eslint/parser": "^7.16.0",
|
|
"@vitejs/plugin-react": "^4.3.0",
|
|
"autoprefixer": "^10.4.0",
|
|
"eslint": "^8.57.0",
|
|
"eslint-plugin-react": "^7.34.0",
|
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
"postcss": "^8.4.0",
|
|
"tailwindcss": "^3.4.0",
|
|
"typescript": "^5.5.0",
|
|
"vite": "^5.3.0"
|
|
}
|
|
}
|