{"id":13580185,"url":"https://github.com/dynamodb-toolbox/dynamodb-toolbox","last_synced_at":"2025-05-13T00:11:40.431Z","repository":{"id":37733156,"uuid":"223824579","full_name":"dynamodb-toolbox/dynamodb-toolbox","owner":"dynamodb-toolbox","description":"Lightweight and type-safe query builder for DynamoDB and TypeScript","archived":false,"fork":false,"pushed_at":"2025-05-11T15:05:25.000Z","size":28156,"stargazers_count":1908,"open_issues_count":43,"forks_count":181,"subscribers_count":26,"default_branch":"main","last_synced_at":"2025-05-13T00:11:23.088Z","etag":null,"topics":["aws","dynamodb","nosql","serverless","typescript"],"latest_commit_sha":null,"homepage":"https://www.dynamodbtoolbox.com/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dynamodb-toolbox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-11-24T23:16:45.000Z","updated_at":"2025-05-11T15:05:02.000Z","dependencies_parsed_at":"2023-02-10T12:30:49.490Z","dependency_job_id":"4af63fa0-470b-4ee2-9c81-34828c53c3ac","html_url":"https://github.com/dynamodb-toolbox/dynamodb-toolbox","commit_stats":{"total_commits":1014,"total_committers":60,"mean_commits":16.9,"dds":0.5660749506903353,"last_synced_commit":"d96762b3f8e141f83219d78dac4a846f9ec10f0a"},"previous_names":["dynamodb-toolbox/dynamodb-toolbox"],"tags_count":179,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dynamodb-toolbox%2Fdynamodb-toolbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dynamodb-toolbox%2Fdynamodb-toolbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dynamodb-toolbox%2Fdynamodb-toolbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dynamodb-toolbox%2Fdynamodb-toolbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dynamodb-toolbox","download_url":"https://codeload.github.com/dynamodb-toolbox/dynamodb-toolbox/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253843219,"owners_count":21972874,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","dynamodb","nosql","serverless","typescript"],"created_at":"2024-08-01T15:01:48.476Z","updated_at":"2025-05-13T00:11:40.391Z","avatar_url":"https://github.com/dynamodb-toolbox.png","language":"TypeScript","funding_links":["https://github.com/sponsors/ThomasAribart","https://github.com/sponsors/thomasaribart/"],"categories":["TypeScript","Cloud Data Warehousing"],"sub_categories":["IDE"],"readme":"![DynamoDB-Toolbox](./assets/header.png)\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003eDynamoDB-Toolbox\u003c/h1\u003e\n  \u003ca aria-label=\"NPM version\" href=\"https://www.npmjs.com/package/dynamodb-toolbox\"\u003e\n    \u003cimg alt=\"\" src=\"https://img.shields.io/npm/v/dynamodb-toolbox?color=a2c8f7\u0026style=for-the-badge\"\u003e\n  \u003c/a\u003e\n  \u003ca aria-label=\"License\" href=\"https://github.com/dynamodb-toolbox/dynamodb-toolbox/blob/main/LICENSE\"\u003e\n    \u003cimg alt=\"\" src=\"https://img.shields.io/github/license/dynamodb-toolbox/dynamodb-toolbox?color=%230e355b\u0026style=for-the-badge\"\u003e\n  \u003c/a\u003e\n    \u003cimg alt=\"\" src=https://img.shields.io/npm/dt/dynamodb-toolbox?color=%232e6ca9\u0026style=for-the-badge\u003e\n    \u003cbr/\u003e\n    \u003cbr/\u003e\n  \u003ca href=\"https://www.dynamodbtoolbox.com/docs/getting-started/overview\"\u003eQuickstart\u003c/a\u003e\n  \u003cspan\u003e\u0026nbsp;\u0026nbsp;•\u0026nbsp;\u0026nbsp;\u003c/span\u003e\n  \u003ca href=\"https://dynamodbtoolbox.com\"\u003eDocs\u003c/a\u003e\n  \u003cspan\u003e\u0026nbsp;\u0026nbsp;•\u0026nbsp;\u0026nbsp;\u003c/span\u003e\n  \u003ca href=\"https://github.com/sponsors/ThomasAribart\"\u003eSponsor\u003c/a\u003e\n  \u003cspan\u003e\u0026nbsp;\u0026nbsp;•\u0026nbsp;\u0026nbsp;\u003c/span\u003e\n  \u003ca href=\"https://dynamodb-toolshack.com\"\u003eDynamoDB-Toolshack\u003c/a\u003e\n  \u003cbr /\u003e\n  \u003chr /\u003e\n\u003c/div\u003e\n\n💖 _Huge thanks to the [sponsors](https://github.com/sponsors/ThomasAribart) who help me maintain this repo:_\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.theodo.fr/\"\u003e\u003cimg src=\"https://github.com/theodo.png\" width=\"50px\" alt=\"Theodo\" title=\"Theodo\"/\u003e\u003c/a\u003e\u0026nbsp;\u0026nbsp;\n  \u003c!-- sponsors --\u003e\u003ca href=\"https://github.com/feathersdev\"\u003e\u003cimg src=\"https://github.com/feathersdev.png\" width=\"50px\" alt=\"feathers.dev\" title=\"feathers.dev\"/\u003e\u003c/a\u003e\u0026nbsp;\u0026nbsp;\u003ca href=\"https://github.com/li-jia-nan\"\u003e\u003cimg src=\"https://github.com/li-jia-nan.png\" width=\"50px\" alt=\"lijianan\" title=\"lijianan\"/\u003e\u003c/a\u003e\u0026nbsp;\u0026nbsp;\u003ca href=\"https://github.com/RaeesBhatti\"\u003e\u003cimg src=\"https://github.com/RaeesBhatti.png\" width=\"50px\" alt=\"Raees Iqbal\" title=\"Raees Iqbal\"/\u003e\u003c/a\u003e\u0026nbsp;\u0026nbsp;\u003ca href=\"https://github.com/lucas-subli\"\u003e\u003cimg src=\"https://github.com/lucas-subli.png\" width=\"50px\" alt=\"Lucas Saldanha Ferreira\" title=\"Lucas Saldanha Ferreira\"/\u003e\u003c/a\u003e\u0026nbsp;\u0026nbsp;\u003ca href=\"https://github.com/syntaxfm\"\u003e\u003cimg src=\"https://github.com/syntaxfm.png\" width=\"50px\" alt=\"Syntax\" title=\"Syntax\"/\u003e\u003c/a\u003e\u0026nbsp;\u0026nbsp;\u003c!-- sponsors --\u003e\n  \u003ca href=\"https://github.com/sponsors/ThomasAribart\"\u003e\u003cimg src=\"assets/plus-sign.png\" width=\"50px\" alt=\"Plus sign\" title=\"Your brand here!\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n## Features \u003c!-- omit in toc --\u003e\n\nDynamoDB-Toolbox is a light abstraction layer over the DocumentClient that **turns your DynamoDB journey into a ✨ bliss ✨**\n\n🤗 **Simpler queries**: DynamoDB-Toolbox does all the heavy-lifting of crafting those **complex DynamoDB requests**. It makes your code **clearer**, **more concise** and **easier to maintain**.\n\n📐 **Data validation**: Both pushed and fetched items are **validated** against your schemas, which guarantees the **consistency** of your data and the **reliability** of your code.\n\n✨ **A rich schema syntax** that supports a broad range of edge cases like **defaults**, **composition**, **transformation** and **polymorphism**.\n\n🌈 **Type-safety pushed to the limit**: Increase your development velocity with **instantaneous feedbacks** and **slick auto-completion**.\n\n🌴 **Tree-shakable**: Only import what you need.\n\n☝️ **Single-table designs**: DynamoDB-Toolbox makes **querying multiple entities within the same table extremely simple**, although it works just as well with multiple tables.\n\n🪶 **LLRT compatible**: DynamoDB-Toolbox has no dependency and can be used within [LLRT functions](https://github.com/awslabs/llrt).\n\n## Visit the 👉 [official documentation](https://dynamodbtoolbox.com/) 👈 to get started! \u003c!-- omit in toc --\u003e\n\n\u003e [!TIP]  \n\u003e Want to get more our of your code? Try [DynamoDB-Toolshack](https://dynamodb-toolshack.com/) 🙌\n\u003e\n\u003e DynamoDB-Toolshack is a SaaS that connects to DynamoDB-Toolbox to elevate your DynamoDB experience with a \u003cb\u003eschema-aware UI\u003c/b\u003e, table \u003cb\u003econsitency checks\u003c/b\u003e and a \u003cb\u003emigration system\u003c/b\u003e.\n\u003e\n\u003e [Join the Beta](https://aws.amazon.com/marketplace/pp/prodview-rexdp6m3af2hg) and get started in just a few clicks!\n\n## Why use DynamoDB-Toolbox? \u003c!-- omit in toc --\u003e\n\nIf you're here, we're assuming you know DynamoDB.\n\nIf you don't, check out the [official AWS docs](https://aws.amazon.com/dynamodb).\n\n\u003e **TLDR**: _[DynamoDB](https://aws.amazon.com/dynamodb) is a key-value DB designed to run high-performance applications at any scale. It **automatically scales** up and down based on your current traffic, and removes the need to maintain connections, which makes it the **go-to DB for many projects**, including (but not limited to) **serverless applications**._\n\nIf you've ever used the official [Document Client](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/dynamodb-example-dynamodb-utilities.html), you know that **it’s painful to use**.\n\nTake a look at this `UpdateCommand` example straight from the [AWS documentation](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/dynamodb/command/UpdateItemCommand/):\n\n```ts\nawait documentClient.send(\n  new UpdateCommand({\n    TableName: 'Music',\n    Key: {\n      // 👇 No type-safety on the Primary Key\n      artist: 'Acme Band',\n      songTitle: 'Happy Day'\n    },\n    // 👇 Complex string expressions (+ still no type-safety)\n    UpdateExpression: 'SET #Y = :y, #AT = :t',\n    // 👇 Attribute names provided separately\n    ExpressionAttributeNames: {\n      '#AT': 'albumTitle',\n      '#Y': 'year'\n    },\n    // 👇 Attribute values as well\n    ExpressionAttributeValues: {\n      // 👇 No validation or type-safety to enforce DB schema\n      ':t': 'Louder Than Ever',\n      ':y': '2015'\n    },\n    ReturnValues: 'ALL_NEW'\n  })\n)\n```\n\nIt's a very simple example (updating two fields of a `Music` item), yet already complex 😰\n\n**Things only get messier as your data grows in complexity**: What if your items have many attributes, with some of them deep or optional? What if you need to index an item based on its value or handle different types of items? What about polymorphism?\n\nIn those cases, which are fairly common, **the required code to generate those requests gets very hard to maintain**. That's when DynamoDB-Toolbox comes to the rescue 💪\n\nHere's is a quick preview with the DynamoDB-Toolbox version of the `UpdateCommand` described above:\n\n```ts\n// Validated AND type-safe syntax 🙌\nawait MusicEntity.build(UpdateItemCommand)\n  .item({\n    artist: 'Acme Band',\n    songTitle: 'Happy Day',\n    albumTitle: 'Louder Than Ever',\n    year: '2015'\n  })\n  .options({ returnValues: 'ALL_NEW' })\n  .send()\n```\n\nAnd just like that, we went from an obscure 20 lines to a **readable and elegant 10-liner** 🤩\n\nNot bad, eh? [Let's get started](https://dynamodbtoolbox.com/)!\n\n### [Become a Sponsor!](https://github.com/sponsors/thomasaribart/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdynamodb-toolbox%2Fdynamodb-toolbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdynamodb-toolbox%2Fdynamodb-toolbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdynamodb-toolbox%2Fdynamodb-toolbox/lists"}