bcwik9 / robinhood-on-rails

A web dashboard for the free trading platform Robinhood using Ruby on Rails and a private API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What is Rails doing?

j6k4m8 opened this issue · comments

Does this application rely on Rails-specific server-side functionality or API calls? I wonder if there's a way to strip all server-side functionality from this and run it as a simple HTML page.

It is possible to do most of this all in HTML/javascript, since the functionality is relying on API calls to Robinhood. I chose Rails since I'm familiar with the stack, and wasn't sure how much I wanted to expand on the functionality provided by Robinhood.
Rails currently handles the following:

  • Generating the dynamic HTML to send to the client
  • Managing database information such as the user's stock dividers (and potentially future info such as multiple watchlists, since Robinhood only supports one)

If someone were to rewrite this to be HTML/js based, the hardest thing in my opinion would be doing the rewrite of the dynamic HTML, since it's currently in haml

Gotcha! Possibly interesting to leverage webpack or other preloaders to do that heavy lifting for us.

Just was curious, in the interest of running this on cheaper infrastructure. I'll keep you updated if I move in that direction!

Ah yea, webpack seems cool.

I've thought about moving everything to HTML before, so it would run on Github pages or something, but ultimately just haven't done it yet

@j6k4m8 An issue I think you would run into would be that api.robinhood.com doesn't accept cross-origin request, so you would need a server running a proxy to serve the API to the application.

Ah @pavanagrawal123 that's interesting.

We could possibly leverage YQL or write our own AWS lambda endpoints if there were enough interest in this. I may start another project that attempts this; @bcwik9 if I do, are you amenable to me posting a link here?

Closing this for now, feel free to reopen for new developments

I should also mention that there are now database components being used, which ties in to Rails more than when I made my previous comments.