Sources of truth
| Source | Owns |
|---|---|
src/style.css | Global tokens, static-surface classes, workflow classes, form utilities, responsive behavior, safe-area offsets, theme variables, and reduced-motion rules. |
src/App.vue | Global shell, floating actions, command palette wiring, user menu, tenant switcher, theme toggle, and workflow escape handling. |
src/router/index.ts | Route ownership, auth metadata, static versus workflow surface mode, and public route handling. |
src/components/ui/** | Shared UI primitives for static pages, validation, empty states, badges, tables, selects, save actions, cancel actions, and editable titles. |
src/components/workflow/** | Shared workflow frame, progress, step form, workflow select, and shortcut choice cards. |
src/components/shell/CommandPalette.vue | Global command navigation and command result presentation. |
Foundations
| Foundation | Current rule |
|---|---|
| Typography | The app uses a mono-family system through global CSS so setup records, IDs, and reconciliation data read consistently. |
| Color | Light and dark themes are expressed through CSS variables. Components consume semantic variables instead of hard-coded palettes. |
| Spacing | Shared --space-* tokens define page rhythm, grid gaps, controls, and floating-action offsets. |
| Radius | Radius tokens keep controls and surfaces restrained and consistent. |
| Surfaces | Static and workflow surfaces have separate width, padding, and typography tokens. |
| Interaction | Focus states, selection colors, disabled states, and reduced-motion behavior live in shared CSS. |
| Responsiveness | Shared breakpoints and safe-area-aware offsets keep workflows and floating actions usable on smaller screens. |
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.| User job | Preferred page shape |
|---|---|
| Browse saved records | Static page with saved-record tiles, toolbar, and pagination when needed. |
| Inspect one durable record | Static detail page with inline title editing and action tiles. |
| Create a new record | Workflow page with one focused decision per step. |
| Edit a compact setup record | Workflow page with compact single-page form styling. |
| Run a reconciliation | Workflow page that collects source, schema, field, and run intent before handing execution to the backend. |
| Review run output | Static page that reads generated output metadata and opens durable result views. |
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 shared save, cancel, select, validation, and empty-state primitives for common 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.
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.