- Install Recharts v3 as the project charting library - Add chartTheme utility with Fluent UI v9 token resolution helper and a 5-colour categorical palette (resolves CSS vars at runtime) - Add TopCountriesPieChart: top-4 + Other slice, Tooltip, Legend - Add TopCountriesBarChart: horizontal top-20 bar chart - Add useDashboardCountryData hook (wraps /api/dashboard/bans/by-country) - Integrate both charts into DashboardPage in a responsive chartsRow (side-by-side on wide screens, stacked on narrow) - All tsc --noEmit and eslint checks pass with zero warnings
43 lines
1.3 KiB
JSON
43 lines
1.3 KiB
JSON
{
|
|
"name": "bangui-frontend",
|
|
"private": true,
|
|
"version": "0.1.0",
|
|
"description": "BanGUI frontend — fail2ban web management interface",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"build": "tsc --noEmit && vite build",
|
|
"preview": "vite preview",
|
|
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
"typecheck": "tsc --noEmit",
|
|
"format": "prettier --write 'src/**/*.{ts,tsx,css}'"
|
|
},
|
|
"dependencies": {
|
|
"@fluentui/react-components": "^9.55.0",
|
|
"@fluentui/react-icons": "^2.0.257",
|
|
"@types/react-simple-maps": "^3.0.6",
|
|
"react": "^18.3.1",
|
|
"react-dom": "^18.3.1",
|
|
"react-router-dom": "^6.27.0",
|
|
"react-simple-maps": "^3.0.0",
|
|
"recharts": "^3.8.0"
|
|
},
|
|
"devDependencies": {
|
|
"@eslint/js": "^9.13.0",
|
|
"@types/node": "^25.3.2",
|
|
"@types/react": "^18.3.12",
|
|
"@types/react-dom": "^18.3.1",
|
|
"@typescript-eslint/eslint-plugin": "^8.13.0",
|
|
"@typescript-eslint/parser": "^8.13.0",
|
|
"@vitejs/plugin-react": "^4.3.3",
|
|
"eslint": "^9.13.0",
|
|
"eslint-config-prettier": "^9.1.0",
|
|
"eslint-plugin-react-hooks": "^5.0.0",
|
|
"jiti": "^2.6.1",
|
|
"prettier": "^3.3.3",
|
|
"typescript": "^5.6.3",
|
|
"typescript-eslint": "^8.56.1",
|
|
"vite": "^5.4.11"
|
|
}
|
|
}
|