@sbtools/ui-web
v0.9.0
Published
Shared React UI renderer package for supabase-tools web pages.
Downloads
541
Readme
@sbtools/ui-web
Shared UI package for supabase-tools — SSR page renderers and the Vite-built React dashboard SPA.
Installation
npm install @sbtools/ui-webWhat's Included
SSR Renderers
Server-side page renderers used by plugin CLI commands to generate standalone HTML files:
renderDepgraphPage— Interactive dependency graph (sbt depgraph --html)renderFrontendUsagePage— Frontend SDK usage report (sbt frontend-usage)renderMigrationAuditPage— Migration audit report (sbt migration-audit)renderMigrationDetailPage— Per-migration detail pagesrenderLogsViewerPage— Live log viewer (sbt logs viewer)renderMigrationStudioPage— Migration authoring UI (sbt migration-studio)renderRawDocument— Base HTML document shell
Dashboard SPA
A Vite-built React single-page application served by sbt dashboard:
- App shell with sidebar navigation and dark mode toggle
- Shared components: StatCard, Badge, SearchInput, CodeBlock, DataTable, CardGrid, GenericSection
- Plugin-driven pages rendered from
DashboardSectionDefJSON config - Design tokens with automatic light/dark mode (
tokens.css)
The dashboard is bundled into @sbtools/core during build — consumers don't need to install this package directly.
Usage
import { renderDepgraphPage, renderRawDocument } from "@sbtools/ui-web";Development
To run the dashboard SPA with Vite HMR:
Start the dashboard backend (serves API and static assets on port 3400):
sbt dashboardGenerate atlas data (required for
/api/atlas-data):sbt generate-atlasRun Vite dev server with API proxy:
npm run devOr from repo root:
npm run dashboard:devThe UI runs at
http://localhost:5173. API calls to/api/*are proxied to the backend athttp://127.0.0.1:3400.Set
DASHBOARD_API_PORTif the backend runs on a different port.
Dependencies
react,react-dom— Used forrenderToStaticMarkupin SSR renderersvite,@vitejs/plugin-react— Dev dependencies for dashboard build
