Commit 0bbb888
authored
feat: add admin portal with audit dashboard, tool execution, and dev environment (#91)
* docs: regenerate swagger docs.go for audit metrics endpoints
* docs: regenerate swagger.json for audit metrics endpoints
* docs: regenerate swagger.yaml for audit metrics endpoints
* build: add admin-ui build artifacts to .gitignore
* ci: add audit metrics and admin portal packages to linter config
* build: include admin-ui dist in goreleaser config
* build: add admin-ui build targets and audit metrics to Makefile
* deps: add squirrel query builder dependency
* deps: update go.sum for squirrel dependency
* feat: wire admin-ui static file serving into HTTP server
* refactor: remove unused config field
* fix: correct OAuth server endpoint registration
* feat: add audit metrics types for timeseries, breakdown, overview, and performance
* feat: implement PostgreSQL audit metrics store with squirrel query builder
* test: add comprehensive tests for audit metrics store
* feat: add audit metrics REST endpoints to admin handler
* feat: implement audit metrics handler with timeseries, breakdown, overview, and performance
* test: add tests for admin audit metrics endpoints
* refactor: replace hand-built SQL with squirrel in audit postgres store
* test: update audit store tests for squirrel query builder migration
* refactor: replace hand-built SQL with squirrel in knowledge insight store
* test: update knowledge store tests for squirrel query builder migration
* refactor: replace hand-built SQL with squirrel in knowledge changeset store
* test: update changeset store tests for squirrel query builder migration
* refactor: add squirrel import to knowledge types
* test: update knowledge toolkit tests for revised store interface
* test: update migration column consistency test for squirrel auditColumns pattern
* test: update audit adapter test for revised audit store interface
* test: update middleware fuzz test for revised audit store interface
* test: update MCP audit middleware test for revised audit store interface
* feat: add Go embed handler for serving admin-ui static assets
* test: add tests for admin-ui embed handler
* feat: add Storybook config for admin-ui component development
* feat: add Storybook config for admin-ui component development
* feat: add ESLint config for admin-ui React frontend
* feat: add HTML entry point for admin-ui SPA
* feat: add package.json for admin-ui with React, Recharts, and TanStack Query
* deps: add admin-ui package-lock.json
* feat: add TypeScript config for admin-ui
* feat: add Vite build config for admin-ui with API proxy
* feat: add Vitest config for admin-ui unit tests
* feat: add Vite client type declarations for admin-ui
* feat: add base CSS styles for admin-ui dark theme
* feat: add React entry point with MSW and QueryClient setup
* feat: add root App component with React Router navigation
* test: add smoke test for admin-ui App component
* feat: add utility helpers for admin-ui
* test: add Vitest setup with testing-library matchers
* feat: add API client with auth header injection for admin-ui
* feat: add TypeScript types for admin API responses
* feat: add TanStack Query hooks for audit metrics and system info
* feat: add Zustand auth store for API key management
* feat: add Zustand time range store for dashboard date filtering
* feat: add AppShell layout with sidebar and header slots
* feat: add Header component with time range selector and auth status
* feat: add Sidebar navigation component with route links
* feat: add API key login form component
* feat: add StatCard component for dashboard KPI display
* feat: add StatusBadge component for success/error/warning indicators
* feat: add TimeseriesChart component with Recharts area chart
* feat: add BarChart component for audit breakdown visualization
* feat: add ChartSkeleton loading placeholder for dashboard charts
* feat: add dashboard page with overview stats, timeseries, and breakdown charts
* feat: add audit log page with filterable event table and detail view
* feat: add MSW service worker for admin-ui API mocking
* feat: add MSW browser worker setup for development mode
* feat: add MSW server setup for admin-ui unit tests
* feat: add MSW request handlers for admin API mock endpoints
* feat: add mock audit metrics data for development and testing
* feat: add mock system info data for development and testing
* feat: replace mock system data with ACME Corporation retail platform
20 tools across 6 connections (2 Trino, 2 DataHub, 2 S3),
all features enabled including OAuth, 6 toolkits and 6 personas.
* feat: replace mock audit data with ACME Corporation retail events
Seeded PRNG (mulberry32) for deterministic screenshots, 12 weighted
users, 19 tool definitions with realistic parameters and error
messages, business-hours timestamp distribution, 200 events, and
breakdown arrays for persona, connection, and toolkit dimensions.
* feat: add persona, connection, and toolkit breakdown endpoints to MSW handlers
* fix: auto-authenticate in MSW mode and fix service worker registration
Skip login screen when VITE_MSW=true, register service worker from
root path so it can intercept /api/* requests outside /admin/ scope,
and render the app even if MSW startup fails.
* fix: serve MSW service worker from root to cover /api/* scope
Vite plugin serves mockServiceWorker.js at / so the service worker
can intercept API requests that fall outside the /admin/ base path.
* fix: snap time range timestamps to the minute for stable query keys
Date.now() produced a new string every render, causing React Query
to treat each render as a new query and never settle to loaded state.
* feat: rename sidebar title from MCP Admin to MCP Platform
* feat: update page title to MCP Platform
* feat: add dark theme CSS variables
Standard shadcn/ui dark palette applied via .dark class on html root.
* feat: add theme store with system preference detection
Defaults to system theme, persists choice to localStorage, and
listens for OS-level theme changes. Guards against missing
matchMedia/localStorage in test environments.
* feat: add light/dark/system theme toggle to header
Three-button toggle using Sun, Moon, and Monitor icons from lucide-react,
positioned next to the time range selector.
* test: update assertion to match MCP Platform rename
* feat: add PostgreSQL dev compose for ACME local environment
* feat: add ACME seed data with 5000 audit events and knowledge insights
Business-hours weighted timestamps over 7 days, consistent user and
tool distributions, 8 knowledge insights in various review states,
and 2 changesets (1 applied, 1 rolled back).
* feat: add ACME platform config with 6 personas and dev API key
Configures admin, data-engineer, inventory-analyst, regional-director,
finance-executive, and store-manager personas with appropriate tool
access. Audit and knowledge features enabled, noop providers.
* feat: add dev-up and dev-down Makefile targets for ACME environment
* docs: add ACME local dev environment quick-start guide
* feat: add admin portal UI enhancements and tool execution endpoints
- Add GET /tools/schemas and POST /tools/call backend endpoints for
executing MCP tools from the admin UI via in-memory transport
- Remove Settings section from admin portal (deferred for redesign)
- Make sidebar title configurable via admin.portal_title config
- Add Home, Knowledge, Personas, and Tools pages with mock data
- Enhance dashboard and audit log pages with richer UI components
- Fix cyclomatic complexity in Breakdown and ListChangesets functions
- Replace acme-corp.com with example.com in dev seed data
* fix: commit admin-ui dist/.gitkeep so go:embed compiles in CI
The //go:embed all:dist directive requires the dist directory to exist.
The top-level dist/ gitignore pattern was blocking the .gitkeep from
being tracked. Scope the pattern to /dist/ (root only) so the negation
rule for internal/adminui/dist/.gitkeep takes effect.1 parent d696e7b commit 0bbb888
File tree
91 files changed
+23830
-427
lines changed- admin-ui
- .storybook
- public
- src
- api
- components
- cards
- charts
- layout
- lib
- mocks
- data
- pages
- audit
- dashboard
- home
- knowledge
- personas
- tools
- stores
- test
- cmd/mcp-data-platform
- dev
- internal
- adminui
- dist
- apidocs
- pkg
- admin
- audit
- postgres
- database/migrate
- middleware
- oauth
- platform
- toolkits/knowledge
- test/e2e/helpers
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
91 files changed
+23830
-427
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
326 | 326 | | |
327 | 327 | | |
328 | 328 | | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
329 | 358 | | |
330 | 359 | | |
331 | 360 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| |||
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
30 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
31 | 35 | | |
32 | 36 | | |
33 | 37 | | |
| |||
86 | 90 | | |
87 | 91 | | |
88 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
89 | 96 | | |
90 | 97 | | |
91 | 98 | | |
| |||
269 | 276 | | |
270 | 277 | | |
271 | 278 | | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
272 | 313 | | |
273 | 314 | | |
274 | 315 | | |
| |||
334 | 375 | | |
335 | 376 | | |
336 | 377 | | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
0 commit comments