Skip to main content

Build with the Command Center SDK

@dev-mainsequence/command-center-sdk supplies the reusable contracts, lifecycle, and interface primitives needed by Command Center-compatible applications. It standardizes resource workflows, navigation, responsive layout, application feedback, themes, backend contracts, and secure static-site embedding.

Your application remains in control of authentication, API clients, routes, permissions, query caching, persistence, notifications, and product-specific behavior.

Start with the mental model​

The SDK is organized in layers:

definition → adapter → reusable lifecycle → controlled view → host-owned effect
  • A definition gives stable meaning to a resource, destination, column, stage, or action.
  • An adapter converts an external system into an SDK-owned model.
  • A lifecycle coordinates loading, cancellation, selection, preflight, or handshake state.
  • A view renders normalized state with consistent interaction and accessibility.
  • A host effect commits a route, mutation, notification, credential decision, or persistence change under application policy.

Read SDK architecture for the complete model and State and ownership before designing a cross-surface workflow.

Choose a learning path​

Build your first screen​

Use Getting started to install the package, define a resource, render a working list, compose an application page, and verify it. The tutorial uses only declared package exports and makes every application-owned dependency visible.

Understand resource applications​

Read Resource applications for the definition/adapter/view model, collection versus discovery, UI versus action identity, selection, activation, and the bulk-action lifecycle. Then use Resources for complete list, detail, picker, and action examples.

Compose application chrome​

  • Navigation covers hierarchy, contributions, native link behavior, controlled selection, and router ownership.
  • Application layout covers page geometry, cards, responsive grids, and browser verification.
  • Application feedback covers staged startup, reconnect, retry, and terminal failure presentation.
  • Application controls covers buttons, badges, labels, labelled fields, inputs, and textareas that inherit the SDK's theme, focus, and touch rules.

Theme or embed an application​

  • Themes covers CSS ordering, presets, the closed token contract, density, surface hierarchy, data visualization, persistence, and visual verification.
  • Static-site embeds covers exact-origin messaging, sandbox policy, context synchronization, local Vite/FastAPI development, delegated FastAPI HTTP and WebSocket access, cancellation, and security testing.
  • Backend contracts explains the manifest, schemas, fixtures, roles, and compatibility rules for non-TypeScript implementations.

Operate or extend​

  • Application operations separates SDK updates, skill refresh, dependency refresh, deployment from Git pushes and the repository's release tags, and recovery.
  • Application documentation builds a task-focused end-user guide whose folder hierarchy mirrors the application menu and ships at /docs/ in the same artifact.
  • Extending and releasing covers SDK-source changes, public boundaries, contracts, packaging, and release verification.
  • Architecture decisions records why compatibility-sensitive designs were chosen. A Proposed ADR is not a released API.

The ownership boundary​

SDK ownsConsuming application owns
Normalized resource and discovery modelsRaw endpoints, authentication, and response adaptation
List/detail/picker interaction lifecycleRoutes, query cache, mutation policy, and notifications
Controlled navigation chrome and semantic intentsPermission filtering and route commitment
Page gutters, section rhythm, cards, and geometry checksDomain section ordering and specialized layouts
Status/progress presentation and accessibilityReadiness APIs, polling, retry, and timeout policy
Button, badge, and labelled-field presentation and accessible wiringForm values, validation rules, submission, and mutation policy
Theme presets, variables, and helper functionsPersisting and restoring the selected theme ID
Iframe protocol validation and request correlationOrigin allowlists, CSP, backend authorization, and audit
Versioned schema/fixture bundleBackend implementation and coordinated rollout

If code needs a product route, access token, private endpoint, permission store, or persistence decision, it belongs in the consuming application or backend—not in a reusable SDK definition or view.

Public entrypoint families​

ConceptEntry points
Resource model/resource, /resource/react, /views
Application chrome/navigation, /navigation/testing, /layout, /layout/testing, /feedback, /controls
Visual language/theme, /theme/presets, /theme/data-viz, theme CSS exports
Static-site integration/embed, /embed/react, /vite
Language-neutral contracts/contracts, /contracts/manifest.json, schemas and fixtures

The package root is a compatibility re-export of the resource surface. Prefer explicit subpaths in new code. See the public API map for symbols, runtime assumptions, CSS exports, and compatibility rules.

Install​

npm install @dev-mainsequence/command-center-sdk react react-dom

Load browser styles once:

import "@dev-mainsequence/command-center-sdk/theme/styles.css";
import "@dev-mainsequence/command-center-sdk/styles.css";

The SDK ships ESM and TypeScript declarations and does not require Vite. Use only declared package exports; dist, src, and another application's internal modules are not consumer contracts.

Task and agent-skill map​

The npm package installs version-matched task guidance under .agents/skills/command-center/. Human guides explain the concepts and tradeoffs; skills give an agent an execution checklist for a specific consuming-application task.

TaskGuideInstalled skill path
Install and use the SDKGetting startedgeneral/use-command-center-sdk
Compose an applicationSDK architecturegeneral/build-command-center-application
Compose the embedded shell and navigationNavigationnavigation/compose-command-center-application-shell
Inspect, refresh, and deploy an applicationApplication operationsgeneral/maintain-command-center-code-repository
Build and ship an application user guideApplication documentationdocumentation/document-command-center-application
Compose a responsive pageApplication layoutlayout/compose-command-center-page
Present startup or reconnect progressApplication feedbackfeedback/build-application-loading-flow
Compose actions and labelled fieldsApplication controlscontrols/compose-command-center-controls
Adapt an external backendResourcesresource/adapt-resource-backend
Build a resource listResourcesviews/build-resource-list
Build a resource detailResourcesviews/build-resource-detail
Build a resource pickerResourcesviews/build-resource-picker
Add resource actionsResourcesviews/add-resource-actions
Implement the contract catalogBackend contractscontracts/implement-command-center-contract
Implement resource collectionsBackend contractscontracts/implement-resource-collection-contract
Implement bulk actionsBackend contractscontracts/implement-bulk-actions-contract
Theme an applicationThemestheme/theme-command-center-app
Integrate a static site locally or as a hosted iframeStatic-site embedsembed/integrate-static-site-iframe

Refresh packaged guidance after an upgrade or when lifecycle scripts were disabled:

npx command-center-sdk skills install --path .

Use skills sync only when the backend-owned MCP catalog must also be refreshed and validated. See Application operations for authentication and ownership rules.

Current release versus design work​

These guides describe exports in the current package unless a section explicitly says otherwise. ADRs explain decisions and may be marked Proposed. Do not treat a proposed identifier, message, or code sample as a released capability. For the version actually installed in an application, inspect its package.json exports, declarations, README, contract manifest, and changelog.