Top Related Projects
The open source Firebase alternative. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
Firebase Javascript SDK
Parse Server for Node.js / Express
Open Source realtime backend in 1 file
The Modern Data Stack 🐰 — Directus is an instant REST+GraphQL API and intuitive no-code data collaboration app for any SQL database.
🚀 Strapi is the leading open-source headless CMS. It’s 100% JavaScript/TypeScript, fully customizable and developer-first.
Quick Overview
Appwrite is an open-source backend server that provides developers with a set of easy-to-use and integrate REST APIs to manage core backend needs. It offers authentication, databases, file storage, cloud functions, and more, all while prioritizing security and ease of use.
Pros
- Easy to set up and use, with comprehensive documentation
- Self-hosted solution, giving developers full control over their data
- Supports multiple programming languages and platforms
- Offers a wide range of built-in features, reducing development time
Cons
- May require more server resources compared to specialized single-purpose solutions
- Learning curve for developers new to backend-as-a-service platforms
- Limited customization options for some advanced use cases
Code Examples
- User Authentication:
import { Client, Account } from 'appwrite';
const client = new Client();
client
.setEndpoint('https://[HOSTNAME_OR_IP]/v1')
.setProject('[PROJECT_ID]');
const account = new Account(client);
// Create a new account
account.create('[USER_ID]', 'email@example.com', 'password')
.then(response => {
console.log(response);
}, error => {
console.log(error);
});
- Database Operations:
import { Client, Databases } from 'appwrite';
const client = new Client();
client
.setEndpoint('https://[HOSTNAME_OR_IP]/v1')
.setProject('[PROJECT_ID]');
const databases = new Databases(client);
// Create a new document
databases.createDocument('[DATABASE_ID]', '[COLLECTION_ID]', '[DOCUMENT_ID]', {
'title': 'Appwrite Example',
'content': 'This is a sample document.'
})
.then(response => {
console.log(response);
}, error => {
console.log(error);
});
- File Storage:
import { Client, Storage } from 'appwrite';
const client = new Client();
client
.setEndpoint('https://[HOSTNAME_OR_IP]/v1')
.setProject('[PROJECT_ID]');
const storage = new Storage(client);
// Upload a file
storage.createFile('[BUCKET_ID]', '[FILE_ID]', document.getElementById('uploader').files[0])
.then(response => {
console.log(response);
}, error => {
console.log(error);
});
Getting Started
- Install Appwrite on your server or use the Docker image.
- Create a new project in the Appwrite console.
- Install the Appwrite SDK for your preferred language:
npm install appwrite
- Initialize the Appwrite client in your application:
import { Client } from 'appwrite';
const client = new Client();
client
.setEndpoint('https://[HOSTNAME_OR_IP]/v1')
.setProject('[PROJECT_ID]');
- Start using Appwrite services in your application, such as authentication, database, or storage.
Competitor Comparisons
The open source Firebase alternative. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
Pros of Supabase
- Built on PostgreSQL, offering powerful relational database capabilities
- Provides real-time functionality out of the box
- Offers a more comprehensive set of built-in authentication options
Cons of Supabase
- Less flexible deployment options compared to Appwrite's self-hosting capabilities
- Steeper learning curve for developers not familiar with PostgreSQL
- More limited customization options for certain features
Code Comparison
Supabase (JavaScript):
const { data, error } = await supabase
.from('users')
.select('name, email')
.eq('id', 1)
Appwrite (JavaScript):
const user = await databases.getDocument(
'default',
'users',
'1'
);
Both Supabase and Appwrite are open-source backend-as-a-service (BaaS) platforms, but they have different approaches and strengths. Supabase is built on PostgreSQL and offers powerful relational database features, while Appwrite provides a more flexible and customizable solution with support for multiple database types.
Supabase excels in real-time functionality and has a wider range of built-in authentication options. However, Appwrite offers more deployment flexibility with its self-hosting capabilities and may be easier for developers who are not familiar with PostgreSQL.
The code examples demonstrate the difference in querying data. Supabase uses a SQL-like syntax, while Appwrite uses a more straightforward document-based approach. Both platforms aim to simplify backend development, but their implementations cater to different developer preferences and project requirements.
Firebase Javascript SDK
Pros of Firebase
- More mature and battle-tested platform with extensive documentation
- Seamless integration with other Google Cloud services
- Larger community and ecosystem of third-party tools
Cons of Firebase
- Vendor lock-in with Google's ecosystem
- Less flexible pricing model, can become expensive for large-scale applications
- Limited self-hosting options
Code Comparison
Firebase:
import { initializeApp } from 'firebase/app';
import { getFirestore, collection, addDoc } from 'firebase/firestore';
const app = initializeApp(firebaseConfig);
const db = getFirestore(app);
await addDoc(collection(db, 'users'), { name: 'John', age: 30 });
Appwrite:
import { Client, Databases } from 'appwrite';
const client = new Client();
const databases = new Databases(client);
await databases.createDocument('database_id', 'collection_id', 'unique_id', { name: 'John', age: 30 });
Both Firebase and Appwrite offer similar functionality for common backend services. Firebase provides a more comprehensive suite of tools and integrations, while Appwrite focuses on simplicity and self-hosting capabilities. The choice between them depends on specific project requirements, scalability needs, and preferences for vendor independence.
Parse Server for Node.js / Express
Pros of Parse Server
- More mature and battle-tested, with a longer history and larger community
- Highly customizable and extensible through Cloud Code and plugins
- Supports multiple database backends (MongoDB, PostgreSQL)
Cons of Parse Server
- Requires more setup and configuration compared to Appwrite
- Less built-in features out of the box, may need additional plugins
- Documentation can be outdated or inconsistent in some areas
Code Comparison
Parse Server:
const express = require('express');
const ParseServer = require('parse-server').ParseServer;
const app = express();
const api = new ParseServer({
databaseURI: 'mongodb://localhost:27017/dev',
appId: 'myAppId',
masterKey: 'myMasterKey',
serverURL: 'http://localhost:1337/parse'
});
Appwrite:
const sdk = require('node-appwrite');
const client = new sdk.Client();
client
.setEndpoint('https://[HOSTNAME_OR_IP]/v1')
.setProject('5df5acd0d48c2')
.setKey('919c2d18fb5d4...a2ae413da83346ad2');
Both Parse Server and Appwrite offer robust backend-as-a-service solutions, but they cater to different needs. Parse Server provides more flexibility and customization options, while Appwrite focuses on simplicity and ease of use with a wider range of built-in services. The choice between them depends on project requirements, development experience, and desired level of control over the backend infrastructure.
Open Source realtime backend in 1 file
Pros of PocketBase
- Lightweight and single executable, making it easier to deploy and manage
- Built-in admin UI for database management and real-time API docs
- Simpler setup process, suitable for smaller projects or rapid prototyping
Cons of PocketBase
- Less extensive feature set compared to Appwrite's comprehensive offerings
- Smaller community and ecosystem, potentially leading to fewer resources and integrations
- Limited scalability options for large-scale applications
Code Comparison
PocketBase (Go):
package main
import "github.com/pocketbase/pocketbase"
func main() {
app := pocketbase.New()
app.Start()
}
Appwrite (PHP):
<?php
require_once 'vendor/autoload.php';
use Appwrite\Client;
use Appwrite\Services\Database;
$client = new Client();
$database = new Database($client);
Both projects aim to simplify backend development, but they differ in their approach and target audience. PocketBase focuses on simplicity and ease of use, making it ideal for smaller projects or developers who prefer a lightweight solution. Appwrite, on the other hand, offers a more comprehensive set of features and services, making it suitable for larger, more complex applications that require extensive backend functionality and scalability options.
The Modern Data Stack 🐰 — Directus is an instant REST+GraphQL API and intuitive no-code data collaboration app for any SQL database.
Pros of Directus
- More flexible data modeling with custom fields and relationships
- Advanced content management features like revisions and translations
- Extensive API customization options with hooks and custom endpoints
Cons of Directus
- Steeper learning curve due to more complex architecture
- Less out-of-the-box features for app development (e.g., authentication, storage)
- Potentially slower performance for large-scale applications
Code Comparison
Directus API request:
const response = await axios.get('https://api.example.com/items/articles', {
headers: { 'Authorization': 'Bearer TOKEN' }
});
Appwrite API request:
const response = await sdk.database.listDocuments('articles');
Both Directus and Appwrite are open-source backend platforms, but they cater to slightly different use cases. Directus focuses on content management and data modeling flexibility, while Appwrite provides a more comprehensive suite of app development tools. The code comparison shows that Directus uses a RESTful API approach, while Appwrite offers a more abstracted SDK for easier integration.
🚀 Strapi is the leading open-source headless CMS. It’s 100% JavaScript/TypeScript, fully customizable and developer-first.
Pros of Strapi
- More flexible content modeling with custom content types
- Extensive plugin ecosystem for extending functionality
- Strong focus on content management and publishing workflows
Cons of Strapi
- Steeper learning curve, especially for non-developers
- Less built-in functionality for real-time features and user management
- Requires more setup and configuration for advanced features
Code Comparison
Strapi (Content Type Definition):
module.exports = {
attributes: {
title: {
type: 'string',
required: true,
},
content: {
type: 'richtext',
},
},
};
Appwrite (Collection Creation):
const collection = await databases.createCollection(
'unique_id',
'articles',
'Articles Collection',
['role:all'],
['role:all']
);
Both Appwrite and Strapi are open-source backend platforms, but they have different focuses. Strapi excels in content management and offers more flexibility in content modeling, making it ideal for complex content-driven applications. Appwrite provides a more comprehensive set of built-in features, including authentication, real-time databases, and file storage, making it suitable for a wider range of application types. The choice between the two depends on the specific needs of your project and the level of customization required.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Appwrite Init has concluded! You can check out all the latest announcements on our Init website ð
Appwrite is a backend platform for developing Web, Mobile, and Flutter applications. Built with the open source community and optimized for developer experience in the coding languages you love.
English | ç®ä½ä¸æ
Announcing Appwrite Cloud Public Beta! Sign up today!
Appwrite is an end-to-end backend server for Web, Mobile, Native, or Backend apps packaged as a set of Docker
Using Appwrite, you can easily integrate your app with user authentication and multiple sign-in methods, a database for storing and querying users and team data, storage and file management, image manipulation, Cloud Functions, and more services.
Find out more at: https://appwrite.io
Table of Contents:
Installation
Appwrite is designed to run in a containerized environment. Running your server is as easy as running one command from your terminal. You can either run Appwrite on your localhost using docker-compose or on any other container orchestration tool, such as Kubernetes, Docker Swarm, or Rancher.
The easiest way to start running your Appwrite server is by running our docker-compose file. Before running the installation command, make sure you have Docker installed on your machine:
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:1.5.10
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:1.5.10
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:1.5.10
Once the Docker installation is complete, go to http://localhost to access the Appwrite console from your browser. Please note that on non-Linux native hosts, the server might take a few minutes to start after completing the installation.
For advanced production and custom installation, check out our Docker environment variables docs. You can also use our public docker-compose.yml and .env files to manually set up an environment.
Upgrade from an Older Version
If you are upgrading your Appwrite server from an older version, you should use the Appwrite migration tool once your setup is completed. For more information regarding this, check out the Installation Docs.
One-Click Setups
In addition to running Appwrite locally, you can also launch Appwrite using a pre-configured setup. This allows you to get up and running quickly with Appwrite without installing Docker on your local machine.
Choose from one of the providers below:
DigitalOcean |
Gitpod |
Akamai Compute |
AWS Marketplace |
Getting Started
Getting started with Appwrite is as easy as creating a new project, choosing your platform, and integrating its SDK into your code. You can easily get started with your platform of choice by reading one of our Getting Started tutorials.
Products
- Account - Manage current user authentication and account. Track and manage the user sessions, devices, sign-in methods, and security logs.
- Users - Manage and list all project users when building backend integrations with Server SDKs.
- Teams - Manage and group users in teams. Manage memberships, invites, and user roles within a team.
- Databases - Manage databases, collections, and documents. Read, create, update, and delete documents and filter lists of document collections using advanced filters.
- Storage - Manage storage files. Read, create, delete, and preview files. Manipulate the preview of your files to perfectly fit your app. All files are scanned by ClamAV and stored in a secure and encrypted way.
- Functions - Customize your Appwrite project by executing your custom code in a secure, isolated environment. You can trigger your code on any Appwrite system event either manually or using a CRON schedule.
- Messaging - Communicate with your users through push notifications, emails, and SMS text messages using Appwrite Messaging.
- Realtime - Listen to real-time events for any of your Appwrite services including users, storage, functions, databases, and more.
- Locale - Track your user's location and manage your app locale-based data.
- Avatars - Manage your users' avatars, countries' flags, browser icons, and credit card symbols. Generate QR codes from links or plaintext strings.
For the complete API documentation, visit https://appwrite.io/docs. For more tutorials, news and announcements check out our blog and Discord Server.
SDKs
Below is a list of currently supported platforms and languages. If you would like to help us add support to your platform of choice, you can go over to our SDK Generator project and view our contribution guide.
Client
- â Web (Maintained by the Appwrite Team)
- â Flutter (Maintained by the Appwrite Team)
- â Apple (Maintained by the Appwrite Team)
- â Android (Maintained by the Appwrite Team)
- â React Native - Beta (Maintained by the Appwrite Team)
Server
- â NodeJS (Maintained by the Appwrite Team)
- â PHP (Maintained by the Appwrite Team)
- â Dart (Maintained by the Appwrite Team)
- â Deno (Maintained by the Appwrite Team)
- â Ruby (Maintained by the Appwrite Team)
- â Python (Maintained by the Appwrite Team)
- â Kotlin (Maintained by the Appwrite Team)
- â Swift (Maintained by the Appwrite Team)
- â .NET - Beta (Maintained by the Appwrite Team)
Community
- â Appcelerator Titanium (Maintained by Michael Gangolf)
- â Godot Engine (Maintained by fenix-hub @GodotNuts)
Looking for more SDKs? - Help us by contributing a pull request to our SDK Generator!
Architecture
Appwrite uses a microservices architecture that was designed for easy scaling and delegation of responsibilities. In addition, Appwrite supports multiple APIs, such as REST, WebSocket, and GraphQL to allow you to interact with your resources by leveraging your existing knowledge and protocols of choice.
The Appwrite API layer was designed to be extremely fast by leveraging in-memory caching and delegating any heavy-lifting tasks to the Appwrite background workers. The background workers also allow you to precisely control your compute capacity and costs using a message queue to handle the load. You can learn more about our architecture in the contribution guide.
Contributing
All code contributions, including those of people having commit access, must go through a pull request and be approved by a core developer before being merged. This is to ensure a proper review of all the code.
We truly â¤ï¸ pull requests! If you wish to help, you can learn more about how you can contribute to this project in the contribution guide.
Security
For security issues, kindly email us at security@appwrite.io instead of posting a public issue on GitHub.
Follow Us
Join our growing community around the world! Check out our official Blog. Follow us on X, LinkedIn, Dev Community or join our live Discord server for more help, ideas, and discussions.
License
This repository is available under the BSD 3-Clause License.
Top Related Projects
The open source Firebase alternative. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
Firebase Javascript SDK
Parse Server for Node.js / Express
Open Source realtime backend in 1 file
The Modern Data Stack 🐰 — Directus is an instant REST+GraphQL API and intuitive no-code data collaboration app for any SQL database.
🚀 Strapi is the leading open-source headless CMS. It’s 100% JavaScript/TypeScript, fully customizable and developer-first.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot