Skip to main content
@craft-ts
LearnLearn with EffectAI agentsGuideReference
@craft-ts/core@craft-ts/component@craft-ts/dev-tools@craft-ts/effect@craft-ts/style@craft-ts/style-testing@craft-ts/i18n@craft-ts/i18n-effect@craft-ts/mcp
ExamplesMigrationEffect compatibility & maturityAdopting CraftTS progressivelyPress kitRoadmapBacklog
Beta
  • Learn
  • Learn with Effect
  • AI agents
  • Guide
  • Reference
  • Packages
  • Resources
  • Guide overview
  • Create a project
i.Core concepts
  • The mental model
  • Which primitive should I use?
  • Anatomy of a primitive
  • Generators and yield*
  • Insertions
  • Typed insertion pipes
  • Exceptions as values
ii.Managing state
  • Local state
  • State machines
  • query
  • Mutations
  • queryParams
  • asyncProcess
  • Selecting
  • Reacting to mutations
  • Collections
  • Collection utilities
  • Persistence
  • GlobalPersisterHandler
  • Pagination placeholders
  • Schema validation
iii.Recommended approaches
  • Inject at the point of use
iv.Structuring the app
  • craftService
  • Service scopes
  • Shaping the public API
  • Abstract services
  • App start
  • Lazy services
  • Server functions
  • craftRegisterFor
  • Target wrapper
v.Routing & type-safe DI
  • Setup
  • CLI automation
  • ESLint rules
  • Route providers
  • Route guards
  • Route exception handling
  • Non-blocking navigation
  • Global error component
  • Route load errors
  • Scaling routes
vi.Components & templates
  • Components
  • Activating the style system
  • Typed styles
  • Defining a design system
  • Tokens and variables
  • Global foundation and fonts
  • Pseudo-elements and animations
  • Axes and the matrix
  • Context obligations
  • Testing visual states
  • Text contrast
  • Visual attestation
  • Template obligations
  • Typed CSS variables
  • Fine-grained reactivity
  • Progressive rendering
  • Directives and .pipe(...)
  • settledValue & pendingNode
  • Accessibility
  • Customization
  • Content projection
  • Styling a component
  • Template migrator
vii.Forms
  • Overview
  • Validators
  • Submitting
  • Nested forms
  • Exception handling
  • Complete examples
viii.Testing
  • Testing services
  • Testing components
  • Type-level tests
  • Browser boundaries
  • Page stability
  • Architecture rules
    • Overview
    • Declarative baseline
    • Unique identities
    • HTTP endpoint ownership
    • Computed purity
    • Dependency cycles
    • Mutation reactions
    • Route DI proofs
    • Route component files
    • Path boundaries
    • Exclusive links
    • Persisted identities
    • insertSelect keys
    • craftEffect and network
    • craftEffect and imperative sync
    • Interactive element names
    • Metric thresholds
    • Server-state loaders
    • Primitive loader requirements
  • Extensible architecture graph
  • Graph insights
  • Craft graph vs Nx
ix.Reactivity utilities
  • craftComputed
  • craftEffect
  • craftMethod
  • source$
  • on$
  • fromEventToSource$
  • sourceFromEvent
  • afterRecomputation
x.Internationalisation
  • Type-safe i18n
  • The catalogue
  • Tokens
  • The runtime
  • With Effect
xi.Deployment (experimental)
  • Overview
  • Manifest reference
  • Diagnostics
  • Providers
  • Alchemy provider
xii.Going further
  • SSR and hydration
  • Effect integration
  • Program operators
  • Pattern matching
  • Observability
  • AI agents
  • Temporal runtime
  1. Deployment (experimental)
  2. Providers

Deployment providers#

Experimental

The provider contract is not settled: the method signatures below, the capability list and the plan shape can still change between minor versions. A provider written today may need a small update to keep up.

A provider is the integration that builds, publishes or provisions a platform. It is never a runtime of CraftTS, and never a dependency of the application bundle: the CLI owns the manifest and delegates every mutation to a provider package installed separately.

A provider implements this contract:

ts
export type CraftDeploymentProvider = {
  readonly name: string;
  readonly capabilities: readonly CraftDeploymentCapability[];
  check?(
    request: CraftDeploymentRequest,
  ): Promise<readonly CraftDeploymentDiagnostic[]>;
  preview(request: CraftDeploymentRequest): Promise<CraftDeploymentPlan>;
  deploy(request: CraftDeploymentRequest): Promise<CraftDeploymentResult>;
};

export type CraftDeploymentRequest = {
  readonly manifest: CraftDeploymentManifest;
  readonly rootDir: string;
  readonly stage: string;
};

export type CraftDeploymentCapability =
  | 'static-spa'
  | 'static-ssg'
  | 'node-ssr'
  | 'worker'
  | 'lambda'
  | 'infrastructure'
  | 'local-preview';

check reports instead of throwing, so its diagnostics join the ones of craft-ts check. preview returns the plan rather than printing it, because the plan is the approval surface: craft-ts deploy shows it and refuses to apply anything until --yes approves it.

A provider package exports one factory, and the CLI resolves it at run time from the project being deployed:

ts
export function createCraftDeploymentProvider(
  options?: Record<string, unknown>,
): CraftDeploymentProvider;

Adding a provider therefore never means changing the CLI.

Two families share that contract without sharing an implementation. A publication provider uploads an artefact. An infrastructure provider also creates the resources, the bindings, the permissions and the state. Both read the same manifest.

Capability matrix#

Providerstatic-spastatic-ssgnode-ssrworkerlambdainfrastructurelocal-previewPlatforms
alchemyyesyesyesyesyesyesyescloudflare, aws
dockernonoyesnononoyesdocker, node
cloudflare-pagesyesyesnononononocloudflare
vercelyesyesyesnononoyesvercel
netlifyyesyesyesnoyesnononetlify
firebaseyesyesyesnoyesnonofirebase
github-pagesyesyesnononononogithub-pages

craft-ts check --provider <name> refuses a manifest whose runtime — and, for the static runtime, whose mode — is not covered by the provider, and refuses a provider that does not target the declared platform.

Print the same matrix from the CLI:

bash
npx craft-ts providers --json

Runtime and platform compatibility#

A pair absent from this table is not a missing integration: nothing on that platform executes that shape.

RuntimePlatforms
staticnode, docker, cloudflare, aws, vercel, netlify, firebase, github-pages
nodenode, docker, aws, vercel, netlify, firebase
workercloudflare
lambdaaws, netlify, firebase

Provider details#

alchemy#

  • Artefact — Public directory plus the runtime entry declared by the manifest.

  • Local preview — craft-ts deploy preview --provider alchemy

  • Credentials — Cloudflare or AWS credentials read from the environment by the Alchemy CLI.

  • Limit — Requires the Alchemy CLI and a reachable state backend.

  • Limit — Shipped as the separate package @craft-ts/deploy-alchemy.

docker#

  • Artefact — Image built from the SSR entry and the client output.

  • Local preview — docker compose -f docker-compose.production.yml up

  • Credentials — Registry credentials handled by the Docker CLI.

  • Limit — No static-only publication path: a plain bucket is cheaper.

  • Limit — Provisioning of the host is out of scope.

cloudflare-pages#

  • Artefact — Public directory uploaded as-is.

  • Local preview — wrangler pages dev <publicDir>

  • Credentials — CLOUDFLARE_API_TOKEN read by Wrangler.

  • Limit — SSR and Worker runtimes need a Worker deployment, not Pages.

vercel#

  • Artefact — Public directory plus an optional Node server entry.

  • Local preview — vercel dev

  • Credentials — VERCEL_TOKEN read by the Vercel CLI.

  • Limit — Worker and Lambda runtimes map to platform-specific functions and are not covered by this matrix.

  • Limit — Infrastructure provisioning is partial and platform-owned.

netlify#

  • Artefact — Public directory plus a functions directory.

  • Local preview — netlify dev

  • Credentials — NETLIFY_AUTH_TOKEN read by the Netlify CLI.

  • Limit — The Lambda capability is served by Netlify Functions, not by AWS Function URLs.

  • Limit — No infrastructure provisioning.

firebase#

  • Artefact — Hosting public directory plus Cloud Functions.

  • Local preview — firebase emulators:start

  • Credentials — Firebase CLI login or a service account key.

  • Limit — No Worker runtime.

  • Limit — Infrastructure provisioning is partial and project-scoped.

github-pages#

  • Artefact — Public directory published as a Pages artefact.

  • Local preview — none

  • Credentials — The GITHUB_TOKEN of the publishing workflow.

  • Limit — No server runtime at all.

  • Limit — SPA fallback requires a 404.html copy of the fallback document.

Using a provider#

bash
npx craft-ts deploy preview --provider alchemy --stage staging
npx craft-ts deploy --provider alchemy --stage staging --yes

deploy runs the manifest check, the provider check and the preview before it applies anything, and stops with CRAFT_DEPLOY_DEPLOY_NOT_CONFIRMED when the plan has not been approved. Capabilities are verified against the provider that was actually loaded, not against this table, so a project can deploy with a provider CraftTS does not ship.

Status#

The matrix above is documentation, not a list of shipped integrations. One implementation ships today: Alchemy, as the separate package @craft-ts/deploy-alchemy, so Alchemy never appears in the dependencies of the CraftTS runtime. The other entries describe integrations a project can write against the same contract.

←DiagnosticsAlchemy provider→

On this page

  • Capability matrix
  • Runtime and platform compatibility
  • Provider details
  • alchemy
  • docker
  • cloudflare-pages
  • vercel
  • netlify
  • firebase
  • github-pages
  • Using a provider
  • Status

@craft-ts · MIT licensed

GitHubnpm

Search