feat(dashboard): add monitoring dashboard package#4
Open
AllyMurray wants to merge 30 commits intomainfrom
Open
feat(dashboard): add monitoring dashboard package#4AllyMurray wants to merge 30 commits intomainfrom
AllyMurray wants to merge 30 commits intomainfrom
Conversation
Add listEntries(), listJobs(), and listResources() to in-memory store implementations to enable paginated browsing via the dashboard UI. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add listEntries(), listJobs(), and listResources() to SQLite store implementations using Drizzle ORM queries with LIMIT/OFFSET pagination. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Create the @http-client-toolkit/dashboard package with Vite (client SPA) and tsup (server middleware) dual build setup, Zod config schemas, and public API entry point exporting createDashboard and startDashboard. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implement adapter layer that wraps concrete store implementations (Memory, SQLite) with a uniform interface. Runtime duck-typing detects the store backend automatically. Generic fallback for unknown stores. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implement REST API with handlers for cache, dedup, and rate limit operations. Includes embedded middleware (createDashboard), standalone server (startDashboard), static file server with SPA fallback, and request/response helpers. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implement browser dashboard with hash-based routing, polling hooks, and capabilities-aware components for cache entries, dedup jobs, and rate limit resources. Includes data tables, stat cards, pagination, and confirmation dialogs for destructive actions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add dashboard TypeScript project reference and update pnpm-lock.yaml for new dashboard dependencies. Core file has formatting-only changes from linter. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update root README with dashboard package link. Add dashboard guide page to Starlight docs-site covering installation, embedded middleware, standalone server, configuration, supported backends, and API endpoints. Update sidebar, landing page, introduction, and installation pages. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add a root npm script to start the dashboard with seeded in-memory stores for local development and testing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace default system fonts with DM Sans and JetBrains Mono, refine the dark color palette, and restructure the overview layout to use inline stat components instead of StatsCard. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add createDashboardHandler() returning (Request) => Promise<Response> for use with Hono, Bun, Deno, and other Web Standards-compatible runtimes. Shares the same DashboardContext and store adapters as the existing Node middleware. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Test all API routes, store-not-configured 404s, SPA fallback, and basePath support using direct Request objects without an HTTP server. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Wrap createDashboardHandler in a Node http server via a toNodeHandler adapter and make real HTTP requests against it, proving the Request/Response contract works end-to-end over the network. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add integration tests for single dedup job lookup, single rate limit resource lookup, PUT config with JSON body parsing, 405 method not allowed, and basePath support. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Document createDashboardHandler() with usage examples for Hono, Bun, and Deno alongside the existing middleware and standalone sections. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace DashboardOptionsSchema with ClientConfigSchema + multi-client DashboardOptionsSchema. Client names must be URL-safe, unique, and each client must provide at least one store. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ypes Rename DashboardContext to ClientContext (with name field) and add MultiClientContext wrapping a Map of clients. Update handleHealth to return per-client store info and rename handleStores to handleClients. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… paths Change extractParam patterns from /api/cache/entries/:hash to /cache/entries/:hash (and similar for dedup and rate-limit handlers) so routers can strip the /api/clients/:name prefix before dispatching. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Refactor api-router, web-handler, and middleware to accept MultiClientContext. Routes are now /api/health (aggregate), /api/clients (list), and /api/clients/:name/... (per-client store endpoints). Unknown client names return 404. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add ClientStoreInfo and ClientInfo types, replace StoreInfo. All store API methods now take clientName as first parameter and route through /api/clients/:name/... paths. Add api.clients() endpoint. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update useCacheStats, useCacheEntries, useDedupeStats, useDedupeJobs, useRateLimitStats, and useRateLimitResources to accept clientName as first parameter and pass it to API calls. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add client selection state to App with hash format #clientName/view. Layout gains client selector buttons in sidebar. All view components now receive clientName, stores, and pollIntervalMs props instead of the full HealthResponse. Add client-selector CSS styles. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rewrite middleware, web-handler, web-handler integration, and standalone tests to use clients config and /api/clients/:name/... paths. Add multi-client routing tests and unknown client 404 tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Show two named clients (user-api and product-api) with independent stores and seeded test data. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@http-client-toolkit/dashboard— a browser-based React SPA for monitoring cache, dedup, and rate limit stores in real time/api/clients/:name/...so applications with several HTTP clients can monitor them independentlycreateDashboard), Web Standards fetch handler (createDashboardHandler), and standalone server (startDashboard)store-memoryandstore-sqlitefor dashboard supportTest plan
pnpm buildsucceeds (Vite client + tsup server)pnpm lintcleanexamples/dev-server.tswith multi-client setup🤖 Generated with Claude Code