What is Appwrite and How to use it Efficiently
Tags: appwrite, hacktoberfest, beginners, opensource
Published: 2021-10-02 20:17:28

## What is Appwrite

Going by it's [official web-page](https://appwrite.io/), Appwrite is a self-hosted solution that provides developers with a set of easy-to-use and integrate REST APIs to manage their core backend needs.
Basically, it is a new open-source, end-to-end, back end server for front-end and mobile developers that allows to build apps much faster. Its main goal is to abstract and simplify common development tasks behind REST APIs and tools, helping developers build advanced apps faster.

![appwrite](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f2v0oc5bs1zzreew7s24.png)

## Where can it be used

![how-t-use-it](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r55z3cibva0st3yydinz.png)

As we already saw, Appwrite is a self-hosted backend as a service. It is packaged as a set of Docker micro-services. It makes it easier to build applications without writing any backend code. But this is not just the only way to use it. Basically if we go by [Appwrite's official documentation](https://appwrite.io/docs), Appwrite wasn’t designed to replace the backend team, but to provide a better starting point for your project and a better developer experience.

There a many ways to use Appwrite- Appwrite for Web, Appwrite for Flutter, Appwrite for Android, Appwrite for Server etc. You can find many tutorials, videos, demonstrations, source codes, etc to get started with these applications over [here](https://github.com/appwrite/awesome-appwrite).
So go ahead and make great use of them!

## Getting Started

The very first step to get started with Appwrite is to install it.
Since, Appwrite is packaged as a set of Docker containers, it can be installed and run on any operating system that can run a [Docker CLI](https://www.docker.com/products/docker-desktop). You can either use Appwrite on your local desktop or on a cloud provider. Its your choice :D

*System Requirements*
The tiny requirements to install Appwrite is- a little 1 CPU core and 2GB of RAM, and an operating system that supports Docker.

**Install with Docker**

![install-with-docker](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oyuenx6yletauxbbcog4.png)

The easiest way to start running your Appwrite server is by running Docker installer tool from the terminal.

* Unix

```
docker run -it --rm \
    --volume /var/run/docker.sock:/var/run/docker.sock \
    --volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \
    --entrypoint="install" \
    appwrite/appwrite:0.10.4
```

* Windows

Make sure to enable Hyper-V and Containers Windows features in order to run Appwrite on Windows with Docker.

We can either use the [CMD](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/cmd) or [PowerShell](https://docs.microsoft.com/en-us/powershell/scripting/overview) on Windows for the purpose of running commands, in order to proceed with the installation process.

1. Windows CMD

```
docker run -it --rm ^
    --volume //var/run/docker.sock:/var/run/docker.sock ^
    --volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^
    --entrypoint="install" ^
    appwrite/appwrite:0.10.4
```

2. Windows PowerShell

```
docker run -it --rm ,
    --volume /var/run/docker.sock:/var/run/docker.sock ,
    --volume ${pwd}/appwrite:/usr/src/code/appwrite:rw ,
    --entrypoint="install" ,
    appwrite/appwrite:0.10.4
```

(Note that I have used the latest version of Appwrite in the  installation commands)
[Know more about installation here](https://appwrite.io/docs/installation)

## How to use it efficiently

![who-can-benefit](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5h7etgu644ni0hcbc8nu.png)

**How to take Advantage of the Appwrite API Without Using Any SDK**

As developers, sometimes, we might not want to use the Appwrite SDK, but to directly use Appwrite’s plain HTTP API to integrate our application.

*Step- 1: Client Authentication* 
If you are integrating from a new client platform, you just need to pass the project ID. This can be done by attaching your request the 'X-Appwrite-Project' header like this:
```curl -XGET -H 'X-Appwrite-Project: [MY-PROJECT-ID]' -H "Content-type: application/json" 'https://appwrite.io/v1/locale'```

*Step-2: Server Authentication*
The server authentication provides more scope permissions than by default. For this step, we need to pass our API key. API keys can be generated from the Appwrite dashboard and, permissions for the applications can also be chosen from here.

We need to pass the API Key with Appwrite’s 'X-Appwrite-Key' header as follows:
```curl -XGET -H 'X-Appwrite-Project: [MY-PROJECT-ID]' -H 'X-Appwrite-Key: [MY-API-KEY]' -H "Content-type: application/json" 'https://appwrite.io/v1/users'```

One can also set an Appwrite header to change the API locale. The Appwrite API has support for 46 different locales, and this number is constantly growing.
You can use the locale service to get different responses from the Appwrite’s Locale API, or even in case if you want any sort of emails sent to your users in a different language from the default English.

*Final Step: Start Sending API Calls*
After authenticating and changing your Appwrite server locale, you can start sending requests to any of the Appwrite API’s.

## Advantages and Features

![perks](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7wr94infv64in4gwyteg.png)

1. **Anonymous Login and JWT** 🔐
You are right! Not every app needs users to create an account right away. Appwrite is one of such apps.
Appwrite provides the features of Anonymous Login, which helps to  save sessions without asking for email addresses. Later those users can be converted to registered accounts easily.
[Know more about it here](https://hackernoon.com/why-appwrite-08-is-a-great-open-source-firebase-alternative-ed2n34ns)

2. **ARM Support**
A dynamic arm support is an assistive technology product which helps people with limited arm and shoulder function, to move their arms and hands freely (again), and therefore make it possible to conduct all kinds of daily activities.
Starting with 0.8, install Appwrite on your favorite 64-bit ARM device, from Amazon Graviton2 down to the Raspberry Pi 4! ARM support also contributes in making Appwrite technology agnostic.

3. **Slimmer and Faster**
The recent versions of Appwrite have includes SMTP server rather than the ClamAV server for development. These changes, have helped reduce the minimum requirements to just 1GB of RAM.

![but-wait-there-s-more](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/71xc9spdibmiw6nb9g99.jpg)

Apart from these, there are many more advantages of using Appwrite. Some of them are:

* Fast and Secure
* Manage Access control
* File Previews
* Image Manipulations
* Authenticate, Confirm and Manage your Users
* Multiple Signin Methods
* Auto-Generated SSL
* Built-in Files and Secrets Encryption
* Built-in Anti-Virus scanner
* Webhooks
* Background Tasks
* Open-Source
* Self-Hosted
* Privacy
* Cross-Platform
* Flutter Support
* Audit Logging
* Input Validation
* Abuse Protection
* HTTP\2 Support

## Next Steps

You can join the [Appwrite Community on Discord](https://appwrite.io/discord). It can help newcomers clear more doubts, provide them with constant support, or just simply chat about Appwrite.
You can also check the [Github Repositories here](https://github.com/appwrite). These can help you find lots of resources about Appwrite, including text, video tutorials and many demo applications.
Don't forget to check the [Official Documentation for Appwrite here](https://appwrite.io/docs).

*Happy Appwriting* :heart:

![party](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e1pity0hbp9hvu93iohp.png)