@lssm-tech/example.workflow-systemexample.workflow-system
Workflow and approval system example for ContractSpec - State machine with role-based transitions
@lssm-tech/example.workflow-systemSource, release and verification context
Source snapshot bcc79fcc · Declared package version 5.0.4. This page combines the checked-in package guide and manifest; commands and runtime behavior were not executed in this review.
See where this package fits.
Follow a declared connection, inspect an import, then open the source guide when you need the detail.
Arrows point from a package to its direct dependency. Each count is derived from the captured manifests.
@lssm-tech/example.workflow-system
Website: https://contractspec.io
Workflow and approval system example for ContractSpec - State machine with role-based transitions.
What This Demonstrates
- Rich Landing Screen: Product introduction explaining workflow orchestration concepts, demo path, and navigation.
- Navigation Rail: Clear sidebar navigation between Overview, Templates, Instances, Approvals, and Analytics.
- State Machine Pattern: Workflow transitions with defined states and allowed transitions.
- Approval Flow: Role-based access control for approval decisions.
- Multi-Entity Domain: Workflow definitions, instances, steps, and approvals.
- React UI: WorkflowDashboard with templates, instances, and visualizations.
- Contract-Backed Visualizations: Status, throughput, and workload analysis.
- Demo Scenarios: Expense Approval, Vendor Onboarding, and Policy Exception workflows with sample data.
Canonical Demo Path
- Landing Screen - Start on the product introduction explaining workflow orchestration.
- Navigation - Use the sidebar rail to explore Templates, Instances, and Approvals.
- Templates - View workflow definitions (Expense Approval, Vendor Onboarding, Policy Exception).
- Instances - See running workflows with their current states.
- Approvals - Review pending approvals and role-based access.
- Analytics - View throughput metrics and workload analysis.
New Features
- LandingScreen: Product-style introduction with value proposition and demo path.
- WorkflowSystemPreviewV2: Enhanced preview with sidebar navigation.
- WorkflowNav: Navigation rail for moving between workflow sections.
- Demo Scenarios: Three complete workflow examples with sample instances.
Running Locally
From examples/workflow-system:
bun run devbun run buildbun run testbun run typecheck
Usage
Use @lssm-tech/example.workflow-system as a reference implementation, or import its exported surfaces into a workspace that composes ContractSpec examples and bundles.
Architecture
src/approvalis part of the package's public or composition surface.src/docs/contains docblocks and documentation-facing exports.src/entities/contains domain entities and value objects.src/example.tsis the runnable example entrypoint.src/handlers/contains handlers or demo adapters wired to contract surfaces.src/index.tsis the root public barrel and package entrypoint.src/instanceis part of the package's public or composition surface.
Public Entry Points
- Export
.resolves through./src/index.ts. - Export
./approvalresolves through./src/approval/index.ts. - Export
./approval/approval.enumresolves through./src/approval/approval.enum.ts. - Export
./approval/approval.eventresolves through./src/approval/approval.event.ts. - Export
./approval/approval.handlerresolves through./src/approval/approval.handler.ts. - Export
./approval/approval.operationsresolves through./src/approval/approval.operations.ts. - Export
./approval/approval.schemaresolves through./src/approval/approval.schema.ts. - Export
./docsresolves through./src/docs/index.ts. - Export
./docs/workflow-system.docblockis an alias of./docsand resolves through./src/docs/index.ts. - Export
./entitiesresolves through./src/entities/index.ts. - The package publishes 44 total export subpaths; keep docs aligned with
package.json.
Local Commands
bun run dev— contractspec-bun-build devbun run build— contractspec-bun-build buildbun run lint— bun lint:fixbun run lint:check— biome check .bun run lint:fix— biome check --write --unsafe --only=nursery/useSortedClasses . && biome check --write .bun run typecheck— tsgo --noEmitbun run publish:pkg— bun publish --tolerate-republish --ignore-scripts --verbosebun run publish:pkg:canary— bun publish:pkg --tag canarybun run clean— rimraf dist .turbobun run build:bundle— contractspec-bun-build transpilebun run build:types— contractspec-bun-build typesbun run prebuild— contractspec-bun-build prebuildbun run test— bun test
Recent Updates
- UI Improvements: Added LandingScreen, WorkflowNav, and WorkflowSystemPreviewV2 with enhanced navigation.
- Demo Scenarios: Complete workflow examples with Expense Approval, Vendor Onboarding, and Policy Exception.
- Replace eslint+prettier by biomejs to optimize speed.
Notes
- Works alongside
@lssm-tech/lib.contracts-spec,@lssm-tech/lib.design-system,@lssm-tech/lib.example-shared-ui,@lssm-tech/lib.runtime-sandbox,@lssm-tech/lib.schema, ...
Declared capabilities.
This manifest does not declare a capability catalogue. Use the guide, import map and source to assess the package.
Imports and export paths.
55 entriesThese are package-manifest entry points. Named symbols listed above come from the capability catalogue; this is not an exhaustive TypeScript symbol reference.
55 imports · showing 35
@lssm-tech/example.workflow-system/approval@lssm-tech/example.workflow-system/approval/approval.enum@lssm-tech/example.workflow-system/approval/approval.event@lssm-tech/example.workflow-system/approval/approval.handler@lssm-tech/example.workflow-system/approval/approval.operations@lssm-tech/example.workflow-system/approval/approval.schema@lssm-tech/example.workflow-system/docs@lssm-tech/example.workflow-system/docs/workflow-system.docblock@lssm-tech/example.workflow-system/entities@lssm-tech/example.workflow-system/entities/approval@lssm-tech/example.workflow-system/entities/instance@lssm-tech/example.workflow-system/entities/step@lssm-tech/example.workflow-system/entities/workflow@lssm-tech/example.workflow-system/example@lssm-tech/example.workflow-system/handlers@lssm-tech/example.workflow-system/handlers/workflow.handlers@lssm-tech/example.workflow-system/instance@lssm-tech/example.workflow-system/instance/instance.enum@lssm-tech/example.workflow-system/instance/instance.event@lssm-tech/example.workflow-system/instance/instance.handler@lssm-tech/example.workflow-system/instance/instance.operations@lssm-tech/example.workflow-system/instance/instance.schema@lssm-tech/example.workflow-system/presentations@lssm-tech/example.workflow-system/seeders@lssm-tech/example.workflow-system/shared@lssm-tech/example.workflow-system/shared/demo-scenario@lssm-tech/example.workflow-system/shared/mock-data@lssm-tech/example.workflow-system/shared/types@lssm-tech/example.workflow-system/state-machine@lssm-tech/example.workflow-system/tests/operations.test-spec@lssm-tech/example.workflow-system/ui@lssm-tech/example.workflow-system/ui/components@lssm-tech/example.workflow-system/ui/components/WorkflowNav@lssm-tech/example.workflow-system/ui/hooks@lssm-tech/example.workflow-system/ui/hooks/useWorkflowList@lssm-tech/example.workflow-system/ui/renderers@lssm-tech/example.workflow-system/ui/renderers/workflow.markdown@lssm-tech/example.workflow-system/ui/views@lssm-tech/example.workflow-system/ui/views/LandingScreen@lssm-tech/example.workflow-system/ui/views/WorkflowDagScreen.deprecated@lssm-tech/example.workflow-system/ui/views/WorkflowSystemPreviewV2@lssm-tech/example.workflow-system/ui/WorkflowDashboard@lssm-tech/example.workflow-system/ui/WorkflowDashboard.visualizations@lssm-tech/example.workflow-system/visualizations@lssm-tech/example.workflow-system/visualizations/catalog@lssm-tech/example.workflow-system/visualizations/selectors@lssm-tech/example.workflow-system/workflow@lssm-tech/example.workflow-system/workflow-system.capability@lssm-tech/example.workflow-system/workflow-system.feature@lssm-tech/example.workflow-system/workflow/workflow.enum@lssm-tech/example.workflow-system/workflow/workflow.event@lssm-tech/example.workflow-system/workflow/workflow.handler@lssm-tech/example.workflow-system/workflow/workflow.operations@lssm-tech/example.workflow-system/workflow/workflow.schemaNo export paths match this search.
Dependencies and related packages.
Runtime dependencies 9
- @lssm-tech/lib.contracts-spec
- workspace:^
- @lssm-tech/lib.design-system
- workspace:^
- @lssm-tech/lib.example-shared-ui
- workspace:^
- @lssm-tech/lib.presentation-runtime-core
- workspace:^
- @lssm-tech/lib.runtime-sandbox
- workspace:^
- @lssm-tech/lib.schema
- workspace:^
- lucide-react
- catalog:ui
- react
- catalog:
- react-dom
- catalog:
Development dependencies 5
- @lssm-tech/tool.bun
- workspace:*
- @lssm-tech/tool.typescript
- workspace:*
- @types/react
- catalog:types
- @types/react-dom
- catalog:types
- typescript
- catalog:
Package scripts.
Commands declared by this package. Review its setup requirements before running them; no command here was executed by this review.
bun publish --tolerate-republish --ignore-scripts --verbosebun publish:pkg --tag canarycontractspec-bun-build buildcontractspec-bun-build transpilecontractspec-bun-build typescontractspec-bun-build devrimraf dist .turbobun lint:fixnode ../../scripts/biome.cjs check --write --unsafe --only=nursery/useSortedClasses . && node ../../scripts/biome.cjs check --write .node ../../scripts/biome.cjs check .contractspec-bun-build prebuildbun testtsgo --noEmit