Skip to content
Back

Need ideas for automating appwrite collections, indexes, storage bucket

  • 0
  • Web
yatharth
2 Oct, 2023, 05:55

I have created a project during last hackathon of appwrite. It was Formvibe which helps user create forms with ease.

I have made it open source. Problem is in the initial setup of the project. I have some collections in database and one bucket in storage which i want to automate somehow, so that if any user try to setup my project from github, appwrite part will be automated somehow and he doesn't need to create those collections and bucket

TL;DR
Developers are seeking ideas to automate the creation of appwrite collections, indexes, and storage buckets for their testing environments. They are facing challenges with setting up admin users, organizations, projects, and API keys for testing due to the lack of code interaction with the newly created system. Suggestions and solutions from other developers are requested.
yatharth
2 Oct, 2023, 05:56

Any ideas on this ?

darShan
2 Oct, 2023, 06:07

I don't think there'll be a complete automation. The minimum setup required would be to at-least generate an

  1. Endpoint,
  2. The Project Id,
  3. The API Key with correct permissions.

With these, you can create a form, take these inputs & create the initial collections, databases. This would only make sense if there are quite many dbs or collections. Else creating a DB & a Collection isn't that much.

Ajit Singh
2 Oct, 2023, 06:15

I am not sure but there is the console sdk

Ajit Singh
2 Oct, 2023, 06:15

that may help you but I dont know how powerful it is

darShan
2 Oct, 2023, 06:19

Console SDK isn't for public use, afaik.

yatharth
2 Oct, 2023, 06:29

I guess you are right. I will have to create a script that will use node-appwrite sdk maybe and that will take api key to do all these automation like creating database, collections, indexes and storage bucket and all those resources which i require initially

D5
2 Oct, 2023, 06:43

What do you mean by automating collections, indexes and buckets? You mean creating new one automatically? For what do you need this?

D5
2 Oct, 2023, 06:44

You can with node SDK as you said

yatharth
2 Oct, 2023, 06:45

I have this project which is using Appwrite in backend . Now if anyone wants to setup my project locally he would have to create collections attributes and indexes manually in console

yatharth
2 Oct, 2023, 06:45

That part I want to automate

yatharth
2 Oct, 2023, 06:46

It will be one time only

yatharth
2 Oct, 2023, 06:46

Initially required before running the project

D5
2 Oct, 2023, 06:47

You can create what you mentioned with any of the existing server side SDK

yatharth
2 Oct, 2023, 06:48

Sure got it.

anyuru
19 Dec, 2024, 15:52

I'm encountering the same challenge. Especially when I attempt to setup a test environment I find the need to create an admin user, organisation, project and an api key to use with the server sdk. This is not possible when creating and tearing down the testing environment. Because I do not have the capability of interacting with the newly created system through code. I've managed to local instance for the test environment however, I cannot proceed from here. I cannot find ways to create and organisation and initialise the project for automated setup and cleanup of the test environment. @D5 and @Appwrite team could shed some light on this?

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more