AgentDock

Add Mastra Tanstackstart Integration

Archived on 2026-09-28 · roadmap: mastra-tanstackstart-integration

Archived: 2026-09-28 · roadmap-id: mastra-tanstackstart-integration

Why

The two TanStack Start templates currently stop at application and data-layer scaffolding; teams that want an agent or deterministic workflow runtime must manually discover and wire Mastra without breaking the templates' SSR, Astryx, Drizzle, workspace, or release contracts. The integration must be opt-in so the existing default output remains byte-for-byte compatible.

Capabilities

New Capabilities

  • cli-integration-selection: Defines the generic init integration contract, registry catalog, overlay application, default-off behavior, validation, lockfile handling, and rollback semantics.
  • mastra-tanstackstart-integration: Defines the shared Mastra runtime generated into either TanStack Start template, including server routing, Vite compatibility, optional auth extension point, no-key startup, and template-specific safety boundaries.

Modified Capabilities

  • cli-init-command: Adds integration selection to the human, agent, and JSON init paths while preserving the default flow.
  • cli-template-registry: Adds the integration catalog and generation/validation rules for shared overlay assets and variant lockfiles.
  • cli-mcp-server: Makes scaffold_project accept the same scaffold inputs as the CLI and exposes integration metadata and validation errors.

Non-goals

  • Making Mastra a default dependency or changing the default generated project behavior.
  • Adding Memory, LibSQL, DuckDB, observability storage, Studio, mastra dev, or file-based discovery.
  • Implementing a specific identity provider or a production-ready application auth system; this change only generates a documented, optional extension point.
  • Replacing Astryx, changing either template's UI system, or adding child-facing Mastra UI.
  • Changing Drizzle SQLite/Supabase schemas, migrations, repositories, or provider selection.
  • Guaranteeing serverless persistence or cross-instance A2A state; the generated runtime remains oriented to the templates' long-lived Node server.

On this page