Inspiration

Monday offers a 'Low-code/No-code' environment to its developers/users. This model generally fits people;s needs very well, but sometimes non-technical users may have a desire to execute simple scripts against their data, in order to extract ad-hoc reports for example. Similarly, developers can benefit from the ability to quickly use a simple scripting environment, in order to prototype ideas, for example, without the need to use more heavyweight tools.

Command-line environments, the antithesis of a 'No-Code' GUI environment, are one option for running scripts, but recently a middle ground has emerged - the 'Computational Notebook'. Jupyter Notebooks is perhaps the most well known example of this phenomenon.

Computational Notebooks are most used by the scientific community, a notebook is a web page broken up into separate cells, some containing blocks of code in various languages, python being the most commonly used (the name 'Jupyter' derives from the three languages Julia, Python, and R.). Other cells contain descriptive markdown text or the graphical results of the computations, and the end result is a dynamic document that contains a narrative story of the course a calculation takes. And, being a web document, it can be easily shared and collaborated on. Being web-based also means there is access to a wealth of data sources as input for your notebook.

Starboard Notebook is a relatively new entrant into this arena, sharing some code in common with the Mozilla project Iodide (which Mozilla is no longer maintaining). Starboard's unique feature is that notebook code executes entirely within the browser (as does Iodide's), and does not rely on a server for its operation at all (unlike Iodide currently).

Javascript and Python can both be run and, moreover, they can interoperate, working on the same data. HTML, CSS, Markdown, and Latex are also available.

What it does

Monday Notebooks embeds a Starboard Notebook into monday.com as a widget or board view. All the features of Starboard are available, with the addition of the monday api, available to both javascript and python.

The use cases this opens up are -

Teams on monday.com can collaborate on notebooks, just as they might do on a public service such as starboard.gg or JupyterHub, and they can do so privately.

Users can code their own simple 'apps', accessing the monday api, and again may share and collaborate.

Developers can code more complex examples, simply.

That being said, this submission is an early, work-in-progress version, and does not yet support collaboration, nor any form of saving/loading notebooks to Monday.com. Saving and loading can be achieved to the local PC, but only by utilising some 'clever' tricks in the notebooks themselves. See the description and example of this in a notebook on starboard.gg, authored by the project's creator. (From there, you can also navigate to a number of other example notebooks, demonstrating the flexibility of the system.)

Monday Notebooks may be of some use in its current form, but the addition of proper notebook storage and collaboration features will be required to achieve its full potential. Hopefully this will be added soon.

N.B. It is being submitted in the Software category, but may belong in Wildcard. It's software in the sense that its use involves the writing of code, but the category is perhaps intended exclusively for applications that manage the workflow in software organisations.

How I built it

Taking the Starboard Notebook javascript/HTML/CSS code, designed to be able to be served statically, I incorporated this into the React-based Monday.com application framework. I added an additional call to instantiate the api in a way which could be accessed by the notebooks.

Challenges I ran into

Being new to virtually all the technologies involved in this project, as well as to Monday.com itself, the challenges mainly arose from the time-consuming nature of tasks which are, in principle, relatively simple, such as dealing with unfamiliar build tools, etc.

Integrating vanilla javascript into the React framework and also the monday build/release system also proved problematic, specifically making the monday sdk accessible. There proved to be a conflict between the need to access the api and the need to integrate the two user interfaces.

Accomplishments that I'm proud of

Coming up with the initial idea for this may actually be the most noteworthy thing. I don't often have good ideas!

What I learned

There is a much more vibrant open-source development scene in this area than I had realised. There are a number of interrelated projects upon which to draw.

I also learned I need to improve my time management skills!. There's probably a Monday.com board that could help with that!

What's next for Monday Notebooks

Eventually, I'd like to put it on the Marketplace. One reason for not doing so just yet is the need to add the missing features. Another is that I want to confirm with Monday.com that there are no security concerns. Issues such as any potential for cross-site scripting, or simply putting the power of the api in the hands of non-technical users may require some mitigation first.

(It should be noted that notebooks on Starboard Notebook are run in a sandboxed iframe, but this is not currently the case in Monday Notebooks, except perhaps at the level of the app framework itself. It may be possible to remedy this going forward.)

Thereafter, the next steps should be as follows -

There will be scope for improving the structure of the code and the build environment, allowing for smoother maintenance and enhancements.

Starboard Notebook is frequently updated, but these updates will not be automatically incorporated. A mechanism and a policy for moving to newer versions will need to be formulated.

Improvements to the code completion, and support for additional languages are possible future enhancements. In particular, code completion may be able to take into account the GraphQL schema and the users' board data in certain scenarios.

Finally, either as enhancements to this app, or possibly as entirely separate apps, there is the potential to support additional notebook-like or command-line interfaces, such as Iodide.

Built With

Share this project:

Updates

posted an update

I've put together a demo notebook which demonstrates - i) Running React / JSX code in a notebook. ii) Utilizing the D3.js vanilla js library to create a word cloud in a notebook.

Both of these things are intended as rough examples to give a flavour of what is possible. Support for other scripting languages is an interesting avenue to pursue...

The notebook is available here on starboard.gg. It can be run in situ (in which case it will use dummy data in place of data it would otherwise get from Monday.com API calls).

Most of the cells are set to auto run. The two that are not should be run manually to generate the demo output (i.e. "Hello " text generated using React/JSX, and a word cloud of item names, generated using D3.)

To copy the notebook to Monday, the best method currently is to use the 'view source' button and then copy and paste to a file editor. Before you save it to a local file, hit the enter key at the very start of the file, inserting a blank line.

You can then use the Load File button in Monday Notebooks to append this file, as previously described. (If you don't insert the blank line, the load will work, but will incorrectly merge the first cell of the notebook with the last - Split Marker - cell)

Log in or sign up for Devpost to join the conversation.

posted an update

As it's hidden in the comments on the previous update, I will mention here that the app has now been updated to provide the storage features by incorporating a notebook for that purpose on startup.

Ideally, these features ought to be part of the app, rather than embedded within a notebook. Hopefully, this can be achieved in a future release. As mentioned above, technical challenges led to this alternative approach as a way to get things working.

A useful side effect of this approach is, I think, that it helps to demonstrate the potential of this style of notebook, with its dynamic, self-modifying nature.

Log in or sign up for Devpost to join the conversation.

posted an update

I've been working to make make the process of loading and saving notebooks a little simpler. I've created a notebook in the cloud on my starboard account which can be used to load and save from the local PC. https://starboard.gg/nb/nncigWe

It does not use any monday APIs, so you can try it out using the above link, and, once you have saved a local copy, there is then a slight 'bootstrap' problem. In order to load it into your Monday Notebook, you need to open the notebook's text file in an editor and copy and paste the contents of the two cells responsible for the upload task, the ones with the markdown labels -

Click on 'Choose File', below, to select a notebook file from anywhere on your local filesystem

and

Run the javascript cell below to load the selected file, replacing the current notebook (whose content will be lost if it has not been previously saved!)

Even if you do not load the file, the name you selected will be used by default for the next save (unless you manually edit it).

You can then load the entire notebook, add your own work to it, and save it back to disk (best done periodically!).

This is still a far from perfect situation, but hopefully it will prove helpful. Note that the contents of a notebook are volatile; if you move to a different view and return, the contents will be lost. Using a separate tab is a good way around this problem.

In the next couple of days, I hope to implement a similar notebook, but this time using the monday sdk to load and save in a fashion more like my earlier description. It will still at this stage, however, be subject to the volatility problem, always starting with a blank page when you load it.

If permissible, I should also be able to modify the Monday Notebooks app itself to automatically preload a given notebook file and solve the bootstrap problem!

I'll post further updates in the coming days...

Log in or sign up for Devpost to join the conversation.