Introducing An Open Source Backend Server for Mobile & Web Developers

Written by eldadfux | Published 2019/09/08
Tech Story Tags: frontend | react | angular | backend-as-a-service | open-source | javascript | programming | latest-tech-stories

TLDR 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. The 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. The Auth service also offers built-in integration with multiple OAuth providers such as Facebook, Github, LinkedIn and more. The Storage service is the easiest way to let you or your app users upload and manage their files securely and simply.via the TL;DR App

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

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

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.

Written by eldadfux | Entrepreneur, Software Architect, open source enthusiastic and the creator of http://appwrite.io
Published by HackerNoon on 2019/09/08