# \[Doc feature request\]A more complex contrib node example

**URL:** <https://discourse.nodered.org/t/doc-feature-request-a-more-complex-contrib-node-example/29415>\
**Category:** Developing Nodes\
**Created:** [2 July 2020 22:28 UTC](https://discourse.nodered.org/t/doc-feature-request-a-more-complex-contrib-node-example/29415 "2020-07-02T22:28:18Z")\
**Posts on this page:** 6\
**Page:** 2

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [7 July 2020 00:19 UTC](https://discourse.nodered.org/t/doc-feature-request-a-more-complex-contrib-node-example/29415/21 "2020-07-07T00:19:26Z")

</div>

> [@neile](#):
>
> not the UI in the browser which is what I was never able to get working.

Do you mean the Editor UI?

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [7 July 2020 00:28 UTC](https://discourse.nodered.org/t/doc-feature-request-a-more-complex-contrib-node-example/29415/22 "2020-07-07T00:28:16Z")

</div>

> [@neile](#):
>
> Anyway, I think that's the point I'm trying to make. I did get everything working eventually but only by a ton of trial and error looking at random samples on StackOverflow, in other repos, and in this forum.

Other Nodes are generally the accepted way of finding more. I certainly have a notebook of API calls that I occasionally add to when I find something. API documentation is gradually filling out but then so is the API 🙃

> [@neile](#):
>
> how to set up the project structure

Most Nodes are so simple that they don't really need a complex structure.

I've tried to embody some simple standards and you will find them in my jktest node and uibuilder.

Especially the next release of uibuilder where I'm tidying up the folder structure so that the `nodes` folder contains all of the node code (js and html), front-end code other than the main html file is elsewhere such as the `templates` folder and `front-end` for the front-end library code, documentation in the `docs` folder. Then there are the `examples`, `bin` and `tests` folders. uibuilder is certainly now a fairly complex node.

Most structure though could be taken from any good Node.js module.

---

<div class="post-metadata">

**Author:** ![neile](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/neile/32/25016_2.png) [@neile](https://discourse.nodered.org/u/neile)\
**Post date:** [7 July 2020 00:40 UTC](https://discourse.nodered.org/t/doc-feature-request-a-more-complex-contrib-node-example/29415/23 "2020-07-07T00:40:22Z")

</div>

Yes, that's what I mean.

---

<div class="post-metadata">

**Author:** ![neile](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/neile/32/25016_2.png) [@neile](https://discourse.nodered.org/u/neile)\
**Post date:** [7 July 2020 00:47 UTC](https://discourse.nodered.org/t/doc-feature-request-a-more-complex-contrib-node-example/29415/24 "2020-07-07T00:47:05Z")

</div>

> [@TotallyInformation](#):
>
> Other Nodes are generally the accepted way of finding more.

That may be the way it is (and is the way a lot of software gets written) but it's not a good way to welcome new developers to a platform. How am I supposed to know that the random node code I'm looking at is doing something in an accepted best practice way? How am I even supposed to know what I'm looking for if I don't know something is possible in the first place (e.g. registering new routes on the internal Express server).

Well-written, complete, documentation with official examples that cover common scenarios help new developers get past the initial hurdles and focus their efforts on accomplishing their task.

With a project like NodeRed I expect most developers who write their first node are like me: they wanted to do something with NodeRed that wasn't supported by existing nodes. Their goal is to get their node done to accomplish their task. Documentation that doesn't provide complete API information, showcase best practices, etc. makes it that much harder for people to want to participate in this ecosystem.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [7 July 2020 08:41 UTC](https://discourse.nodered.org/t/doc-feature-request-a-more-complex-contrib-node-example/29415/25 "2020-07-07T08:41:17Z")

</div>

> [@neile](#):
>
> How am I supposed to know that the random node code I'm looking at is doing something in an accepted best practice way?

I'm certainly not disagreeing. I think we all agree that there are places where the documentation needs improving. It needs more contributors. Particularly newcomers with fresh eyes. There is a #docs channel over on Slack where such things are discussed.

> [@neile](#):
>
> How am I even supposed to know what I'm looking for if I don't know something is possible in the first place (e.g. registering new routes on the internal Express server).

Having acknowledged that some docs could be improved, I'd also add that for most people, they get used to Node-RED first and so are probably already familiar with which nodes are commonly used and are familiar with some of the chatter in the forum. So it is likely that most would have a reasonable guess as to what nodes might be worth looking at. Starting with core nodes of course. The serial nodes for example are often listed in the forum as a place to start looking at API's in the node that deliver information to the Editor (looking up available serial ports in this case).

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [5 September 2020 08:41 UTC](https://discourse.nodered.org/t/doc-feature-request-a-more-complex-contrib-node-example/29415/26 "2020-09-05T08:41:23Z")

</div>

Closed on 5 September 2020 08:41 UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.

[Previous page](https://discourse.nodered.org/t/doc-feature-request-a-more-complex-contrib-node-example/29415.md?page=1)
