Introducing Appwrite: An Open Source Backend Server for Mobile & Web Developers
Tags: webdev, architecture, javascript
Published: 2019-09-07 19:17:14

Appwrite is a new [open-source](https://github.com/appwrite/appwrite), 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.

```bash
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.

![](https://miro.medium.com/max/4800/1*d9egnOpYwD7Gxuj0rButaw.jpeg)

*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.

![](https://miro.medium.com/max/4800/1*7p-nrHK2ili_kZiQqeVNxw.png)

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
=================

![](https://miro.medium.com/max/4800/1*r68IlauvlAY9PnEoW1HMzw.jpeg)

*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](https://appwrite.io/docs/permissions), 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](https://appwrite.io/docs/permissions) 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.

```js
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
==============

![](https://miro.medium.com/max/4800/1*oyn3wzrOtU-7WrFsomvqug.jpeg)

*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](https://en.wikipedia.org/wiki/Cron) 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
=================

![](https://miro.medium.com/max/4800/1*VNdG7tIMcinmNTFZsXdQlg.png)

*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](https://appwrite.io/docs) to learn more about what the different Appwrite tools have to offer developers. You can also follow me [here on medium](/@eldadfux) 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](https://github.com/appwrite/appwrite).