Packaging Grist as an Electron app

Hello community!
I discovered Grist a few days ago. I fiddled with it(the web app) and I really like it, it’s great and promising! I checked other alternatives, but to me Grist is clearly the winner(for now at least).

I’d like to use it on my home PC. I will be the only user and I won’t need to use it with Internet. So I won’t need things like login system for example.
My question is : if I build the application from source, is it possible to package it as an ElectronJs app? Is it trivial/easy to do it? Does Grist licensing allow me to do that?

1 Like

Hi @sitepi7247, welcome! Grist actually started life as a standalone electron app, and I miss that myself, so I’m happy to hear you looking into this! Grist licensing does allow it (everything in https://github.com/gristlabs/grist-core/ is under the Apache-2.0 license). It won’t be trivial. The basic app is in good shape for packaging but a few issues come to mind:

  • Grist uses python for formulas. A truly standalone ElectronJs app would need to have python embedded within it. If it is just for yourself, you could choose not to worry about it.
  • There are some node packages with binary components (specifically node-sqlite3), so have an OS-dependent component to deal with. Again, if you are just doing this for yourself, you could choose not to worry about it.
  • Grist now assumes it controls document creation and storage, it would need some tweaks to be able to save/load Grist documents anywhere on your file system.

You might find it is ok to just run Grist locally with docker. It won’t need the internet, and it’ll have a trivial login system by default.

1 Like

Wow, good to know! So what made you drop out that option? Is it for the same reasons you mentioned in your post(embedding Python, OS dependency, etc…?)
I will check the docker option, and see if I’m satisfied with it first.
Anyway, thanks for your advice on what to look out for if I go the Electron route. Perhaps I will still try that standalone electron thing…But it looks hard to do based on what you said.

People wanted to be able to try Grist out without installing it first, so we needed the web app. And then it made sense to focus our efforts on making it excellent. I do hope to see Grist packaged in all shapes and forms in the future :grinning:

I couldn’t install docker on my computer because my Operating System is too old (win8) and not supported… :disappointed_relieved:

That’s unfortunate. It looks like “docker toolbox” used to support win8 https://github.com/docker-archive/toolbox but is now archived. Their releases are still available Releases · docker-archive/toolbox · GitHub but I’ve no idea if they would still work.

I saw your last answer when you posted it last week. For the last couple of days, I’ve been trying to make that docker toolbox work on my win8 computer, to no avail, alas… Docker toolbox successfuly instals, but can’t work. There are different error messages that I tried to solve by googling, but I failed. So yeah, here is where I am. Thanks for your help anyway…

I’m sorry @sitepi7247, that sounds very frustrating :frowning:

Hi @sitepi7247, I have packaged Grist as an Electron app and it works in Windows 7 or later. :slightly_smiling_face:
Distributable: Release Grist as standalone electron app · stan-donarise/grist-core-electron · GitHub

8 Likes

Very cool @stan-donarise, I tried it out in a Windows 7 virtual machine I had lying around and it worked well! :clap:

2 Likes

Hello @stan-donarise,

Installed on worked perfectly on local computer ! :grinning: :+1:

This provide me a first way to ensure data are easily retrievable.
Is it possible to install and run it on a local machine and access it through 192.168.X.X ?
(subcontractor not able to deploy docker on windows it is a nice work_around

Also if running the winpython packed, I think it is possible to install additional python library…

1 Like

Hello @Sylvain_Page, you can create .env file with GRIST_HOST=192.168.X.X in the root directory of electron app and it will be used :slightly_smiling_face:

The Electron window will be blank (because I hardcoded localhost in electron loadURL) :slightly_frowning_face:

But now I have replaced it with process.env.GRIST_HOST and updated the release :slightly_smiling_face: Release Grist as standalone electron app · stan-donarise/grist-core-electron · GitHub

2 Likes

Hi @stan-donarise , this work like a charm ! :trophy:
Many thanks !

Hi, thanks for the work on this app !

import from csv does not work in electron. I get en error :
“Import failed: File format is not supported.”
I can import the same .csv file without issue on the web app.