Appwrite is a new open-source, end to end backend server for frontend and mobile developers that allows you to build apps a lot faster. Appwrite goal is to abstract and simplify common development tasks behind REST APIs and tools, to help developers build advanced apps way faster.
In this post I will shortly cover some of the main Appwrite services and explain about their main features and how they are designed to help you build your next project way faster than you would when writing all your backend APIs from scratch.
Appwrite server is packaged as a docker container which you can easily set up using a simple docker-compose command from your terminal on either your local machine or cloud provider.
mkdir appwrite-ce && \
cd appwrite-ce && \
curl -o docker-compose.yml https://appwrite.io/docker-compose.yml && \
docker-compose up -d --remove-orphans
Appwrite installation is as simple as running one command from your command line terminal.
Appwrite Authentication
The Appwrite Authentication service let you easily manage user registration and login to your app. The Auth service also offers built-in integration with multiple OAuth providers such as Facebook, Github, LinkedIn and more.
You can easily integrate OAuth providers as a new sign in methods for your app
Beside managing access control to your app and its different resources, the Auth service also abstracts other repeating tasks such as managing user email confirmation and password recovery.
Using the Auth service you can save a lot of the time and concerns that come with building a stable and secure user authentication and authorization system, that also has to integrate with multiple 3rd-party login methods.
Appwrite Account
The Appwrite Account service exposes your client with an API that allows you to interact with your current logged-in user account.
Appwrite Account service lets you manage your user active sessions.
The Account service allows your users to update their account-related information and save their private preferences like their UI language, timezone or favourite theme. You can set your users with any preferences you wish.
You can also use the API to get a list of the user active session, including information about the session location, device, operating system, and user-agent. Using the API security logs endpoint you can let your users review their latest logins, password recoveries, and other security-sensitive events.
Appwrite Database
Appwrite Database dashboard allows you to easily explore your project collections and documents.
The Appwrite Database service lets you integrate with your users and app data directly from your client app, whether it’s a browser or a native app. Each document in the database has the ability to nest other child documents. Using the Appwrite database filters you can apply advanced queries and filter the nested documents collection.
Each document can set both read and write permissions to a specific user, a team of users, API key or user role. Using Appwrite Database, simple yet flexible permissions mechanism, you can manage complex and sophisticated access control logic for your app.
Appwrite Database also gives the flexibility to choose between structured data collection or a flexible collection to manage your data as you go. Using Appwrite, simple yet powerful data collections, you can enforce your data structures and validations rules for each document in your collection.
Appwrite Storage
The Appwrite Storage service is the easiest way to let you or your app users upload and manage their files securely and simply.
The Appwrite Storage API takes advantage of the same simple read and write permissions mechanism that Appwrite database use. This allows you to easily decided whether your files could be accessed by all users, specific users or even teams of users.
var appwrite = new window.Appwrite();
appwrite
.setEndpoint('https://localhost/v1')
.setProject('[PROJECT-ID]')
;
var file = document.getElementById('file-input').files[0];
let read = ['*']; // wildecard read access
let write = ['user:self']; // write access only to me
appwrite.storage.createFile(file, read, write)
.then(function (response) {
console.log('file uploaded successfully');
}, function (error) {
console.log(error);
});
Appwrite Storage API allows you to easily integrate secure file upload in your application.
Appwrite Storage service also offers built-in integration with an auto-updated anti-virus server. All new files that are being uploaded to your system are scanned and validated to keep you and your users safe.
One of the most useful features Appwrite Storage service offers is the ability to preview the content of your files and show them as thumbnails in your app or website. You can also change the size of your thumbnail dynamically, convert them between different image formats (webp is supported!) and change their quality to improve network performance.
Appwrite Teams
The Appwrite Teams service, allows you and your users to create teams and share permission to different API resources like files or documents. This is a great and simple way to implement complex access control requirements for your product.
Each team member can also be grated with different roles to allow you even greater flexibility.
Appwrite Tasks
Appwrite Task service is a great way to set up recurring scheduled jobs.
Instead of handling with complex crontabs or long-running daemons and worrying about things like fault tolerance, monitoring and error logging, all you need to do is to submit a form with your task as an HTTP endpoint and a cron-like syntax to indicate how often should it be executed. It’s that simple.
You can also use the tasks advanced options to add different HTTP headers to your request or protect it with a basic HTTP authentication. Needless to say that all your sensitive HTTP passwords are securely encrypted in the Appwrite internal database.
Appwrite Webhooks
You can easily register a new webhook from your Appwrite console.
Appwrite Webhooks are designed to allow you to integrate custom behavior for your backend easily and conveniently.
Want to receive an SMS when new user register to your app? Want to purge the cache when one of your app documents gets updates? Just add a new webhook that triggers an HTTP endpoint on your end when the specific Appwrite event triggers. Using Appwrite Webhooks you’re only limited by your imagination.
What’s Next?
In this post, I have highlighted some of the more noticeable Appwrite services. In future posts, I will explore some of the features in more depth and explain how to integrate them in your code.
In the meantime, I encourage you to read the Appwrite official docs and API references to learn more about what the different Appwrite tools have to offer developers. You can also follow me here on medium for more Appwrite tutorials.
If you like this project and want to contribute it, you can do so by opening new issues or send new pull requests in the project Github repository.
Top comments (10)
Congrats for the launch!
I like the idea to offer a simple open source cloud backend solution open to many SDKs (not just JS), that's neat.
I just got one question, where are currently the data stored (country wise)? You already have got clusters around the world?
If I got that right you'll have to self host it. Look at the first paragraph describing how to launch a docker setup with the server and all it depends on running.
Thats part of the appeal: complete control over the data. Of course also makes it a bit more work then using AWS or Firebase
I missed that, thank you Ivo for the explanation!
Agree with you, the complete control over the data with the simplicity of what would for example a Firebase offers, is an asset.
I couldn't explain it better! Thanks Ivo!
David, if you have any other questions feel free to contact me or comment here :)
All clear thx and again congrats!
Amazing! Love seeing open-source projects explained and come to life with success 😻
Thank you so much, christian ❤️
I am curious if this is your first launch? For how long have you worked on this? I turns out that is a super cool project and I would love to hear more! Subscribed.
Congrats!!
Hi Bogdan! Thanks for all the great feedback! This is my first open-source launch. I have been working on this project on and off for about 2 years and had a few products using it in production.
Huge inspiration! Looking forward to updates, I will definitely step in issues anytime soon.