What's new in Appwrite 0.7

What's new in Appwrite 0.7

·

8 min read

Appwrite has just announced the release of version 0.7 with tons of new features updates and fixes.

WhatsApp Image 2021-10-16 at 6.30.43 PM.jpeg

we will spin up Appwrite order 7 and look at some of the important features. First in order to quickly install Appwrite 0.7 in the upright dot io tap on the get started button and just simply copy this script if you are on unix if you are on windows command prompt you can copy this script and if you are using windows powershell you can copy this script in order to install i'm on unix linux so i can just copy this and i can open up a terminal in a folder where you want to save your data so let me just go to temporary directory

WhatsApp Image 2021-10-16 at 6.30.43 PM (1).jpeg

I have already installed so i just want to run this to and this works on best cell without changing anything but i am on fish cell so i need to just remove this in fish cell tap enter and we can choose our different port like let's choose a different port for this https port let's say it you can add your default api secret host name let's leave it localhost this can be localhost and now it's running i don't want it to run i will simply close this i already have a running 0.7 here and it's running on my localhost in 4005 port and when you first open you will be taken to the upright console where you can sign in or you can sign up so instead of sign in i will sign up first so let me so let's just provide some information and sign in so this is the project dashboard we can have multiple projects in our Appwrite installation

WhatsApp Image 2021-10-16 at 6.30.43 PM (2).jpeg

let me quickly create a project testing app right 0.7 create okay here is the new dashboard not that different from the previous one but we'll see what changes are there. First we have this new parameter function execution that is Appwrite cloud functions and one of the major feature released in this 0.7 is the cloud functions we'll look at it apart from that we already had database we already had a storage we already had users teams and oauth providers i guess we have more watch providers added one of them i can see it here tread shift was a recent addition and if we go to teams we can create team team one let's create team one and previously we are not able to add members to the team but right now we can do that easily right from the console and i think we did not have delete user facility in the console i think we have that now as well user one create and if we go to user one we can block this account and now we have delete user next if we go back in teams we can add members email user one we can give different role we can assign role .

WhatsApp Image 2021-10-16 at 6.30.43 PM (3).jpeg

let's say user add member so user1 has two roles we can go to user1 already so we can see our stats we have one user in storage we don't have any files documents or anything so let's move on to the functions here we have app right cloud functions which is a way for us to execute external code using app right based on a schedule or a app right server event so let's see how it works so we have add function where we can name the function let's name it test function and the cool thing about this is that we can write our cloud functions in many different languages right now here only node.js php ruby python.net are so on but i can quickly show you so when you run app right install an app right folder is created in your working directory and if you see there are two files dot env and docker compose dot ammo file so i can open this in visual studio code and we can see that if we look at the dot enb we can see the app function env so this will determine which environments are enabled so right now only node deno php python ruby and dotnet are enabled but we have lot more support like we have dart cloud function support as well so let me quickly change to my running server here and let's add here dart 2.10 and let me go to the terminal opt as t so once you change the environment variable you need to run this command in order for it to take the new environment variable once it's done let me refresh this let's see if dart is available see now dart 2.10 is also available as a functions environment in the name we can give any name test function we can choose node.js or python or dart anything we like let's choose start here and tap create let's remove this so we now have a cloud function that will we can write with dart and execute okay and here is option for deploying tag we can deploy tags using Appwrite cli or we can manually deploy the and we can monitor the executions failures cpu times everything we can check the logs of the function so if we print anything in the console in our functions the logs will be shown here and in the settings we can see what the function has access to what's the timeout and what events trigger this function so we can select triggers based on events so we can say that whenever an account is created run this function or we can say whenever account update preferences run this function or instead of that we can also schedule this function to run every hour every day using chrome syntax so any valid chrome syntax will work here and we can add different environment variables that are required for this function to execute in some of my later tutorials that i have planned for i'll show how to write cloud functions for Appwrite or right now if you want to check out how cloud functions are written for app right you can go to the functions demo app right has demos for functions repository where you can see functions demo in different language so if we go inside dart we can find there are quite a few functions hello world storage cleaner welcome email so you can check one of these functions learn how to deploy these and deploy it and see it in action as well so this is about upright claw cloud functions so another major feature released in this version is the app right cli so if we go to the docs and in the left hand side we can see getting started on the getting started section we have Appwrite cli so if we tap here we can see how we can install and run Appwrite cli so installation let's try it for mac windows and linux so for linux let me just copy this installation script okay and we can simply run it in the terminal i already have this installed so i'm not going to run it again once you run this script you can see you can run upright version upright version if i run upright version so cli version is 0.4.0 and the server version is 0.7.0 once the installation process is complete you can run app right in it in order to initialize upright so let me go to bash Appwrite init so we need to pass our endpoint if you check for me it's Appwrite.test test or 5 v1 and we need a project id we can find it from here in our dashboard if we go to settings we find our project id just copy this paste it here and finally we need the api key we can create this from api keys add key let's call it cli and select everything we want cli to be able to do everything and create so the secret let's copy it test it and locale leave it as it is let me move this aside here now our app right in it is successful we can see what is possible so if we run Appwrite help we can see that let me just zoom out a bit so we can see we have avatars database functions health locale storage teams users services so all those things you can do from an Appwrite sdk you can do from Appwrite cli so if you have previously used Appwrite sdk using cli is simple as that so let's check Appwrite uses help so we can run help in every step for everything so that we can see details so Appwrite users have certain endpoints like we can list user create get delete get logs get preps all those things so we can even see help for each individual command so

WhatsApp Image 2021-10-16 at 6.52.04 PM.jpeg Appwrite users list help so list of all the project users you can use the query parameters to filter you results so we can filter using so it's limit offset order type so let's see Appwrite uses list limit one we only have one user but some one and our users is this and we have another like we can get individual user using this id so what we can do app write users get user id equals this id and tap enter so we get user id id is this name user1 registration email we can see all those details so this is how we can use Appwrite cli and we can perform any accent that applied sdk can from app right cli to interact with Appwrite server and we can do everything we want inside our Appwrite project inside our app right console right from our cli and it works in mac windows and linux .