--- phase: 09-admin-panel-rearchitecture plan: 02 type: execute wave: 1 depends_on: [] files_modified: - frontend/src/layouts/AdminLayout.vue - frontend/src/components/admin/AdminSidebar.vue - frontend/src/views/admin/AdminOverviewView.vue - frontend/src/api/admin.js autonomous: true requirements: - ADMIN-08 - ADMIN-09 - ADMIN-11 user_setup: [] must_haves: truths: - "AdminLayout.vue renders an aside (AdminSidebar) and a main content area containing a router-view" - "AdminSidebar shows the DocuVault logo with an 'Admin' subtitle and five nav links: Overview, Users, Quotas, AI Config, Audit Log — no Back to app link" - "AdminOverviewView fetches GET /api/admin/overview on mount and renders four stat cards + a 10-row audit table" - "frontend/src/api/admin.js exports getAdminOverview()" artifacts: - path: "frontend/src/layouts/AdminLayout.vue" provides: "Admin route shell (sidebar + router-view)" contains: "router-view" - path: "frontend/src/components/admin/AdminSidebar.vue" provides: "Admin-only sidebar nav with 5 router-links, no Back to app" contains: "to=\"/admin/audit\"" - path: "frontend/src/views/admin/AdminOverviewView.vue" provides: "Stats cards + recent audit table at /admin" contains: "getAdminOverview" - path: "frontend/src/api/admin.js" provides: "getAdminOverview() API client function" contains: "export async function getAdminOverview" key_links: - from: "frontend/src/layouts/AdminLayout.vue" to: "frontend/src/components/admin/AdminSidebar.vue" via: "import AdminSidebar" pattern: "import AdminSidebar from '\\.\\./components/admin/AdminSidebar.vue'" - from: "frontend/src/views/admin/AdminOverviewView.vue" to: "frontend/src/api/admin.js" via: "getAdminOverview()" pattern: "getAdminOverview\\(" - from: "frontend/src/api/admin.js" to: "/api/admin/overview" via: "request()" pattern: "/api/admin/overview" --- Create the admin route shell — `AdminLayout.vue` (the route component at `/admin`), `AdminSidebar.vue` (the admin-only sidebar with five nav links per D-07 and no Back-to-app per D-06), and `AdminOverviewView.vue` (the new overview view at `/admin` showing stats cards + last-10 audit table per D-01, D-03). Extend the frontend `api/admin.js` module with `getAdminOverview()` so the view can fetch the new backend endpoint. Purpose: ADMIN-08 requires `AdminLayout.vue` as the `/admin` route component with its own sidebar; ADMIN-09 defines the nav set (D-06 overrides the Back-to-app link); ADMIN-11 requires the overview UI. This plan builds the shell + new view; routing is wired in 09-04. Output: 4 new/modified frontend files. The shell renders correctly when manually mounted; the overview view single-fetches the backend endpoint built in 09-01. @$HOME/.claude/get-shit-done/workflows/execute-plan.md @$HOME/.claude/get-shit-done/templates/summary.md @.planning/phases/09-admin-panel-rearchitecture/09-CONTEXT.md @.planning/phases/09-admin-panel-rearchitecture/09-RESEARCH.md @.planning/phases/09-admin-panel-rearchitecture/09-PATTERNS.md @CLAUDE.md @frontend/src/layouts/AuthLayout.vue @frontend/src/components/layout/AppSidebar.vue @frontend/src/components/admin/AuditLogTab.vue @frontend/src/api/admin.js @frontend/src/stores/auth.js @frontend/src/utils/formatters.js From frontend/src/api/client.js (re-export barrel from Phase 8): - `request(path, options)` — the canonical fetch helper with 401-refresh handling. New API helpers MUST call `request()` and not roll their own `fetch`. Import via `./utils.js` in the domain module: `import { request } from './utils.js'`. From frontend/src/api/admin.js (existing domain module — Phase 8 CODE-04 output): - Already exports `listAdminUsers`, `createAdminUser`, `setAdminUserQuota`, `getAiConfig`, etc. via `request()`. Add `getAdminOverview` alongside these. From frontend/src/stores/auth.js: - `useAuthStore()` exposes `user` (ref with `{ email, role, ... }`) and `logout()` action. AdminSidebar imports the store for the user footer + sign-out. From frontend/src/components/layout/AppSidebar.vue (reference pattern): - Container: `