A front end for query profiling instrumentation
- React - UI library
- TypeScript - Type safety
- Vite - Build tool and dev server
- TanStack Router - Type-safe routing
- TanStack Query - Data fetching and state management
- ECharts - Data visualization
- echarts-for-react - React wrapper for ECharts
- Tailwind CSS - Utility-first CSS framework
- shadcn/ui - Beautiful, accessible component library
- Radix UI - Unstyled, accessible component primitives
- Lucide React - Beautiful icon library
- Node.js 24.11.0 (enforced via
.nvmrc,.node-version, and Volta)- Using nvm:
nvm useornvm install - Using volta: Automatically switches to correct version
- Using asdf/nodenv: Uses
.node-versionfile
- Using nvm:
- pnpm 11.5.3 (pinned via
packageManagerand Volta;>=11.5.3required)- Install with
npm install -g pnpm@11.5.3or see pnpm installation
- Install with
-
Clone the repository (or navigate to the project directory)
-
Install dependencies:
pnpm install- (Optional) Configure environment variables:
Create a .env file in the root directory and add your API endpoint:
VITE_API_BASE_URL=http://localhost:3000/apiStart the development server:
pnpm devThe app will be available at http://localhost:5173
The pnpm start script is also available as an alias for the Vite development
server, which is what the end-to-end test runner uses.
Build the production version:
pnpm buildPreview the production build:
pnpm previewInstall Playwright browser binaries if they are not already present:
pnpm playwright:installRun the Playwright smoke tests:
pnpm test:e2ePlaywright starts the Vite dev server on http://127.0.0.1:5173 automatically
unless PLAYWRIGHT_BASE_URL is set. The E2E global setup also starts
quent-simulator-server on http://127.0.0.1:18080, runs the deterministic
quent-query-engine-fixed emitter into its collector on 127.0.0.1:17836, and
stores generated event data in ui/.e2e-data/.
In CI only, Playwright writes an HTML report and screenshots failures; the GitHub UI workflow uploads those files when the E2E job fails.
The application includes stub API functions in src/services/api.ts. These
currently return mock data with simulated delays.
To integrate with a real backend:
- Update the
VITE_API_BASE_URLenvironment variable - Replace the mock implementations in
src/services/api.tswith actual API calls - Adjust the data types and interfaces as needed
The application uses Tailwind CSS and shadcn/ui for styling. You can customize
the theme by editing the CSS variables in src/index.css:
:root {
--background: 0 0% 100%;
--foreground: 222.2 84% 4.9%;
--primary: 222.2 47.4% 11.2%;
--secondary: 210 40% 96.1%;
/* ... more variables */
}You can also customize Tailwind's configuration in tailwind.config.js to
extend the default theme with custom colors, fonts, spacing, etc.
To add more shadcn/ui components to your project:
pnpm dlx shadcn@latest add [component-name]For example:
pnpm dlx shadcn@latest add button
pnpm dlx shadcn@latest add dialog
pnpm dlx shadcn@latest add dropdown-menu- Create a new file in
src/routes/(e.g.,analytics.tsx) - Define the route using
createFileRoute - TanStack Router will automatically pick up the new route
pnpm dev- Start development serverpnpm start- Start development serverpnpm build- Build for productionpnpm preview- Preview production buildpnpm lint- Run ESLintpnpm lint:fix- Fix ESLint errors and format codepnpm format- Format code with Prettierpnpm test:e2e- Run Playwright end-to-end tests
The application can render TanStack devtools for debugging:
- TanStack Router Devtools - Visual router debugging
- TanStack Query Devtools - Query state inspection
Both are off by default and gated behind the VITE_DEBUG env var, so they
won't appear in normal pnpm dev sessions or in production builds.
To enable them, start the dev server with VITE_DEBUG=1:
VITE_DEBUG=1 pnpm devTo leave them on for every dev session on your machine, create a
ui/.env.development.local file (already gitignored via *.local):
VITE_DEBUG=1Then a plain pnpm dev will pick it up. Restart the dev server after changing
env vars; Vite does not hot-reload import.meta.env changes.
