A frontend developer told me: 'I spent 3 weeks setting up auth, database, file storage, and an API. Then I found Appwrite — I had the same thing running in 2 hours.' He now ships side projects in a weekend.
What Appwrite Offers for Free
Appwrite Cloud free tier:
- Unlimited projects
- 75,000 document reads/month + 10 GB storage
- Authentication — email, OAuth, phone, magic link, anonymous
- Database — document store with real-time subscriptions
- Storage — file uploads with image transformations
- Functions — serverless functions in any language
- Messaging — email, SMS, push from one API
- Self-hosted option — completely free, no limits
Quick Start
npm install appwrite
import { Client, Account, Databases, Storage } from 'appwrite';
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1')
.setProject('YOUR_PROJECT_ID');
const account = new Account(client);
const databases = new Databases(client);
const storage = new Storage(client);
Authentication (5 Minutes)
// Sign up
await account.create('unique()', 'alice@example.com', 'password123', 'Alice');
// Login
const session = await account.createEmailPasswordSession('alice@example.com', 'password123');
// OAuth (Google, GitHub, etc.)
account.createOAuth2Session('google', 'https://yourapp.com/success', 'https://yourapp.com/fail');
// Get current user
const user = await account.get();
console.log(user.name); // 'Alice'
// Magic link
await account.createMagicURLToken('unique()', 'alice@example.com', 'https://yourapp.com/verify');
Database
const DB_ID = 'main';
const POSTS_ID = 'posts';
// Create a document
const post = await databases.createDocument(DB_ID, POSTS_ID, 'unique()', {
title: 'My First Post',
content: 'Hello, Appwrite!',
author: 'Alice',
published: true,
likes: 0
});
// Query documents
const { documents } = await databases.listDocuments(DB_ID, POSTS_ID, [
Query.equal('published', true),
Query.orderDesc('$createdAt'),
Query.limit(10)
]);
// Update
await databases.updateDocument(DB_ID, POSTS_ID, post.$id, { likes: post.likes + 1 });
// Real-time subscription
client.subscribe(`databases.${DB_ID}.collections.${POSTS_ID}.documents`, (response) => {
console.log('Document changed:', response.payload);
});
File Storage
// Upload a file
const file = await storage.createFile(
'avatars', // bucket ID
'unique()',
document.getElementById('fileInput').files[0]
);
// Get file URL with transformations
const previewUrl = storage.getFilePreview(
'avatars',
file.$id,
200, // width
200, // height
'center' // gravity
);
Serverless Functions
// functions/sendWelcome/index.js
module.exports = async ({ req, res, log }) => {
const { email, name } = JSON.parse(req.body);
// Send welcome email using Appwrite Messaging
// or any third-party service
log(`Welcome email sent to ${email}`);
return res.json({ success: true });
};
REST API (Server-Side)
# List documents
curl 'https://cloud.appwrite.io/v1/databases/main/collections/posts/documents' \
-H 'X-Appwrite-Project: YOUR_PROJECT_ID' \
-H 'X-Appwrite-Key: YOUR_API_KEY'
# Create document
curl -X POST 'https://cloud.appwrite.io/v1/databases/main/collections/posts/documents' \
-H 'X-Appwrite-Project: YOUR_PROJECT_ID' \
-H 'X-Appwrite-Key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"documentId": "unique()",
"data": { "title": "API Post", "published": true }
}'
Self-Hosted (Unlimited Everything)
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
Perfect For
- MVPs — ship in a weekend, not a month
- Mobile apps — SDKs for Flutter, React Native, iOS, Android
- Hackathons — auth + database + storage in 30 minutes
- Side projects — free forever, no credit card
Need to scrape web data into your Appwrite database? Check out my web scraping actors on Apify — automated data collection.
Need a custom backend solution? Email me at spinov001@gmail.com.
Top comments (0)