Appwrite ORM v1.0.0 is a TypeScript-first ORM for Appwrite, providing type-safe schemas, auto-migration, validation, indexes, and join support. It runs in both Node.js (>=14) and browser environments. Compared to using the Appwrite SDK directly, it offers declarative schema definitions, automatic migration of collections/attributes/indexes, and built-in validation powered by Zod, reducing boilerplate and runtime errors. The package is actively maintained.
npm install appwrite-ormNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes Appwrite client, defines a schema, runs auto-migration, then creates and queries documents.
Pin to exact version and lockfile.
Use the new builder: `const userSchema = schema().string('name').required().integer('age').default(18)`Set `"type": "module"` in `package.json` or rename files to `.mjs`.
Update Node.js to version 16 or later.
Pass as type reference, e.g., `type: StringAttribute` not `type: new StringAttribute()`.
Replace `orm.database('users').create(data)` with `orm.create('users', data)`.Run `npm install appwrite-orm appwrite@>=13` and ensure `"type": "module"` in package.json.
Change to `import { AppwriteORM } from 'appwrite-orm'` and ensure project is ESM.Call `await orm.migrate({ users: userSchema })` before any CRUD operations.Include all `required: true` fields in the create/update data.
Add `age` to the schema definition via `createSchema` or use dynamic attributes.