Package: padosoft/eval-harness-ui
Target stack: Laravel 13.x + PHP 8.3+
Purpose: Read-only admin panel for consuming padosoft/eval-harness report APIs.
eval-harness-ui is a host-driven SPA package that gives QA teams and ops teams a ready dashboard without touching the eval-harness backend repository.
Backend API repository: padosoft/eval-harness
- What this package gives you
- Screen list
- Why this package exists
- Architecture in plain words
- Runtime contract
- Production install (beginner-proof, copy/paste)
- Minimal security wiring
- Environment and config reference
- API mapping the UI expects
- Local development setup
- Release process (what is expected in PR flow)
- Constraints and behavior notes
- Roadmap (current status aligned with AGENTS docs)
- Contributing and support
- License
- 7 operational screens shipped as a SPA
- Fast route-based admin integration in the host app
- Clear errors for
404,422,503response cases - English/Italian translations
- Accessibility checks integrated in CI (
seriousandcriticalgates) - Playwright e2e coverage for all major flows
- Zero API mutations: read-only by design
- Dashboard

- Reports list

- Report detail

- Compare

- Trend

- Adversarial manifests

- Adversarial manifest details

- Live batches

eval-harness can keep domain logic and API concerns.
This package adds only UI surfaces and route mounting for admin consumption.
- No internal
eval-harnessstorage or processing code is copied into this package. - No destructive/POST/PUT/PATCH/DELETE calls are part of this UI flow.
- Host app owns auth, tenancy, and policy decisions.
Host Laravel app
-> Laravel Service Provider
-> package config is published
-> route path is mounted under a configurable prefix
-> Blade entrypoint + JSON bootstrap payload
-> Vite-powered React SPA (TypeScript)
EVAL_HARNESS_UI_PREFIXdefines where the panel is mounted. Default:admin/eval-harness.EVAL_HARNESS_API_BASEdefines the host base path for report APIs. Default:/admin/eval-harness/api.- Optional tenant header is sent when needed:
X-Eval-Harness-Tenant. - Frontend reads bootstrap info (version/labels/version contract hints) from package endpoints.
composer require padosoft/eval-harness-uiphp artisan vendor:publish --tag=eval-harness-ui-config
php artisan vendor:publish --tag=eval-harness-ui-assets
php artisan vendor:publish --tag=eval-harness-ui-viewsAdd to your .env:
EVAL_HARNESS_UI_ENABLED=true
EVAL_HARNESS_UI_PREFIX=admin/eval-harness
EVAL_HARNESS_UI_MIDDLEWARE="web,auth,can:eval-harness.viewer"
EVAL_HARNESS_API_BASE=/admin/eval-harness/api
EVAL_HARNESS_TENANT_HEADER=X-Eval-Harness-Tenant
EVAL_HARNESS_UI_LOCALE=enphp artisan config:clear
php artisan route:clear
php artisan optimize:clear
php artisan route:list --path=admin/eval-harnessNavigate to http://your-app.test/admin/eval-harness.
If login is required, use a user that can pass eval-harness.viewer policy.
This package does not define authorization policy defaults. You must define who can access these routes in your host app.
use Illuminate\Support\Facades\Gate;
Gate::define('eval-harness.viewer', function ($user) {
return $user->can('viewEvalHarness');
});If you are not using policies, replace this with any Closure logic that matches your project auth model.
// config/eval-harness-ui.php (defaults)
return [
'enabled' => env('EVAL_HARNESS_UI_ENABLED', false),
'route_middleware' => ['web', 'auth', 'can:eval-harness.viewer'],
'prefix' => env('EVAL_HARNESS_UI_PREFIX', 'admin/eval-harness'),
'api_base' => env('EVAL_HARNESS_API_BASE', '/admin/eval-harness/api'),
'tenant_header' => env('EVAL_HARNESS_TENANT_HEADER', 'X-Eval-Harness-Tenant'),
'locale' => env('EVAL_HARNESS_UI_LOCALE', env('APP_LOCALE', 'en')),
'schema_version' => [
'required' => true,
'min_supported' => '1.0',
],
'metric_labels' => [
'exact-match.mean' => 'Exact match',
'llm-judge.pass_rate' => 'Judge pass rate',
'macro_f1' => 'Macro F1',
],
];| Screen | Endpoint(s) |
|---|---|
| Dashboard | /reports, /batches/live, /adversarial/manifests, /datasets/{name}/trend?limit=30 |
| Reports list | /reports |
| Report detail | /reports/{id}, /reports/{id}/cohorts, /reports/{id}/histograms, /reports/{id}/rows.csv, /reports/{id}/download |
| Compare | /reports/{id}/diff/{otherId} |
| Trend | /datasets/{name}/trend |
| Adversarial | /adversarial/manifests, /adversarial/manifests/{name} |
| Live batches | /batches/live, /batches/{id}/progress |
- PHP 8.3+ (
8.4recommended for CI parity) - Node.js 20+ (LTS)
- Composer and npm
- Laravel 13.x app shell
composer install
npm install
npm run typecheck
npm run test:unit
npm run build
npm run e2e
npm run e2e:accessibility
composer validate --strict --no-check-publish
composer analyse
composer testIf all commands are green, your local environment matches the repository quality gates.
src/: package service provider and route registration.config/: package config defaults.routes/web.php: mount entrypoint for the admin panel.resources/js/: React application source.resources/views/: Blade bootstrap template.tests/Featureandtests/Unit: backend regression tests.tests/e2e: Playwright and accessibility test suites.docs/: roadmap, progress and operating rules..github/: workflows and PR policy docs.
- Implementa in branch
task/<macro>-.... - Apri PR per quel subtask.
- Esegui local gates e richiedi Copilot review.
- Merga nel macro branch dopo review e test pass.
- Merga in
mainsolo con CI verde e checklist completata. - Tagga e push per rilascio automatico.
git checkout main
git pull --ff-only
git tag -a v0.x.y -m "Release v0.x.y"
git push origin v0.x.yrelease.yml in .github/workflows can create the GitHub release automatically if configured.
- No mutation endpoints are required by this package.
- Schema compatibility is enforced when
schema_versionis expected and missing data is treated as legacy/empty state. - Large trend datasets may be rate-limited by host-side API limits and can return
503.
- v0.1.0 completed with dashboard, reports, compare, trend, adversarial, and live batches.
- v0.2.0 planned for future release: chart unification and export reporting improvements.
- v0.3.0 planned for future release: runtime i18n switching and policy cache improvements.
- v0.4.0 planned for future release: richer release notes and host extension points.
If you are joining as a junior contributor:
- Read
docs/PROGRESS.mdanddocs/PLAN.mdbefore touching code. - Follow the required tests before opening a PR.
- Keep modifications small and scoped.
- Respect hard anti-zombie server rules when running local checks (no dangling PHP/Vite/Node processes).
MIT