I have a user case where I need to create a new collection for every businesses that register with my app, is there any way that I can do that programatically without having to copy paste collection id ?
Sure! Using a server side sdk, you have the ability to create databases, collections, attributes, etc.
https://appwrite.io/docs/references/cloud/server-nodejs/databases#createCollection
You could do something like creating a function that is triggered off the event of a new business document being added into your main business collection.
In this function you would create the new collection for that business and add the initial set of attributes that you want.
You can then have a collection that shows when it's ready so the customer can start operation. And in your UI you have some sort of "Standby, were getting everything ready for you" page.
I am using flutter, is there server side package for flutter?
I saw you were using flutter, that's why I mentioned creating a background function that does this.
There is a server side package for dart, but I don't know how much help that would be.
sure, brain is being foggy, sorry about that.
No biggie :) For these types of operations you wouldn't want to expose it to the client
I got the idea now, thanks:appwriteheart:
Recommended threads
- Frequent 500 Internal Server Errors - Pr...
PROJECT ID: 6951f2xxxxx1ee9e750a REGION: Singapore (sgp.cloud.appwrite.io) PLAN: Pro Our production application experiences **500 Internal Server Errors** mult...
- Issue with Custom SMTP
Hey everyone, I'm facing an issue when updating my Custom SMTP settings on Appwrite Cloud. The UI fails silently (no visual errors), but when checking the cons...
- Flutter OAuth2 webAuth Bug?
I created with flutter an app where I can login in with my Microsoft Account. When I compile it to Web (WASM) or Android (aab) then there is no problem what so ...