
I want to create an ecommerce solution. And I would like to have some flows like when creating order and vice versa.
Well if it doesn't support extensions or plugins, at least it would be great to show some toasts to the admin in the appwrite so they know that they can't do some certaion operations.
I can hear some of you folks saying I should use functions but how can I return an error from it? And even if I can return error, does it show on appwrite dashboard? like when adding or updating a document?

You cannot add/implement middlewares, plugins or extensions on the console itself. If I understand you correctly, you need to show certain UI elements on some kind of events, for this you would have to build your own UI that implements your logic based on the returned values from the SDK responses.
Functions are suggested to execute some logic based on events. They can return values as well, based on which you could react on your implementations.
Also what exactly do you mean by this -
it would be great to show some toasts to the admin in the appwrite so they know that they can't do some certain operations.
An example or direction would be good to understand.

Let me give you a scenario. Let say I want to process an order, To do that I have to check inventory of the product and stock values should be higher than the ordered product quantity. if not, i can't process this order. i have to do this validation in backend.

Assuming this happens on "your" UI dashboard -
- You can either use
Queries
against DB calls for this to save Functions overhead - Use Functions that use these similar queries
Based on the result from the task, take appropriate actions.

But I can't do any affection on appwrite UI right?

Aah no. Console doesn't support extensions, custom UI, plugins, etc. Its uses the SDK for Console backed by rest apis.
So its best to create a separate dashboard for your project, if possible for the best UX.

to be precise i want to block admins to do mistakes on appwrite dashboard

yep i'll certainly do. i think i get it. i have to do this logic on the UI i'll implement

You could separate the admins into Teams, diff teams with diff roles and permissions. Make sure to checkout the Server as well as the Client SDKs. Pretty powerful to manage the underlying DBs.

thanks a lot. well it would be great to decouple business logic to the appwrite but sometimes nothing to do i guess 😄
Recommended threads
- Random Execution Timeouts and getaddrinf...
Hi, I’m running a self-hosted Appwrite (v1.5.10) on a VPS. My setup involves calling an external API many times from Appwrite Functions. Under higher load, I oc...
- Issue Accessing Deployed Node.js API on ...
I deployed a Node.js API on Appwrite Cloud Functions, and the logs show the server running on port 2000. But when I access the domain, it says: "No active deplo...
- Can't create repos/ clone templates, or ...
My GitHub app can see all my repos, and even create new ones, but the branch isn't visible, which prevents appwrite from deploying. Is this a GitHub app permis...
