mui / toolpad

Toolpad: Full stack components and low-code builder for dashboards and internal apps.
https://mui.com/toolpad/
MIT License
1.27k stars 282 forks source link

Connections should be global #1065

Closed prakhargupta1 closed 1 year ago

prakhargupta1 commented 2 years ago

Duplicates

Latest version

Summary 💡

Currently, our connections are inside the app. So for each app user has to create a connection. But I think connection should be app agnostic and once connected to a data source, all apps should have access to that data source. Later on in granular access control, we can limit its access.

If the connection isn't set it should not show inside the app when forming a query.

From the UI perspective, we could do something like:

Screenshot 2022-09-29 at 1 13 12 PM

This will clean up the app building experience, and we'll have the room to condense pages to the top left and queries to the left bar.

Note: This isn't a problem so far, so if we decide to do it, we can plan it later.

WangLarry commented 2 years ago

@prakhargupta1 I notice these connections run on server side. App query through next.js api to get data.

apedroferreira commented 2 years ago

@prakhargupta1 I notice these connections run on server side. App query through next.js api to get data.

Hi @WangLarry - yes, that is in general how our connections and queries work. We believe it should be possible to have them keep working like that but be globally defined on a user account level, instead of being specific to each app.

WangLarry commented 2 years ago

yes. Query defination should be in app level. Query node is in page level. On client side, react-query cache same request's result already. Connect template( have not yet) is over app level or in library. Connect template: google api, facebook api etc. App should config some params (clientId ...) of template when using it.

oliviertassinari commented 1 year ago

The direction toward moving the connections to be global makes sense to me. I think that it feels a bit similar to moving toward the direction of a mono repository: you get global services that you can use from many different locations, you can update everything at once.

I think that this direction could also help in an environment where you have a staff with different technical skills that build these simple applications. A strong backend engineer might do the setup while a product manager might, later on, create a few new pages.

Even in real life, for MUI internal's needs, I have Zendesk configured twice 🙃:

Janpot commented 1 year ago

I opened a discussion which allows to collaborate on this under threads https://github.com/mui/mui-toolpad/discussions/1376

prakhargupta1 commented 1 year ago

I am closing this issue as it is not relevant anymore. Now each Toolpad app has multiple pages and all can share a connection, so in a way in the scope of the project, the connection is global.