Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client-side API requests #1196

Open
oliviertassinari opened this issue Oct 21, 2022 · 8 comments · Fixed by #1325
Open

Client-side API requests #1196

oliviertassinari opened this issue Oct 21, 2022 · 8 comments · Fixed by #1325
Assignees
Labels
new feature New feature or request scope: toolpad-studio Abbreviated to "studio" waiting for 👍 Waiting for upvotes

Comments

@oliviertassinari
Copy link
Member

oliviertassinari commented Oct 21, 2022

Summary 💡

Currently, all the requests are run server-side, however, there are cases where you would prefer them to run client-side. I have found one case: https://docs.github.com/en/rest/search#rate-limit. Instead of providing a key, you can not provide any, and have each client's IP set the rate limit rather than the server's IP.

I don't really need this now, but I thought it could be interesting to track the interest from the community.

Examples 🌈

No response

Motivation 🔦

No response

@oliviertassinari oliviertassinari added new feature New feature or request waiting for 👍 Waiting for upvotes labels Oct 21, 2022
@Janpot
Copy link
Member

Janpot commented Oct 25, 2022

This could be interesting for the demo mode, we won't have the DDOS attack vector

@oliviertassinari
Copy link
Member Author

I have found a new use case for client-side queries: firewalls.

Screenshot 2022-12-30 at 17 55 37

https://stackoverflow.com/questions/52076581/wordpress-ajax-call-response-with-well-known-captcha

@oliviertassinari
Copy link
Member Author

oliviertassinari commented Sep 2, 2023

I'm reopening as I believe this support was removed. I'm facing challenges with GitHub API rate limiting. #2616 would help though.

@oscni
Copy link

oscni commented Sep 6, 2023

👍+1 for this request.

Already exist many no-code/low-code server side tools but what is harder to find is a tool for designing via a webservice that is repo connected in the backend. Deployment should then be with a SSG to a site and when doing so all the API calls would need to come directly from the client.

@YohanSciubukgian
Copy link

Does this feature will allow the MUI Toolpad to generate ReactJS App that are exclusively client-side rendered ?

@Janpot
Copy link
Member

Janpot commented Oct 2, 2023

@YohanSciubukgian This feature would allow for Toolpad apps that can run without a server API. i.e. it could technically be statically hosted. Currently Toolpad doesn't generate code. Looking at your comment, I'm wondering whether that is a feature you're interested in. If so, please upvote the feature request.

@oscni
Copy link

oscni commented Nov 1, 2023

Is it working now to do client side API requests? And do we then no longer need any server and instead can deploy the application to an SSG site? Seems like the issue is "recently completed" in the roadmap.

@YohanSciubukgian
Copy link

YohanSciubukgian commented Nov 1, 2023

@YohanSciubukgian This feature would allow for Toolpad apps that can run without a server API. i.e. it could technically be statically hosted. Currently Toolpad doesn't generate code. Looking at your comment, I'm wondering whether that is a feature you're interested in. If so, please upvote the feature request.

@Janpot This is exactly what I was looking for, being able to have React code generated by the Toolpad with capabilities to have my own client API calls to bind my business rules to the react code generated. Thanks for the suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature or request scope: toolpad-studio Abbreviated to "studio" waiting for 👍 Waiting for upvotes
Projects
Status: Completed
Development

Successfully merging a pull request may close this issue.

5 participants