Hacker News new | ask | show | jobs
Ask HN: How to make a web app which connects to databases of other people?
1 points by garrrikkotua 1239 days ago
Hi there,

I want to build a web app with some sort of dashboarding functionality. Users of the app will connect their databases to the app and will write SQL to make charts, dashboards, etc. Pretty standart stuff.

So I want to build a some really simple prototype of this to test the idea I have. Anyway, it requires having some backend which connects to 3rd party databases. The question is, how do I store connection credentials to other people databases? Like in my own database? (encrypted of course). But still, during every API call to my backend I would have to retrieve these credentials, establish connection to a user's database and then run some SQL against it. Sounds like a very bad workflow.

Another issue in this approach is that I would have to pass raw SQL to my API, which is also not the best idea.

So, what is the best way to develop such a functionality? Maybe I should use some existing open-source tool for this?

Thanks a lot!