Appwrite: API for Project Creation, in fact for all Console Activities

Created on 5 Jun 2020  路  5Comments  路  Source: appwrite/appwrite

I would like to suggest to have a API for project creation. It allows us to automate the project creation and in fact I advocated all the feature which can be done from Console should be done using APIs as well.

Use Case
To give a use case, lets say, there is an service provider agency, who provides some online service, (hereafter will be referred as Agency). Agency will have its own website where customers can register (Linked with AppWrite). Now customer finalizes the deal (by online payment), the agency, may also create some kind of customized admin panel for the customer.

Once the project creation API gets added, the agency can creates project for the customer who requested the service and can create isolated resources under the project (Collection for Admin Panel, images, tasks specific to project ). All the services will be automated. The customer details can be stored in Agency Project. Customer Project can act as the child projects of agency where customer related services details can be stored.

Solutions by Other Platforms
I want like to share how CloudBoos and Directus implemented this. Cloudboost is BaaS in NodeJS and Directus is CMS (Content Management System).

In CloudBoost, when we Install Server using Docker, it gives master key. All Admin tasks including project creation can be done using master key.

Similarly n Directus, it allows you to create first Platform user and First Project. After Creation, it shares a Super Key (Name may differ but more or less same thing) to create subsequent projects. When we want to create more projects, we need to enter the super key.

We can implement some thing like this. What do you say? There will be many use cases like this. Need your thoughts.

Regards,
Punit

backlog discussion

Most helpful comment

Would also be great for setting up dev environments by CI automatically.

All 5 comments

Would also be great for setting up dev environments by CI automatically.

If I were to add this feature, where do I start? I would like this feature for my application and want to automatically deploy.

@ubergeekNZ We welcome your contributions. Please join our discord server so that you can directly interact the creator and maintainers of the product. Here is the Discord Server Link

Anyone following this issue can check this test code we use for the Appwrite CI. You can imitate the HTTP calls the same way to create an admin -> team -> project for your CI flow.

https://github.com/appwrite/appwrite/blob/ec8be5eed1946be19ff1b8ecd548f076ff865d63/tests/e2e/Scopes/ProjectCustom.php#L17-L56

This is similar to the way the Appwrite console creates new projects.
@ubergeekNZ

About the feature itself. To make this feature possible I guess we would have to create a new types of API keys that are associated to the console user and not the specific project resources like the current API keys operate.

Another idea might be to expose a command on the Appwrite container image to allow you to automate this part. As @punitdiwan mentioned, your'e welcome to join Discord and chat with the team.

@eldadfux I really like the idea of creating new type of API keys. It will be standard scalable implementation considering the upcoming features like buckets for file uploads.

One use case will I can think of is that if I want to create landing page for multi tenant service where AppWrite is used as backend, the client can fill the details and the project will be created in AppWrite side. We already have our console SDK, which is deprecated as of now, can be utilized and extended accordingly.

Your Thoughts @eldadfux ....

About the feature itself. To make this feature possible I guess we would have to create a new types of API keys that are associated to the console user and not the specific project resources like the current API keys operate.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

netfirms picture netfirms  路  4Comments

wentzlau picture wentzlau  路  4Comments

lohanidamodar picture lohanidamodar  路  3Comments

TorstenDittmann picture TorstenDittmann  路  5Comments

eldadfux picture eldadfux  路  3Comments