DEV Community

Alex Spinov
Alex Spinov

Posted on

Appwrite Has a Free API You've Never Heard Of

Appwrite is an open-source backend-as-a-service with databases, auth, storage, functions, and messaging. Self-host for free or use Appwrite Cloud's free tier — 75K requests/month, 10GB storage, unlimited projects.

What Makes Appwrite Special?

  • Free tier — 75K requests, 10GB storage, unlimited projects
  • Self-hosted — Docker Compose, own your data
  • Real-time — WebSocket subscriptions on all resources
  • Functions — serverless in Node, Python, Dart, Ruby, PHP
  • SDKs — Web, Flutter, iOS, Android, server-side

The Hidden API: Real-Time Everything

import { Client, Databases, Account, Storage, Functions } from 'appwrite';

const client = new Client()
  .setEndpoint('https://cloud.appwrite.io/v1')
  .setProject('your-project-id');

// Real-time subscriptions — ANY collection!
client.subscribe(['databases.main.collections.messages.documents'], (event) => {
  console.log('Change:', event.events, event.payload);
  updateUI(event.payload);
});

// Database CRUD
const databases = new Databases(client);
const posts = await databases.listDocuments('main', 'posts', [
  Query.equal('published', true),
  Query.orderDesc('$createdAt'),
  Query.limit(20)
]);

await databases.createDocument('main', 'posts', ID.unique(), {
  title: 'My Post',
  content: 'Hello World',
  published: true
});

// Auth
const account = new Account(client);
await account.createEmailPasswordSession('user@example.com', 'password');
const user = await account.get();

// File storage
const storage = new Storage(client);
const file = await storage.createFile('uploads', ID.unique(), document.getElementById('file').files[0]);
const preview = storage.getFilePreview('uploads', file.$id, 200, 200);
Enter fullscreen mode Exit fullscreen mode

Functions API

// Serverless function
export default async function({ req, res, log }) {
  const { userId, action } = JSON.parse(req.body);

  if (action === 'send-welcome') {
    await sendEmail(userId, 'Welcome!', 'Thanks for signing up.');
  }

  return res.json({ success: true });
}
Enter fullscreen mode Exit fullscreen mode

Quick Start

# Self-host
docker run -it --rm \
  -p 80:80 -p 443:443 \
  -v appwrite:/storage \
  appwrite/appwrite

# Or use Cloud: https://cloud.appwrite.io
Enter fullscreen mode Exit fullscreen mode

Why Developers Choose Appwrite

A developer shared: "Firebase pricing scared us after our app went viral. We migrated to self-hosted Appwrite in a weekend. Same features, $0/month on a $10 VPS. The real-time subscriptions are actually easier to use than Firestore."


Building apps fast? Email spinov001@gmail.com or check my tools.

Appwrite vs Supabase vs Firebase — what's your BaaS?

Top comments (0)