A Meteor Desktop Application?

Has anyone tried to create a desktop Meteor application, in a similar way to how NW.js / node-webkit (http://nwjs.io/) does for font-end frameworks?

If so, what sort of success have you had? I’m about to start working on some of the administration features of my web app and there’s no need to have it online, plus the guys that will be using it are generally happier with it being a desktop app. So this is something I could consider if it was available…?

18 Likes

I’m happy you bring up this topic. I already thought about that and did some research. I found people playing around with demeteorize (from Modulus) which basically isn’t made for this of course but seemed to partly work.

But probably this is something that MDG could think about supporting directly. I think there could be quite some use cases where local applications could be useful at JS definitely is coming to the desktop too these days and having Meteor there could be a real value.

Yeah, I mean better still from my PoV would be an option, just like adding iOS or Android support, you could just run a command like:

meteor add-platform desktop

And it could create the desktop executable for you to distribute, but have it still communicating with the main “master” server.

17 Likes

that’d be awesome :smile:

Would love to chat with folks on this. A lot of tool ideas for the menu bar that would be a great pairing with Meteor.

Two approaches that I can imagine:

  1. Desktop apps written in Javascript (sort-of like the Cordova model for Mobile) (as Siyfion mentions in the original post nw.js)
  2. Native Desktop implementations that use parts of Meteor’s stack, like DDP.

For 1. This guy has a great post that lists solutions like TideSDK, AppJS, (he doesn’t mention Atom Shell, which looks good) and that Windows 8 and 10 have built-in support for Native Runtime apps built with Javascript. http://clintberry.com/2013/html5-apps-desktop-2013/
A quick StackOverflow and Github search shows there’s been interest and probably success in doing things this way for desktop… It’d be great to hear if anyone has had real success with this approach.

For 2. I’ve also heard of the implementation of DDP in Objective-C that people are using with ios apps and which I suppose could be used for a Mac app. There’s also a less-developed implementation of DDP out there for C#. You’d basically develop your desktop app as normal, but have it use the native implementations of DDP for the data.

I would think using nw.js for desktop apps would be a better approach. It’s easier for cross-platform building and has been proven to perform well enough for a majority of desktop applications. But, yes, I love the idea of being able to run meteor add-platform desktop and boom. Desktop application.

3 Likes

A couple days ago i was facing the same problem… Meteor is not ready for nwjs, so i have used Asteroid instead! And is working pretty great so far!!

Here’s an example of using meteor with nw:

2 Likes

Did you use nwjs with Asteroid? How did you build a desktop app with Asteroid?

1 Like

Simply loaded it up with bower and followed the documentation :wink:

These guys built their app in Meteor:

Seems to work well, it could be worth asking them how they did it.

4 Likes

Are you sure they’re using Meteor? On first sight there github repo doesn’t look like.

Though i did ping them on Twitter - maybe they’ll drop in here and let us know some details.

Would using Meteor with Webix be an interesting alternative? Webix is a UI components library made specifically for desktop apps (but also works nicely on mobile); sort of a modern-day ExtJS/Dojo with a Material Design theme. It’s highly concise and expressive - check out the 10-lines of code demo at http://webix.com.

You could package it as a Chrome app for more of a desktop experience.

PS: the Webix demo linked from my repo is a bit broken now, but don’t let that deter you. I’ll fix it over the weekend. Plenty of good Webix demos at http://webix.com/demos/.

1 Like

That wouldn’t necessarily make it a desktop application though. It is a web application that is packaged as a chrome app. I was thinking more along the lines of a desktop native-like experience like nw.js offers by giving users a downloadable executable.

I’m really pleased that there seems to be so much interest in this idea! :smiley: Everyone’s got some really good input on it.

1 Like

I think for macs we should try https://github.com/MacGapProject/MacGap1 which is what Slack is currently using for their Mac app. I never tried it so I don’t know if it would work with meteor apps.

1 Like

My use case for a desktop app is has these requirements:
– 100% distributed to end users on a USB thumb drive.
– run on Mac or PC with no installation required of dependencies like NodeJS.
– All data is also on the thumb drive, it needs to work offline.
– End users are not technical at all. Grandma should be able to use it without calling tech support.

maybe this is too much to ask?

Not at all, nwjs can do all of the above or you could give a try to atom shell. The biggest problem/roadblock is Meteors build system, which is not ready to pack for “platform desktop”. Maybe a PR for platform desktop using nwjs.

1 Like

Sorry for taking a while to get back @msavin & @Helmi.

We did build the first version of Kitematic using Meteor. We paired it with GitHub’s atom-shell to build a desktop app. The basic dev setup was:

  1. Follow the quick start at https://github.com/atom/atom-shell/blob/master/docs/tutorial/quick-start.md
  2. Create a meteor directory in that workspace for your regular meteor app.
  3. Change the main.js file to open an atom-shell window that loads your meteor app by modifying this line: mainWindow.loadUrl('http://localhost:3000');
  4. Run the meteor dev server cd meteor && meteor so it listens on port 3000.
  5. Run the app with ./Atom.app/Contents/MacOS/Atom your-app/ .

Deploying is a bigger challenge. You’ll need to modify main.js quite a bit more and use child_process to start the meteor and mongo servers before calling loadUrl. This is how we did it: https://github.com/kitematic/kitematic/blob/v0.4.5/index.js

Hope this helps!

13 Likes