← Back to all projects
🖥️

Open source · vishwajit-vm Designed · Phase 3

Strutvane UI

Metadata-driven React UI for Strutvane or any OpenAPI backend

@strutvane/ui turns API metadata into a complete admin interface: list pages with filters, bulk actions and export, create and edit forms, detail pages, and auth and admin screens. It reads the Strutvane manifest — or infers one from any OpenAPI 3.x API — and every component is owned, shadcn-compatible code you can override or eject.

0 axe-core violations500 virtualized rowsspike · 48 tests

Built for: Full-stack teams using Strutvane, and front-end developers who just want a UI for an existing OpenAPI backend.

Packages on npm

↓ Scroll to explore the problem, architecture and stack

😩

The problem

Admin UIs are 80% the same tables, forms and filters, yet teams rebuild them for every resource — and front-end filters, validation and permissions quietly drift away from what the API actually enforces.

💡

Why it matters

Driving the UI from the same metadata as the API keeps them in sync, and owned components mean the generated screens are a starting point, not a cage.

What you can do with it

01Get list, form and detail pages for every resource automatically — with filters, bulk actions, export and saved views.
02Use built-in auth and admin screens, including a tenant switcher.
03See only what you’re allowed to: the UI hides what the API forbids (and the API still enforces it).
04Theme with design tokens and dark mode; override any field, widget or page — or eject the screens.
05Point it at any OpenAPI 3.x API in UI-only mode.

How it’s built

A simplified view of the architecture — follow the dots as a request moves down the layers.

Your code
web/owned components
Renderer
ui/reactpages · forms · tables
Component registrytyped overrides
Headless core
ui/coreno React · query state
Metadata
Manifeststrutvane.json · OpenAPI
contractsListQuery · Problem

A request, step by step

  1. The UI loads the manifest — from Strutvane, inferred from OpenAPI, or a local ui.resources.ts.
  2. Resources register their routes; list state lives in the URL so views are shareable.
  3. List queries go to the server, which does all filtering, sorting and paging.
  4. The registry picks the right widget for each field: field override → named widget → field type → default.
  5. Validation errors map to the deepest matching field (for example lines[1].amount), else its parent, else a form banner.

Tech stack

Frontend
ReactViteTailwind CSSTanStack Router · Query · Table · Form
Components
shadcn registryBase UILucide
Quality
Playwrightaxe-core

What I built

  • Designed the UI package: a headless core with no React, a React renderer, and owned components in your web/ folder.
  • Proved it in spike 08: 48 tests, axe-core 0 accessibility violations, 500 virtualized rows, and 5 real UI defects found and fixed.
  • Designed one shared filter builder for the URL parser and the filter bar, so client and server filters can’t drift (ADR-0014).
  • Designed a typed component registry and error placement that maps a 422 issue to the exact field it belongs to.

Hard problems & how I solved them

❓ Client and server filters drifting apart.

✅ All list operations run on the server, and the URL parser and filter bar share one filter builder (ADR-0014).

❓ Customise without forking.

✅ A typed registry resolves components field-first, and one shared field wrapper owns accessibility for every widget.