Skip to content
ridhotammaPublic

About

A lightweight, Appwrite-compatible backend on Bun + SQLite + Drizzle.

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

218 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bunwrite

A lightweight, Appwrite-compatible backend on Bun + SQLite + Drizzle.

Bunwrite is a self-hosted backend for small products and small VPSes. One Bun server provides the API, console, realtime, functions, sites, storage and rendering. Existing appwrite and node-appwrite SDKs work by changing the endpoint.

Bunwrite is an independent open-source project. It is not affiliated with, endorsed by, or sponsored by Appwrite.

Bunwrite console: project home page

Quick start

Docker

mkdir -p bunwrite
docker run -it --rm \
  --user 0 \
  --volume /var/run/docker.sock:/var/run/docker.sock \
  --volume "$(pwd)/bunwrite:/usr/src/code/bunwrite:rw" \
  --entrypoint=install \
  ghcr.io/ridhotamma/bunwrite:latest

From source

git clone https://github.com/ridhotamma/bunwrite.git
cd bunwrite
bun install
cp .env.example .env
bun run dev

Open http://localhost:8080/console/setup to create the first admin. The API is at http://localhost:8080/v1.

For a throwaway instance with sample data:

bun run demo
# http://localhost:8790/console
# [email protected] / demo-password

Deployment, upgrade, backups, TLS and production tuning: docs/DEPLOY.md. Every environment variable: docs/CONFIGURATION.md.

Features

  • Appwrite-compatible API for documents, users, teams, storage, functions, sites, realtime, webhooks and the console.
  • Realtime with permission-filtered document events, server-published custom.* channels with replay and rate limiting, and Appwrite-style presence.
  • Localization with Appwrite's Locale API, plus per-language email templates and magic URL sign-in.
  • SQLite by default, with Postgres supported through the same service layer and an offline migrate:postgres command.
  • Functions for Node.js and Python, with builds, schedules, executions and custom domains.
  • Sites, static or server-rendered, with Git deployments, previews and custom domains.
  • Storage and backups on local disk or any S3-compatible bucket.
  • Vectors and RAG with local or OpenAI-compatible embeddings, hybrid BM25 + vector retrieval, an optional Qdrant ANN index, local or HTTP reranking, point-level ACLs, persisted golden-set evaluation, PII redaction, prompt-injection signals and audit trails. PDF, image, Markdown and office documents are converted to text before embedding; scanned pages can be OCR'd with Tesseract and simple tables are preserved.
  • HTML to PDF or image with headless Chromium.
  • Console, queue, request logs, traces, metrics and feature flags built in.

Documentation

Topic Guide
Configuration and environment variables docs/CONFIGURATION.md
Deployment, Docker, backups, Litestream and Postgres docs/DEPLOY.md
Architecture, request path and API coverage docs/ARCHITECTURE.md
SQLite and Postgres backends docs/DATABASE.md
Sites, SSR and custom domains docs/SITES.md
Git deployments and previews docs/GIT.md
Queue and workers docs/QUEUE.md
HTML rendering docs/RENDER.md
Vectors and RAG docs/VECTORS.md
Observability docs/OBSERVABILITY.md
MCP server docs/MCP.md
Limits and known differences docs/LIMITATIONS.md
Performance notes docs/PERFORMANCE_PLAN.md
Code conventions docs/CONVENTIONS.md
Security policy SECURITY.md

SDK, CLI and MCP

  • @bunwrite/sdk — typed client for browsers, Bun, Node.js and edge runtimes, including Vectors and RAG.
  • @bunwrite/cli — project setup, config pull/push, function and site deploys, and every SDK method as a command.
  • @bunwrite/mcp — a compact MCP catalog for AI agents.
npm install @bunwrite/sdk
npm install -g @bunwrite/cli@latest
import { Client, Databases } from '@bunwrite/sdk'

const client = new Client()
  .setEndpoint('https://api.example.com/v1')
  .setProject('your-project-id')
  .setKey(process.env.BUNWRITE_API_KEY!)

AI agents

Bunwrite ships Agent Skills for Claude Code, Cursor, Codex, OpenCode and other compatible tools:

npx skills add ridhotamma/bunwrite

See skills/README.md for the available skills.

Development

bun install
bun run dev
bun test
bun run build

See CONTRIBUTING.md before opening a pull request.

License

MIT. See LICENSE.

About

A lightweight, Appwrite-compatible backend on Bun + SQLite + Drizzle.

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages