Ask A Question


You’re not receiving notifications from this thread.

Rails API backend with Electron Frontend

shakycode asked in Rails

I'm working on a SaaS platform that will be heavily API driven with a React or Vue front end. But there's a requirement for a desktop app to give the customer something "tangible" to hold in their hands (marketing is pushing for this).

What are my options if any for making a desktop app that connects to a Rails API backend. I've been looking at Electron and I think it's doable, but was wondering if anyone has done anything like this before and could offer some tips in getting started. In the meantime I'm reading the electron docs and seeing what's possible. At the surface since it's all JS it looks like it's just a matter of heavy javascript front end work making tons of API calls but I could be wrong.

Any guidance for an Electron newb like me is greatly appreciated.

And yes, I know this is not the best idea trying to make a desktop client for a web framework backed app, but gotta pay the bills :)


I think its a very viable proposition. Infact I recommend to go with it. I created one for a client. Same SaaS platform API, React Frontend, ReactNative Mobile App and a Electron Desktop App. If you are familiar with React/Redux then you can implement that in Electron as well. I also went ahead with some offline capabilities by using Postgres as a local DB. Checkout .

I cannot stress on how affordable it is to build one. Its just Javascript end of day and moreover if you have worked with React enough this shouldn't be difficult at all.

Go ahead! Give it a shot!



Thanks Aniket. I just don't have enough exposure to electron to speak intelligibly about it yet. However I saw that Basecamp has an electron client for basecamp3 and they are an all rails/api backend so like you said, it's just a ton of javascript.

Definitely affordable (free) to build one and it's a requirement of this new project I'm working on. If you have any examples or tutorials (I've yet to find anything decent) feel free to share!



Hey so here is what I referred to to build or rather to understand how to build

There also some material on Lynda

Unfortunately there is not much to refer to than these. I could explain, but I am super swamped at work clocking about 14-15 sometimes 16 hours. Startup mode :|



For anyone who might have a similar goal, please checkout nativefier ( You can build a desktop app with just one CLI command.
It is important to note that the final GUI app will only work only if the device has access to the internet.


If you have any Papa Murphy Survey Code on your receipt, you can help Papa Murphy deliver a better eating experience on your next visit.

Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 83,770+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.