feat(flows): community flows — publish / browse / import (core)#84
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 clientlib/community/(hub-client, hub-config) +lib/flows/portability.ts+template-schema.ts— on publish, sanitize (dropdoc_id/docs/target_folder_id); on import, rehydrate as unbound "needs binding" nodes. No source-workspace content ever travels.validate.tsdraft mode tolerates imported-but-unbound nodes; publish re-validates strict/app/communitybrowse + detail, Settings → Community, publish from the flow header;COMMUNITY_HUB_URL/_ENABLED/_KEYenv0071/0072/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 absentee/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
main; new files copied, shared changes applied by context onto mnema's carved files; the 2 EE routes +ee/index.tsexcluded.community.tsdependency resolves in core.Checklist