Skip to content

feat(flows): community flows — publish / browse / import (core)#84

Merged
nbkdoesntknowcoding merged 1 commit into
mainfrom
feat/community-flows
Jul 9, 2026
Merged

feat(flows): community flows — publish / browse / import (core)#84
nbkdoesntknowcoding merged 1 commit into
mainfrom
feat/community-flows

Conversation

@nbkdoesntknowcoding

Copy link
Copy Markdown
Owner

The core client for Community Flows — a shared central catalog every Mnema instance (cloud + self-hosted) can browse and import flows from. One hub, many instances (the n8n-community-templates model).

This is the public/core port of the feature; the private full version (core + the EE hub) lands in the source-of-truth repo separately.

What ships here (core)

  • routes/community.ts — browse / import / publish client
  • lib/community/ (hub-client, hub-config) + lib/flows/portability.ts + template-schema.ts — on publish, sanitize (drop doc_id/docs/target_folder_id); on import, rehydrate as unbound "needs binding" nodes. No source-workspace content ever travels.
  • validate.ts draft mode tolerates imported-but-unbound nodes; publish re-validates strict
  • web: /app/community browse + detail, Settings → Community, publish from the flow header; COMMUNITY_HUB_URL/_ENABLED/_KEY env
  • schema: the flow community slug + the (self-host-inert) hub tables; migrations 0071/0072
  • auth: bypass the session gate for /api/hub/* (served by the hub overlay when present)

Open-core boundary

The EE hub + moderation routes (community-flows-hub.ts, admin/community.ts, registered from the absent ee/index.ts) are intentionally excluded — a self-hosted instance never runs a hub, it points at one. The hub tables stay in the shared schema as inert empty tables (same convention as meetings/graph).

Verification

  • Assembled onto latest main; new files copied, shared changes applied by context onto mnema's carved files; the 2 EE routes + ee/index.ts excluded.
  • No dangling imports to EE files; every community.ts dependency resolves in core.
  • Authoritative build check: the core-only + Lint/typecheck/tests CI on this PR.

Checklist

  • Signed off for the DCO.
  • Core change — EE hub excluded.

A shared, central catalog every Mnema instance (cloud + self-hosted) can browse
and import flows from — one hub, many instances. This is the CORE client that
ships to every self-hoster; the hub server itself is the hosted/EE piece and
lives in the private ee overlay (not this repo).

- routes/community.ts — browse/import/publish client
- lib/community/ (hub-client, hub-config) + lib/flows/portability.ts +
  template-schema.ts — on publish, sanitize (drop doc_id/docs/target_folder_id);
  on import, rehydrate as unbound 'needs binding' nodes. No source content travels.
- validate.ts draft mode tolerates imported-but-unbound nodes; publish is strict
- web: /app/community browse + detail, Settings -> Community, publish from the
  flow header; COMMUNITY_HUB_URL/_ENABLED/_KEY env
- schema: flow community slug + the (self-host-inert) hub tables; migrations
  0071/0072
- auth: bypass session gate for /api/hub/* (served by the hub overlay when present)

The EE hub/moderation routes (community-flows-hub.ts, admin/community.ts) are
intentionally excluded from this core repo.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: nbkdoesntknowcoding <nischaybk@theboringpeople.in>
@nbkdoesntknowcoding nbkdoesntknowcoding merged commit 88a86d4 into main Jul 9, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant