Sources of truth
When a screen needs a reusable pattern, the default move is to extend one of these contracts before adding page-local styling.
Foundations
The design system favors quiet, dense, scan-friendly screens because Darpan is an operational tool. Visual polish supports repeated work without turning setup and review pages into marketing layouts.
Surface primitives
Static pages use the static-surface system:StaticPageFrameframes saved-record dashboards, lists, and editors.StaticPageSectiongroups related saved records or actions.static-page-record-gridandstatic-page-record-tilepresent saved records.static-page-module-gridandstatic-page-module-tilepresent in-surface navigation.static-page-list-toolbarandstatic-page-pagerown saved-list chrome.StaticEditableTitlehandles inline names without turning headings into heavy form controls.
WorkflowPageframes create, edit, and run flows.WorkflowStepFormowns the shared question, answer, action, and validation structure.WorkflowSelectandAppSelectprovide controlled selection patterns.WorkflowShortcutChoiceCardshandles keyed multiple-choice prompts.workflow-form-grid,workflow-form-grid--two, andworkflow-form-grid--compactprovide form layout before page-local CSS is considered.workflow-form--edit-single-pagemarks compact edit surfaces inside the workflow visual system.
InlineValidation, EmptyState, StatusBadge, AppTableFrame, AppSaveAction, and AppCancelAction.
Page composition
Each page starts from the surface that matches the user job.
This composition keeps saved state and user decisions separate. Static pages answer “what exists?” Workflow pages answer “what changes next?”
Extension rules
- Reuse shared UI and workflow components before creating a new component.
- Add recurring layout classes to
src/style.cssinstead of repeating scoped page CSS. - Keep route metadata current when adding or moving pages.
- Use the surface primitives above for common save, cancel, select, validation, and empty-state interactions.
- Keep custom Darpan UI in
darpan-ui, not in backendscreen/**,template/**, ortheme-library/**. - Let backend services own tenant filtering, validation, reconciliation rules, and generated-output paths.
Migration rules
- Settings pages split into static saved-record surfaces and workflow create/edit surfaces when one page is doing both jobs.
- Static pages preserve route behavior and workflow-origin state when they launch workflows.
Verification
Design-system changes are checked at the contract level.- Add or update focused component and page tests for new shared classes or route metadata.
- Verify static pages still render as saved-record surfaces.
- Verify workflow pages still use workflow shell classes and expected cancel or escape behavior.
- Run focused UI tests before broad UI checks.
- Use the Darpan frontend quality gate before handoff when the change touches shared shell, workflow, or static-surface behavior.