Skip to content
bitzorcas
中EN

Guide

Page Development

A recipe-driven frontend page workflow, concept map, redlines, and done checks for C# backend developers.

Last updated

Page Development

This workflow is for developers who know C# and .NET but are new to React and TypeScript. Page work supplies business contracts; it does not redesign color, layout, and states.

Concept map

C# / .NET conceptFrontend equivalentRule
Typed API Client@bitz/platform-sdkDo not handwrite DTOs or call fetch from a page
Application QueryQuery hook or loaderOrchestrate a read model and page state
CommandMutation hookUse shared success, error, and invalidation behavior
Authorization PolicyPermissionGate / FeatureGateUX only; the backend remains authoritative
Razor Component parameterReact propKeep it explicit and read-only
Result / ProblemDetailsSDK error modelDo not parse private error strings
Integration testPlaywright user flowCover real state transitions

Six steps

  1. Inherit a Profile: the product chooses Theme, Mode, Density, Shell, and Workspace.
  2. Choose a Recipe: List, Detail, Edit, Wizard, Dashboard, or Identity.
  3. Choose contracts: locate generated SDK Query/Command and server permission codes.
  4. Supply content: declare columns, fields, validation, copy, and business operations.
  5. Complete states: implement applicable Loading, Empty, Error, Unauthorized, and Disabled states.
  6. Pass gates: lint, typecheck, tests, build, representative visual matrix, and Design Guardian.

Recipes

RecipeFixed composition
ListPageHeader + QueryToolbar + AppliedSummary + DataToolbar + ServerDataTable + Pagination
DetailPageHeader + Summary + LocalTabs + ActivityTimeline
EditFormSection + FieldGroup + ValidationSummary + ActionBar
WizardStepper + StepPanel + SaveDraft + Review
DashboardQueryToolbar + MetricStrip + WorkQueue + DenseTable
IdentityIdentityShell + FormState + Recovery/Verification Action + Security Context

Product developers own SDK calls, permissions, fields, columns, copy, and operations. The Design System owns color, elevation, row height, breakpoints, focus, errors, and loading skeletons.

Dependency rules

  • Pages belong in the matching apps/app feature or route.
  • Import primitives from @bitz/components.
  • Import composed patterns and recipes from @bitz/widgets or their future dedicated package.
  • Call the backend only through the single @bitz/platform-sdk request pipeline.
  • Consume generated material output; never import token Source from a page.
  • Import from package barrels, not private deep paths.

Page redlines

  • No raw brand color, arbitrary gradient, colored shadow, or page-owned theme.
  • No handwritten backend DTO, scattered fetch, or local HTTP adapter.
  • No TenantId, Role, Permission, or refresh token in localStorage.
  • No frontend visibility treated as server authorization.
  • No page-specific Shell, tabs, filter system, or data table.
  • No happy path without the relevant failure and empty states.

Classify the destination before choosing a component:

  • cross-domain destinations are primary module navigation owned by the Shell;
  • destinations inside one domain are current-module navigation, shown in the Side context panel or Top secondary bar;
  • simultaneously open URLs or resources are Managed Workspace Tabs;
  • sections inside the current page use WorkspaceLocalTabs.

Do not copy module destinations into WorkspaceHeader. Local Tabs stay on one line and map to a URL or recoverable state. The widget owns sticky positioning, overflow, selected state, and keyboard semantics; a page supplies only labels and content.

Before a contribution

Terminal window
# Run the gates that exist today from the frontend root.
cd frontend
yarn install --immutable
yarn lint
yarn typecheck
yarn build

Run Vitest for affected packages. For layout, theme, density, narrow-screen, or accessibility changes, run yarn workspace @bitz/app test:visual (install Chromium first with test:visual:install). A standalone Design Lab and unified ui:check remain future capabilities and must not be reported as available.

Record the result in a stable, reviewable form:

Design Guardian: pass | changes-required
Contract: Theme / Mode / Density / Shell / Workspace / Recipe
States verified: default, hover, active, focus-visible, disabled, loading, data states
Accessibility: contrast, keyboard, text zoom, narrow viewport, reduced motion
Exceptions: none | ADR/ledger reference
Visual baseline: unchanged | intentional update reference

Read Design System 1.2 and implementation gates before beginning UI work.

100%

Scroll or use controls to zoom · drag when enlarged · double-click for 100% / 200%