Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# dynotable-orm
# dynotable-orm: a TypeScript DynamoDB ORM and dynamoose alternative

A type-safe, fast DynamoDB ORM for TypeScript, and a successor to dynamoose.
A type-safe, fast DynamoDB ORM for TypeScript. Define each model with Zod or any Standard Schema, and keys,
updates, conditions and queries are typed from it. It reads and writes tables that dynamoose wrote, and a
codemod moves dynamoose code over.

- **dynamoose call shapes.** `get`, `create`, `update`, `query`, `scan`, conditions, transactions and batches
keep the shapes you know. Your schema gives the types: keys, update paths, condition values, index names.
Expand All @@ -10,10 +12,11 @@ A type-safe, fast DynamoDB ORM for TypeScript, and a successor to dynamoose.
[migration guide](docs/migration-from-dynamoose.md#allowlisted-differences).
- **Any Standard Schema validates.** The Zod 4 adapter adds keys, indexes, Date storage and per-path checks
on updates. Refinements run on every whole-item write.
- **Fast.** In a CPU benchmark on a stub client (measured 2026-11-06), a create, get or update on a schema
of about 60 attributes is 93 to 854 times faster than dynamoose 4.2.0, and as fast as hand-written AWS SDK
code or faster. On a 5-attribute schema, hand-written SDK code is faster on some calls. See
[benchmarks](docs/benchmarks.md).
- **Fast.** In a CPU benchmark on a stub client (measured 2026-11-06), a create or update on a schema of
about 60 attributes is 93 to 854 times faster than dynamoose 4.2.0, and as fast as hand-written AWS SDK
code or faster. On a 5-attribute schema, hand-written SDK code is faster on some calls. On reads,
dynamoose type-checks each attribute and dynotable-orm runs no check, so those numbers compare different
work. See [benchmarks](docs/benchmarks.md).
- **A codemod** moves dynamoose code over and marks what it cannot move with a TODO.

<picture>
Expand Down Expand Up @@ -79,7 +82,7 @@ console.log(user?.plan, found.count);
`create` writes only when the key is not stored yet; pass `{overwrite: true}` to replace. `User.update` with
a wrong path or value type does not compile.

## Migrate from dynamoose
## Migrate from dynamoose to TypeScript and Zod

The codemod rewrites dynamoose call sites and converts each dynamoose `Schema` to a Zod schema plus model
options. It marks what it cannot convert with a TODO comment.
Expand Down
10 changes: 6 additions & 4 deletions docs/benchmarks.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ How to run the benchmark, and the details of each contender and operation, are i

## Results

**On a schema of about 60 attributes, dynotable-orm is 93 to 854 times faster than dynamoose 4.2.0 on create,
get and update, and 288 times faster on a query of 100 items. It is also as fast as hand-written AWS SDK
code, or faster. On a 5-attribute schema, hand-written SDK code is faster than dynotable-orm on create,
update and query.**
**A create or update on a schema of about 60 attributes is 93 to 854 times faster than dynamoose 4.2.0, and
as fast as hand-written AWS SDK code or faster. On a 5-attribute schema, hand-written SDK code is faster on
some calls.**

On get and query, dynamoose 4.2.0 type-checks each attribute of every item it reads. dynotable-orm runs no
check on read, so those rows compare different work.

<picture>
<source media="(prefers-color-scheme: dark)" srcset="assets/benchmark-order-dark.svg">
Expand Down
3 changes: 2 additions & 1 deletion packages/dynotable-orm/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# dynotable-orm

A type-safe, fast DynamoDB ORM for TypeScript, and a successor to dynamoose. Whole-item writes and top-level
A type-safe, fast DynamoDB ORM for TypeScript and a dynamoose alternative. Define each model with Zod or any
Standard Schema, and keys, updates, conditions and queries are typed from it. Whole-item writes and top-level
updates store the same bytes as dynamoose 4.2.0; an update of a nested path does not (see the migration
guide).

Expand Down
2 changes: 1 addition & 1 deletion packages/dynotable-orm/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "dynotable-orm",
"version": "0.1.1",
"description": "Type-safe, fast DynamoDB ORM for TypeScript. A successor to dynamoose, validated by any Standard Schema, with a Zod adapter.",
"description": "Type-safe DynamoDB ORM for TypeScript and a dynamoose alternative: models from Zod or any Standard Schema, typed keys, updates and queries, and a codemod from dynamoose.",
"keywords": [
"dynamodb",
"dynamodb-orm",
Expand Down
Loading