Appwrite is a platform for building and deploying web and mobile applications more quickly and efficiently. Appwrite is an open-source Firebase alternative that provides services like authentication, authorization, storage, and database (No-SQL). Appwrite is designed to be flexible and scalable, you need to host it yourself, unlike Supabase which provides a managed host option.
Appwrite APIs
REST
Appwrite exposes a REST API that developers can use to access various functions and services on the Appwrite server. This API allows developers to perform tasks such as managing users, storing and retrieving data, and sending emails, using standard HTTP methods such as GET, POST, PUT, and DELETE.
The API can be used to develop a wide range of applications, the APIs are easy to use and highly flexible and they are backed by detailed documentation with examples that help developers get started and find answers when stuck.
GraphQL
Appwrite supports GraphQL as an alternative to its REST API for accessing server-side functionality. Facebook developed and later open-sourced GraphQl.
Appwrite recently announced its GraphQL API. Using GraphQL developers can query and update the data on the Appwrite server, GraphQL lets the developers specify the exact data they need and the server will return only that data, unlike REST.
To use GraphQL in your projects, you can write the queries and mutation using the GraphQL syntax, On POST request Appwrite server will execute the query and return the response in JSON format. Developers can use the Appwrite GraphQL API with any GraphQL client or library, or interact with it directly using HTTP requests and the GraphQL syntax.
Realtime
Appwrite provides a real-time API that allows developers to build applications and services that can receive and process updates and events in real time. This can be useful for a wide range of scenarios, such as chat and messaging systems, collaborative applications, and other types of interactive experiences.
The real-time helps you to build apps that are responsive and can provide information from all the services of the Appwrite that you are using.
Appwrite services
1. Database
For database, Appwrite provides you with a No-SQL database. The database is similar to Firebase Firestore which stores that in collection and documentation if you are coming from firebase then you will not have a problem using the database.
Appwrite provides a database API that allows developers to create and manage databases and collections, and to perform CRUD operations on data stored in the database.
Appwrite allows you to create multiple databases, and organize your data into documentation and collection. To fetch and upload the data you can use the REST API and listen to real-time changes you can subscribe to live changes in your documents and collections.
To create the database you can either use Appwrite CLI or the Appwrite Server SDK.
2. Accounts
Accounts provide features such as user registration, authentication, and authorization, as well as tools for managing user roles and permissions.
Appwrite supports email & password, passwordless login called magic link, phone auth, and supports all the major Social Logins (OAuth) providers. The account service provides APIs for handling authentication including single sign-on (SSO) and multi-factor authentication (MFA).
This also provides APIs for managing user roles and permissions, allowing developers to control which users can access specific resources or features in the application. For user management, It provides APIs for managing user profiles, including the ability to update user information and set account preferences.
Overall, the Appwrite accounts service is designed to make it easier for developers to build applications that require user authentication and authorization, and to manage user accounts securely and efficiently.
3. Storage
Appwrite provides a storage API that allows developers to store and retrieve files and other data, such as images and documents.
Storage manages files using buckets. The storage buckets are similar to the collection in the database but buckets give you more control and power to decide, what type of files to allow, what file size you want to allow, and want to encrypt the file or not. It also gives you the option to scan files with an anti-virus.
Using the preview endpoints you can generate a preview of the file, you can modify the preview so that it can suit your needs. You can modify it in terms of dimensions, file size, and style.
4. Functions
Appwrite functions are used to perform a variety of tasks in a server-side environment, such as creating and managing users, storing and retrieving data, and sending emails. They are typically executed in response to events triggered by client-side applications and can be used to build APIs, microservices, and other back-end services. Appwrite functions are written in JavaScript and are executed on the Appwrite server, which provides a range of built-in services and libraries that can be used to access databases, file storage, and other resources.
In simple words the functions allow you to create custom responses whenever for an event. The functions can be triggered by any available Appwrite service or you can schedule it.
Conclusion
Appwrite is a BAAS that provides the core services that a developer needs to build the apps but it still lacks services like analytics, crashlytics, and more that Firebase has.
It provides you to connect multiple apps to a single Appwrite instance, you can use the Appwrite SDK or API to access the various functions and services provided by the Appwrite server. For example, you can use the Appwrite SDK to authenticate users, store and retrieve data, send emails, and more, from within your apps.
There are no options for managed hosting so you are left with the option of hasting Appwrite yourself. That can easily be done by using a one-click install on Digital Ocean.
I hope this article will help you know about Appwrite and its services.
If I got something wrong, Inform me on my social media accounts and feel free to contact me and help me to correct it, I would love to improve and rectify my mistake.
❤️❤️ Thanks for reading this article ❤️❤️