Skip to content

feat(templates): add shareable flow templates with install and auto-update - #971

Open
realcodesiman wants to merge 1 commit into
mainfrom
feat/flow-templates
Open

feat(templates): add shareable flow templates with install and auto-update#971
realcodesiman wants to merge 1 commit into
mainfrom
feat/flow-templates

Conversation

@realcodesiman

Copy link
Copy Markdown
Contributor

Summary

  • Lets a workspace publish a flow (with its folder manifest) as a shareable template, protected by a share token, accessible at /t/[shareToken]
  • Lets other workspaces install a published template into their own space, remapping references (flows, folders, keywords) so the installed copy is self-contained
  • Adds optional auto-update: installations can stay in sync with the source template, tracked via TemplateInstallation/TemplateInstalledResource, with a worker handler (install-template.ts) doing the install/update work off the request path
  • New templates management surfaces in the builder: space/[workspaceId]/templates (create/manage templates) and templates/installs (manage/reinstall/toggle auto-update per installation)

Changes

  • Database: new template, templateInstallation, templateInstalledResource schema/partials/relations + two migrations (20260817114301_add_template, 20260818081114_add_template_install_folder_and_autoupdate)
  • Business: packages/business/src/template/ (template + install services), extracted integration-webchat/service.ts
  • Flow config import/export: new reference-fields.ts, remap.ts, template-schema.ts to remap flow/folder/keyword references between source and installed copies
  • Worker: new install-template job handler wired into worker-config queues and apps/worker/src/default/worker.ts
  • Builder: new features/templates/ feature module, app/space/[workspaceId]/templates/ pages, public app/t/[shareToken]/ share page, proxy.ts/routers/index.ts updates for the public route, i18n strings across all locales
  • Tests: packages/business/__tests__/template-*.test.ts, packages/flow-config/__tests__/remap.test.ts, template-export-schema.test.ts

Test plan

  • pnpm lint
  • pnpm --filter builder check-types
  • pnpm --filter worker check-types
  • pnpm --filter @chatbotx.io/business check-types
  • pnpm --filter @chatbotx.io/flow-config check-types
  • pnpm --filter @chatbotx.io/database db:migrate (manual, after review)
  • Manual: create a template from a flow, install it into another workspace, verify auto-update toggle and reinstall flow

…pdate

Lets a workspace publish a flow as a reusable template (with a share
token and folder manifest) and lets other workspaces install it,
optionally keeping installations in sync via auto-update.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant