# Project JSON Flow - Separate File per Flow/Tab?

**URL:** <https://discourse.nodered.org/t/project-json-flow-separate-file-per-flow-tab/9409>\
**Category:** General\
**Created:** [25 March 2019 16:20 UTC](https://discourse.nodered.org/t/project-json-flow-separate-file-per-flow-tab/9409 "2019-03-25T16:20:46Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![adenysen](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@adenysen](https://discourse.nodered.org/u/adenysen)\
**Post date:** [25 March 2019 16:20 UTC](https://discourse.nodered.org/t/project-json-flow-separate-file-per-flow-tab/9409/1 "2019-03-25T16:20:46Z")

</div>

Is there a way to configure Node-RED to create **separate** flow.json files - one for each "flow" (aka tab) within the set of flows for a given Node-RED Git enabled project? The reason being is that as an overall flow gets large it is convenient to be able to move a set of nodes to a specific flow/tab within the overall Node-RED project (as is currently supported). However, when this is done Node-RED still saves all of flows configuration to a **single** flow.json file (instead a separate .json file for each flow). From the Git version control perspective, effectively the entire program's "code" lives in a single file - which can get very large. Several benefits would be provided, from a Git perspective, if each distinct flow/tab was saved into its own file (e.g. smaller individual flow files, version history per flow, easier multi-user team development - e.g. each team member responsible for a specific flow file, etc.)

If this can't be done today could this feature be considered? For example, allow the settings.js file to optionally have Node-RED save each flow/tab to a separate file - with perhaps the master flow.json file pointing to each of the individual flow files. Thanks.

PS - I used to develop with Microsoft LightSwitch (now discontinued btw) which was similar to Node-RED in that it was RAD tool with a visual dev interface that would automatically generate program "code" - in their case it was XML. With the first version of LightSwitch the application would write all the "code" to a single file - but eventually based on feedback (specifically regarding the size of the "code" file and to also facilitate multi-user project development) Microsoft enhanced LightSwitch so that each distinct screen would be written to its own file.

---

<div class="post-metadata">

**Author:** ![tilleul](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tilleul/32/78_2.png) [@tilleul](https://discourse.nodered.org/u/tilleul)\
**Post date:** [25 March 2019 17:52 UTC](https://discourse.nodered.org/t/project-json-flow-separate-file-per-flow-tab/9409/2 "2019-03-25T17:52:44Z")

</div>

A very interesting demand. I second that. 👍

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [25 March 2019 18:22 UTC](https://discourse.nodered.org/t/project-json-flow-separate-file-per-flow-tab/9409/3 "2019-03-25T18:22:23Z")

</div>

so Microsoft lightswitch started with a single file - then moved to multiple files - then the project folded.... not sure that is a path we want to follow 🙂

---

<div class="post-metadata">

**Author:** ![tilleul](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tilleul/32/78_2.png) [@tilleul](https://discourse.nodered.org/u/tilleul)\
**Post date:** [25 March 2019 18:45 UTC](https://discourse.nodered.org/t/project-json-flow-separate-file-per-flow-tab/9409/4 "2019-03-25T18:45:35Z")

</div>

@dceejay, it's easy: just do the "multiple files" feature while avoiding the "project folding" feature ... 😜

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [25 March 2019 18:49 UTC](https://discourse.nodered.org/t/project-json-flow-separate-file-per-flow-tab/9409/5 "2019-03-25T18:49:55Z")

</div>

Hi,

Yes this has been discussed lots of times. There is an item on the backlog for looking at how to split up the flow file.

---

<div class="post-metadata">

**Author:** ![nlecaude](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nlecaude/32/25_2.png) [@nlecaude](https://discourse.nodered.org/u/nlecaude)\
**Post date:** [25 March 2019 23:23 UTC](https://discourse.nodered.org/t/project-json-flow-separate-file-per-flow-tab/9409/6 "2019-03-25T23:23:54Z")

</div>

We had an internal plugin in the past that did exactly that. It does help git workflows to some extent. I also wrote a public node that converts flows to YAML, the nice thing is it allows multiline function nodes so diffs are easier. Having both possibilities would be the best, we also work with very large projects (20 tabs, 30-40 subflows) and git work with more than 2 persons is almost impossible, we have to take turns which is less than ideal. The projects feature could help but I'm not convinced it would be efficient for very large projects.

---

<div class="post-metadata">

**Author:** ![tiefpunkt](https://avatars.discourse-cdn.com/v4/letter/t/9fc348/32.png) [@tiefpunkt](https://discourse.nodered.org/u/tiefpunkt)\
**Post date:** [16 March 2020 21:09 UTC](https://discourse.nodered.org/t/project-json-flow-separate-file-per-flow-tab/9409/7 "2020-03-16T21:09:11Z")

</div>

Had a discussion on Twitter about this today ([https://twitter.com/tiefpunkt/status/1238969993146105858](https://twitter.com/tiefpunkt/status/1238969993146105858)). Has anyone gotten any further on this?  
My goal would be to be able to put each Flow/Tab into a different git repo and manage them separately, but I guess the first step would be to split the flow json. I was just looking at the API of the storage backend, and I suppose it should be doable, so I'll give that a try. My JS skills are rather limited though, so if anyone could give me a hand at some point, that would be greatly appreciated 😉

---

<div class="post-metadata">

**Author:** ![tiefpunkt](https://avatars.discourse-cdn.com/v4/letter/t/9fc348/32.png) [@tiefpunkt](https://discourse.nodered.org/u/tiefpunkt)\
**Post date:** [16 March 2020 22:36 UTC](https://discourse.nodered.org/t/project-json-flow-separate-file-per-flow-tab/9409/8 "2020-03-16T22:36:29Z")

</div>

I put something together, just a very quick thing: [https://github.com/tiefpunkt/node-red-splitstorage](https://github.com/tiefpunkt/node-red-splitstorage)

The idea was to take the content of each tab and put it into a separate file, and then have a "main" file with the tabs and all the config nodes that aren't tied to a tab. If the normal flows file is called "flows.json", then the tab specific files will be called "flows\_\<tab.id\>.json".

Is that something we could start out with?

---

<div class="post-metadata">

**Author:** ![AlonAmiraabluedragon](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/alonamiraabluedragon/32/24155_2.png) [@AlonAmiraabluedragon](https://discourse.nodered.org/u/AlonAmiraabluedragon)\
**Post date:** [20 June 2020 13:01 UTC](https://discourse.nodered.org/t/project-json-flow-separate-file-per-flow-tab/9409/9 "2020-06-20T13:01:35Z")

</div>

Hello @adenysen , I also had the same thing in mind because it's easier to maintain if you work on a big project, especially if you need to merge changes of nodes, which is much harder to do with a gigantic master flow JSON file.  
Came up with the following module: [node-red-contrib-flow-manager](https://flows.nodered.org/node/node-red-contrib-flow-manager)  
See if it works for you.

---

<div class="post-metadata">

**Author:** ![mannharleen](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mannharleen/32/25594_2.png) [@mannharleen](https://discourse.nodered.org/u/mannharleen)\
**Post date:** [11 June 2021 05:27 UTC](https://discourse.nodered.org/t/project-json-flow-separate-file-per-flow-tab/9409/10 "2021-06-11T05:27:36Z")

</div>

Is the item for multiple flow files per tab still on the backlog?  
Can we leverage on the work done by @AlonAmiraabluedragon ?

---

<div class="post-metadata">

**Author:** ![gauravdasgupta](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gauravdasgupta/32/23372_2.png) [@gauravdasgupta](https://discourse.nodered.org/u/gauravdasgupta)\
**Post date:** [21 September 2021 18:30 UTC](https://discourse.nodered.org/t/project-json-flow-separate-file-per-flow-tab/9409/11 "2021-09-21T18:30:32Z")

</div>

Hello @knolleary @dceejay , I am just curious to know that do we expect this feature to be released in near future. I am loving the 2.0 major release. Kudos to the complete team involved in making it happen. I love the debugger and eslint options now.

I am very much keen to understand

1. If we can achieve maintaining separate flow files for every tab and manage them with git directly from editor
2. Having Multiple Tenant Node-RED system

I know you guys are already dealing with a lot of complex scenarios, so just feel free to let me know even if these items are not yet on the priority.

---

<div class="post-metadata">

**Author:** ![maxi1134](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/maxi1134/32/75985_2.png) [@maxi1134](https://discourse.nodered.org/u/maxi1134)\
**Post date:** [12 February 2023 21:12 UTC](https://discourse.nodered.org/t/project-json-flow-separate-file-per-flow-tab/9409/12 "2023-02-12T21:12:19Z")

</div>

Any update on this?

---

<div class="post-metadata">

**Author:** ![shrickus](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/shrickus/32/517_2.png) [@shrickus](https://discourse.nodered.org/u/shrickus)\
**Post date:** [21 February 2023 03:49 UTC](https://discourse.nodered.org/t/project-json-flow-separate-file-per-flow-tab/9409/13 "2023-02-21T03:49:30Z")

</div>

Have you seen this [similar conversation](https://discourse.nodered.org/t/node-red-cli-tool-for-easier-source-code-management/70508) ?
